Class Fusion

java.lang.Object
mpicbg.stitching.fusion.Fusion

public class Fusion extends Object
Manages the fusion for all types except the overlayfusion
Author:
Stephan Preibisch (stephan.preibisch@gmx.de)
  • Field Details

    • redrawDelay

      public static long redrawDelay
  • Constructor Details

    • Fusion

      public Fusion()
  • Method Details

    • fuse

      public static <T extends net.imglib2.type.numeric.RealType<T> & net.imglib2.type.NativeType<T>> ij.ImagePlus fuse(T targetType, ArrayList<ij.ImagePlus> images, ArrayList<mpicbg.models.InvertibleBoundable> models, int dimensionality, boolean subpixelResolution, int fusionType, String outputDirectory, boolean noOverlap, boolean ignoreZeroValues, boolean displayImages)
      Parameters:
      targetType -
      images -
      models -
      dimensionality -
      subpixelResolution - - if there is no subpixel resolution, we do not need to convert to float as no interpolation is necessary, we can compute everything with RealType
    • fuseBlock

      protected static <T extends net.imglib2.type.numeric.RealType<T>> void fuseBlock(net.imglib2.img.Img<T> output, ArrayList<? extends ImageInterpolation<? extends net.imglib2.type.numeric.RealType<?>>> input, double[] offset, ArrayList<mpicbg.models.InvertibleBoundable> transform, PixelFusion fusion, boolean displayFusion)
      Fuse one slice/volume (one channel)
      Parameters:
      output - - same the type of the ImagePlus input
      input - - FloatType, because of Interpolation that needs to be done
      transform - - the transformation
    • fuseBlockNoOverlap

      protected static <T extends net.imglib2.type.numeric.RealType<T>> void fuseBlockNoOverlap(net.imglib2.img.Img<T> output, ArrayList<? extends ImageInterpolation<? extends net.imglib2.type.numeric.RealType<?>>> input, double[] offset, ArrayList<mpicbg.models.InvertibleBoundable> transform, boolean displayFusion)
      Fuse one slice/volume (one channel)
      Parameters:
      output - - same the type of the ImagePlus input
      input - - FloatType, because of Interpolation that needs to be done
      transform - - the transformation
    • writeBlock

      protected static <T extends net.imglib2.type.numeric.RealType<T>> void writeBlock(net.imglib2.img.Img<T> outputSlice, int numSlices, int t, int numTimePoints, int c, int numChannels, ArrayList<? extends ImageInterpolation<? extends net.imglib2.type.numeric.RealType<?>>> input, double[] offset, ArrayList<mpicbg.models.InvertibleBoundable> transform, PixelFusion fusion, String outputDirectory)
      Fuse one slice/volume (one channel)
      Parameters:
      outputSlice - - same the type of the ImagePlus input, just one slice which will be written to the output directory
      input - - FloatType, because of Interpolation that needs to be done
      transform - - the transformation
    • estimateBounds

      public static void estimateBounds(double[] offset, int[] size, List<ij.ImagePlus> images, ArrayList<mpicbg.models.InvertibleBoundable> models, int dimensionality)
      Estimate the bounds of the output image. If there are more models than images, we assume that this encodes for more timepoints. E.g. 2 Images and 10 models would mean 5 timepoints. The arrangement of the models should be as follows: image1 timepoint1 image2 timepoint1 image1 timepoint2 ... image2 timepoint5
      Parameters:
      offset - - the offset, will be computed
      size - - the size, will be computed
      images - - all imageplus in a list
      models - - all models
      dimensionality - - which dimensionality (2 or 3)
    • estimateBounds

      public static void estimateBounds(double[] offset, int[] size, int[][] imgSizes, ArrayList<mpicbg.models.InvertibleBoundable> models, int dimensionality)
      Estimate the bounds of the output image. If there are more models than images, we assume that this encodes for more timepoints. E.g. 2 Images and 10 models would mean 5 timepoints. The arrangement of the models should be as follows: image1 timepoint1 image2 timepoint1 image1 timepoint2 ... image2 timepoint5
      Parameters:
      offset - - the offset, will be computed
      size - - the size, will be computed
      imgSizes - - the dimensions of all input images imgSizes[ image ][ x, y, (z) ]
      models - - all models
      dimensionality - - which dimensionality (2 or 3)
    • main

      public static void main(String[] args)