def __init__( self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), ) -> None: super().__init__() self.preprocessor = preprocessor
def from_ilp_scale(cls: Type[FE], *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), scale: float, axis_2d: Optional[str] = None) -> FE: pass
def __init__(self, *, threshold: float, preprocessor: Operator[DataRoi, Array5D] = OpRetriever()): self.preprocessor = preprocessor self.threshold = threshold super().__init__()
def __init__(self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), axis_2d: Optional[str] = None, presmooth_sigma: float = 0): self.preprocessor = preprocessor self.presmooth_sigma = presmooth_sigma super().__init__(axis_2d=axis_2d)
def __init__( self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(axiskeys_hint="ctzyx"), axis_2d: Optional[Axis2D], ): super().__init__() self.preprocessor = preprocessor self.axis_2d = axis_2d
def from_ilp_scale(cls: Type[SIGMA_FILTER], *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever( axiskeys_hint="ctzyx"), scale: float, axis_2d: Optional[Axis2D]) -> SIGMA_FILTER: return cls( preprocessor=preprocessor, sigma=min(scale, 1.0), axis_2d=axis_2d, )
def __init__( self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(axiskeys_hint="ctzyx"), scale: float, window_size: float = 0, axis_2d: Optional[Axis2D], ): super().__init__(preprocessor=preprocessor, axis_2d=axis_2d) self.scale = scale self.window_size = window_size
def from_ilp_scale(cls: Type[ScaleFilter], *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), scale: float, axis_2d: Optional[str] = None) -> ScaleFilter: return cls( preprocessor=preprocessor, scale=min(scale, 1.0), axis_2d=axis_2d, presmooth_sigma=cls.calc_presmooth_sigma(scale), )
def __init__( self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), sigma: float, window_size: float = 0, axis_2d: Optional[str] = None, presmooth_sigma: float = 0, ): super().__init__(axis_2d=axis_2d, presmooth_sigma=presmooth_sigma) self.sigma = sigma self.window_size = window_size
def __init__( self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), #FIXME: ScalarData instead of Array5D? object_channel_idx: int, expansion_step: Optional[Shape5D] = None, maximum_tile_size: Optional[Shape5D] = None ): self.preprocessor = preprocessor self.object_channel_idx = object_channel_idx self.expansion_step = expansion_step self.maximum_tile_size = maximum_tile_size
def from_ilp_scale( cls, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), scale: float, axis_2d: Optional[str] = None) -> "DifferenceOfGaussians": capped_scale = min(scale, 1.0) return cls( preprocessor=preprocessor, sigma0=capped_scale, sigma1=capped_scale * 0.66, axis_2d=axis_2d, presmooth_sigma=cls.calc_presmooth_sigma(scale), )
def from_ilp_scale( cls, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), scale: float, axis_2d: Optional[str] = None) -> "StructureTensorEigenvalues": capped_scale = min(scale, 1.0) return cls( preprocessor=preprocessor, innerScale=capped_scale, outerScale=0.5 * capped_scale, axis_2d=axis_2d, presmooth_sigma=cls.calc_presmooth_sigma(scale), )
def from_ilp_scale( cls, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever( axiskeys_hint="ctzyx"), scale: float, axis_2d: Optional[Axis2D]) -> "StructureTensorEigenvalues": capped_scale = min(scale, 1.0) return cls( preprocessor=preprocessor, innerScale=capped_scale, outerScale=0.5 * capped_scale, axis_2d=axis_2d, )
def __init__( self, *, preprocessor: Operator[DataRoi, Array5D] = OpRetriever(), innerScale: float, outerScale: float, window_size: float = 0, axis_2d: Optional[str] = None, presmooth_sigma: float = 0, ): super().__init__(preprocessor=preprocessor, axis_2d=axis_2d, presmooth_sigma=presmooth_sigma) self.innerScale = innerScale self.outerScale = outerScale self.window_size = window_size
def __init__( self, *, ilp_scale: float, axis_2d: Optional[Axis2D], preprocessor: Operator[DataRoi, Array5D] = OpRetriever(axiskeys_hint="ctzyx"), ): self.ilp_scale = ilp_scale self.presmoother = GaussianSmoothing( preprocessor=preprocessor, axis_2d=axis_2d, window_size=WINDOW_SIZE, sigma=math.sqrt(ilp_scale**2 - 1.0) if ilp_scale > 1.0 else ilp_scale, ) self.ilp_scale = ilp_scale self.axis_2d = axis_2d super().__init__()
def __init__( self, ilp_scale: float, axis_2d: Optional[Axis2D], preprocessor: Operator[DataRoi, Array5D] = OpRetriever(axiskeys_hint="ctzyx") ): super().__init__(ilp_scale=ilp_scale, axis_2d=axis_2d, preprocessor=preprocessor) capped_scale = min(ilp_scale, 1.0) self._op = DifferenceOfGaussians( preprocessor=self.presmoother, sigma0=capped_scale, sigma1=capped_scale * 0.66, axis_2d=axis_2d, )
def __init__( self, ilp_scale: float, axis_2d: Optional[Axis2D], preprocessor: Operator[DataRoi, Array5D] = OpRetriever(axiskeys_hint="ctzyx") ): super().__init__(ilp_scale=ilp_scale, axis_2d=axis_2d, preprocessor=preprocessor) self._op = GaussianGradientMagnitude( preprocessor=self.presmoother, sigma=min(ilp_scale, 1.0), axis_2d=axis_2d, )
def __init__( self, *, ilp_scale: float, axis_2d: Optional[Axis2D], preprocessor: Operator[DataRoi, Array5D] = OpRetriever(axiskeys_hint="ctzyx") ): super().__init__(ilp_scale=ilp_scale, preprocessor=preprocessor, axis_2d=axis_2d) capped_scale = min(ilp_scale, 1.0) self._op = StructureTensorEigenvalues( innerScale=capped_scale, outerScale=0.5 * capped_scale, axis_2d=axis_2d, preprocessor=self.presmoother, )