impy.utils package¶
Submodules¶
impy.utils.axesop module¶
- impy.utils.axesop.add_axes(axes, shape, key, key_axes='yx')[source]¶
Stack key to make its shape key_axes-> axes.
- impy.utils.axesop.axes_included(img: AxesMixin, label: AxesMixin)[source]¶
e.g.) img.axes = “tyx”, label.axes = “yx” -> True img.axes = “tcyx”, label.axes = “zyx” -> False
impy.utils.deco module¶
- impy.utils.deco.check_input_and_output(func=None, *, inherit_label_info=False, only_binary=False, need_labels=False)[source]¶
- impy.utils.deco.dims_to_spatial_axes(func)[source]¶
Decorator to convert input dims to correct spatial axes. Compatible with ImgArray and LazyImgArray e.g.) dims=None (default) -> “yx” or “zyx” depend on the input image dims=2 -> “yx” dims=3 -> “zyx” dims=”ty” -> “ty”
- impy.utils.deco.same_dtype(func=None, asfloat: bool = False)[source]¶
Decorator to assure output image has the same dtype as the input image. This decorator is compatible with both ImgArray and LazyImgArray.
- Parameters
asfloat (bool, optional) – If input image should be converted to float first, by default False
impy.utils.gauss module¶
- class impy.utils.gauss.DiagonalGaussian(params=None)[source]¶
Bases:
impy.utils.gauss.Gaussian
- property mu¶
- property ndim¶
- property params¶
- property sg¶
impy.utils.io module¶
impy.utils.misc module¶
impy.utils.slicer module¶
- impy.utils.slicer.axis_targeted_slicing(ndim: int, axes: str, string: str) Tuple[Union[slice, int], ...] [source]¶
Make a conventional slices from an axis-targeted slicing string.
- Parameters
ndim (int) – Number of dimension of the array which will be sliced.
axes (str) – Axes of input ndarray.
string (str) – Axis-targeted slicing string. If an axis that does not exist in axes is contained, this function will raise ValueError.
- Returns
- Return type
slices