Class AlgorithmMaximumIntensityProjection

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmMaximumIntensityProjection
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmMaximumIntensityProjection extends AlgorithmBase
Computes the maximum or the minimum intensity along each projection of a 3D image. The user can specify theshold values in image intensity for the calculation, as well as which projection to compute along (X,Y, or Z), the start and end slice used in the calculation, the size of a sliding 'window' in number of slices to use in the calculation, and whether to calculate the minimum, maximum or both projections. When the sliding window size is not equal to the number of slices used in the calculation the output is a 3D image, where each slice of the output image is computed using the number of slices in the sliding window. When the sliding window size is equal to the number of slices used in the calculation the output image is a 2D image.
Author:
joshim2
  • Field Details

    • resultImages

      private Vector<ModelImage> resultImages
      Array of Result Images
    • imResolutions

      float[] imResolutions
      Source Image Resolutions
    • imUnitsOfMeasure

      int[] imUnitsOfMeasure
      Source Image Units of Measure
    • startSlice

      private int startSlice
      The first slice in the intensity projection calculation:
    • stopSlice

      private int stopSlice
      The last slice in the intensity projection calculation:
    • window

      private int window
      The number of slices used in the intensity projection, represents a sliding window. When this number is not the difference between the stop and start slices, the output image is a 3D that is a collection of projections. Otherwise the output image is a single 2D projection.
    • minIntensity

      private double[] minIntensity
      Minimum intensity threshold value.
    • maxIntensity

      private double[] maxIntensity
      Maximum intensity threshold value.
    • computeMaximum

      private boolean computeMaximum
      When true, computes the maximum intensity projection.
    • computeMinimum

      private boolean computeMinimum
      When true, computes the minimum intensity projection.
    • X_PROJECTION

      public static final int X_PROJECTION
      Project along the X-Axis.
      See Also:
    • Y_PROJECTION

      public static final int Y_PROJECTION
      Project along the Y-Axis.
      See Also:
    • Z_PROJECTION

      public static final int Z_PROJECTION
      Project along the Z-Axis.
      See Also:
    • projectionDirection

      private int projectionDirection
      Default Projection is along the z-Axis.
    • colorFactor

      private int colorFactor
      When the image is a color image, the colorFactor is set to 4, otherwise it defaults to 1.
    • quiet

      private boolean quiet
  • Constructor Details

    • AlgorithmMaximumIntensityProjection

      public AlgorithmMaximumIntensityProjection(ModelImage srcImg, int _startSlice, int _stopSlice, int _window, double _minIntensity, double _maxIntensity, boolean _computeMaximum, boolean _computeMinimum, int _projectionDirection)
      Estimates the maximum intensity projection in each direction of a 3D black and white image
      Parameters:
      srcImg - source image
      _startSlice - the first slice used in the projection calculation.
      _stopSlice - the last slice used in the projection calculation.
      _window - the number of slices to use in the projection.
      _minIntensity - minimum intensity threshold.
      _maxIntensity - maximum intensity threshold.
      _computeMaximum - when true compute the maximum intensity projection.
      _computeMinimum - when true compute the minimum intensity projection.
      _projectionDirection - image axis to project along (X, Y, or Z).
    • AlgorithmMaximumIntensityProjection

      public AlgorithmMaximumIntensityProjection(ModelImage srcImg, int _startSlice, int _stopSlice, int _window, double _minR, double _maxR, double _minG, double _maxG, double _minB, double _maxB, boolean _computeMaximum, boolean _computeMinimum, int _projectionDirection)
      Estimates the maximum intensity projection of a 3D color image
      Parameters:
      srcImg - source image
      _startSlice - the first slice used in the projection calculation.
      _stopSlice - the last slice used in the projection calculation.
      _window - the number of slices to use in the projection.
      _minR - minimum Red intensity threshold.
      _maxR - maximum Red intensity threshold.
      _minG - minimum Green intensity threshold.
      _maxG - maximum Green intensity threshold.
      _minB - minimum Blue intensity threshold.
      _maxB - maximum Blue intensity threshold.
      _computeMaximum - when true compute the maximum intensity projection.
      _computeMinimum - when true compute the minimum intensity projection.
      _projectionDirection - image axis to project along (X, Y, or Z).
  • Method Details

    • finalize

      public void finalize()
      Prepares this class for destruction.
      Overrides:
      finalize in class AlgorithmBase
    • setQuiet

      public void setQuiet(boolean quiet)
      Parameters:
      quiet -
    • runAlgorithm

      public void runAlgorithm()
      Runs the Intensity Projection algorithm.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • calcZProjection

      private void calcZProjection()
      Calculates the Z Projection for color or black and white images.
    • calcYProjection

      private void calcYProjection()
      Calculates the Y Projection for color or black and white images.
    • calcXProjection

      private void calcXProjection()
      Calculates the X Projection for color or black and white images.
    • getStartSlice

      public int getStartSlice()
      Returns:
      the startSlice
    • getStopSlice

      public int getStopSlice()
      Returns:
      the stopSlice
    • getMinIntensity

      public double[] getMinIntensity()
      Returns:
      the minIntensity
    • getMaxIntensity

      public double[] getMaxIntensity()
      Returns:
      the maxIntensity
    • isComputeMaximum

      public boolean isComputeMaximum()
      Returns:
      the computeMaximum
    • isComputeMinimum

      public boolean isComputeMinimum()
      Returns:
      the computeMinimum
    • getProjectionDirection

      public int getProjectionDirection()
      Returns:
      the projectionDirection
    • getResultImage

      public Vector<ModelImage> getResultImage()
      This method returns the projection images in a Vector.
    • getWindow

      public int getWindow()
      Returns:
      the window
    • setStartSlice

      public void setStartSlice(int startSlice)
      Parameters:
      startSlice - the startSlice to set
    • setStopSlice

      public void setStopSlice(int stopSlice)
      Parameters:
      stopSlice - the stopSlice to set
    • setMinIntensity

      public void setMinIntensity(double[] minIntensity)
      Parameters:
      minIntensity - the minIntensity to set
    • setMaxIntensity

      public void setMaxIntensity(double[] maxIntensity)
      Parameters:
      maxIntensity - the maxIntensity to set
    • setComputeMaximum

      public void setComputeMaximum(boolean computeMaximum)
      Parameters:
      computeMaximum - the computeMaximum to set
    • setComputeMinimum

      public void setComputeMinimum(boolean computeMinimum)
      Parameters:
      computeMinimum - the computeMinimum to set
    • setProjectionDirection

      public void setProjectionDirection(int projectionDirection)
      Parameters:
      projectionDirection - the projectionDirection to set
    • setSrcImage

      public void setSrcImage(ModelImage srcImage)
      Description copied from class: AlgorithmBase
      Sets the source image of the algorithm
      Overrides:
      setSrcImage in class AlgorithmBase
      Parameters:
      srcImage - the source image
    • setWindow

      public void setWindow(int window)
      Parameters:
      window - the window to set