diff --git a/src/imcflibs/imagej/projections.py b/src/imcflibs/imagej/projections.py index e129085a0bc2b6336172ff6040da8ac4370a8c6d..bb615fd576134dc7200b4c10ed54d887255c4c07 100644 --- a/src/imcflibs/imagej/projections.py +++ b/src/imcflibs/imagej/projections.py @@ -1,10 +1,10 @@ """Functions for creating Z projections.""" +from ij.plugin import ZProjector + from .bioformats import export_using_orig_name from ..log import LOG as log -from ij.plugin import ZProjector - def average(imp): """Create an average intensity projection. diff --git a/src/imcflibs/imagej/shading.py b/src/imcflibs/imagej/shading.py index eeaeff13531439792a9957d49f7f5c065f479f07..7bb69aba0806f41910b97b53dca9287e89f5a498 100644 --- a/src/imcflibs/imagej/shading.py +++ b/src/imcflibs/imagej/shading.py @@ -2,14 +2,14 @@ import os +from ij import IJ +from ij.plugin import ImageCalculator, RGBStackMerge + from ..imagej import bioformats from ..imagej import projections from ..pathtools import listdir_matching from ..log import LOG as log -from ij import IJ -from ij.plugin import ImageCalculator, RGBStackMerge - def apply_model(imps, model, merge=True): """Apply a given shading model to a list of images / stacks. @@ -19,7 +19,7 @@ def apply_model(imps, model, merge=True): WARNING: the operation happens in-place, i.e. the original "imps" images will be modified! - + Parameters ---------- imps : list(ij.ImagePlus) @@ -32,7 +32,7 @@ def apply_model(imps, model, merge=True): merge : bool, optional Whether or not to combine the resulting ImagePlus objects into a single multi-channel stack (default=True). - + Returns ------- ij.ImagePlus or list(ij.ImagePlus) @@ -54,7 +54,7 @@ def apply_model(imps, model, merge=True): def correct_and_project(filename, path, model, proj, fmt): """Apply a shading correction to an image and create a projection. - + Parameters ---------- filename : str