예제 #1
0
 def __init__(
     self,
     *,
     preprocessor: Operator[DataRoi, Array5D] = OpRetriever(),
 ) -> None:
     super().__init__()
     self.preprocessor = preprocessor
예제 #2
0
 def from_ilp_scale(cls: Type[FE],
                    *,
                    preprocessor: Operator[DataRoi,
                                           Array5D] = OpRetriever(),
                    scale: float,
                    axis_2d: Optional[str] = None) -> FE:
     pass
예제 #3
0
 def __init__(self,
              *,
              threshold: float,
              preprocessor: Operator[DataRoi, Array5D] = OpRetriever()):
     self.preprocessor = preprocessor
     self.threshold = threshold
     super().__init__()
예제 #4
0
 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)
예제 #5
0
 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
예제 #6
0
 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,
     )
예제 #7
0
 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
예제 #8
0
 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),
     )
예제 #9
0
 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
예제 #10
0
 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
예제 #11
0
 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),
     )
예제 #12
0
 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),
     )
예제 #13
0
 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,
     )
예제 #14
0
 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
예제 #15
0
 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__()
예제 #16
0
 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,
     )
예제 #17
0
 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,
     )
예제 #18
0
 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,
     )