def __init__(self, *args, **kwargs): warn_deprecated("OpCachedLabelImage is deprecated, use OpLabelVolume instead") super(OpCachedLabelImage, self).__init__(*args, **kwargs) # Hook up the labeler self._opLabelImage = OpLabelImage( parent=self ) self._opLabelImage.Input.connect( self.Input ) self._opLabelImage.BackgroundLabels.connect( self.BackgroundLabels ) # Hook up the cache self._opCache = OpCompressedCache( parent=self ) self._opCache.Input.connect( self._opLabelImage.Output ) self._opCache.InputHdf5.connect( self.InputHdf5 ) # Hook up our output slots self.Output.connect( self._opCache.Output ) self.CleanBlocks.connect( self._opCache.CleanBlocks ) self.OutputHdf5.connect( self._opCache.OutputHdf5 )
def __init__(self, *args, **kwargs): warn_deprecated( "OpCachedLabelImage is deprecated, use OpLabelVolume instead") super(OpCachedLabelImage, self).__init__(*args, **kwargs) # Hook up the labeler self._opLabelImage = OpLabelImage(parent=self) self._opLabelImage.Input.connect(self.Input) self._opLabelImage.BackgroundLabels.connect(self.BackgroundLabels) # Hook up the cache self._opCache = OpCompressedCache(parent=self) self._opCache.Input.connect(self._opLabelImage.Output) self._opCache.InputHdf5.connect(self.InputHdf5) # Hook up our output slots self.Output.connect(self._opCache.Output) self.CleanBlocks.connect(self._opCache.CleanBlocks) self.OutputHdf5.connect(self._opCache.OutputHdf5)
def writeIntoDestination( self, destination, value, roi ): if destination is not None: if not isinstance(destination, list): assert(roi.dim == destination.ndim), "%r ndim=%r, shape=%r" % (roi.toSlice(), destination.ndim, destination.shape) sl = roiToSlice(roi.start, roi.stop) try: destination[:] = value[sl] except TypeError: warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType") destination[:] = value else: sl = roiToSlice(roi.start, roi.stop) try: destination = value[sl] except: warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType") destination = [value] if type(destination) == numpy.ndarray and destination.shape == (): # This is necessary because numpy types will not be caught in the except statement above. # They don't throw when used with __getitem__ # e.g. try this: # x = np.int64(5) # assert type(x[()]) == np.ndarray and x[()].shape == () warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType") destination = [value] return destination
def __init__(self, *args, **kwargs): warn_deprecated("OpCachedLabelImage is deprecated," " use OpLabelVolume instead", stacklevel=2) super(OpCachedLabelImage, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): warn_deprecated( "OpLabelImage is deprecated," " use OpLabelVolume instead", stacklevel=2) super(OpLabelImage, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): warn_deprecated("Usage of OpVigraLabelVolume is deprecated," " use OpLabelVolume instead!") super(OpVigraLabelVolume, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): warn_deprecated( "Usage of OpVigraLabelVolume is deprecated," " use OpLabelVolume instead!", stacklevel=2) super(OpVigraLabelVolume, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): warn_deprecated("OpLabelImage is deprecated," " use OpLabelVolume instead") super(OpLabelImage, self).__init__(*args, **kwargs)