Class AlgorithmExtractSlicesVolumes

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

public class AlgorithmExtractSlicesVolumes extends AlgorithmBase

Title: AlgorithmExtractIndividualSlices

Description: Extracts individual slices from 3D or 4D images and opens each slice in its own Frame

Version:
1.0
Author:
Justin Senseney
  • Field Details

    • extract

      private boolean[] extract
      List of slices to remove from source image.
    • extractedImages

      private Vector<ModelImage> extractedImages
      DOCUMENT ME!
    • oldZdim

      private int oldZdim
      Original Z dimension of the image.
    • sliceArea

      private int sliceArea
      Area of a slice (Xdim * Ydim).
    • Xdim

      private int Xdim
      X dimension of the image.
    • Ydim

      private int Ydim
      Y dimension of the image.
    • fileInfoDicom

      FileInfoDicom[] fileInfoDicom
  • Constructor Details

    • AlgorithmExtractSlicesVolumes

      public AlgorithmExtractSlicesVolumes(ModelImage srcImage, boolean[] removeSlices)
      Import source and destination images into the class.
      Parameters:
      srcImage - source image (image to extract from)
      removeSlices - list of booleans for slices that should be extracted
  • Method Details

    • finalize

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

      public ModelImage[] getExtractedImages()
      Return the images extracted from the source image.
      Returns:
      The extracted images.
    • runAlgorithm

      public void runAlgorithm()
      Calculates the final output.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • updateFileInfo

      public void updateFileInfo(ModelImage image, ModelImage resultImage, int slice)
      Copy important file information to resultant image structure.
      Parameters:
      image - Source image.
      resultImage - Resultant image.
      slice - DOCUMENT ME!
    • getColorFactor

      protected int getColorFactor()
      Calculates and returns the color factor based on the srcImage.
      Returns:
      DOCUMENT ME!
    • extractSlices

      private void extractSlices()
      Calculates the final output and stores it in the source image.
    • getOffset

      private int getOffset(ModelImage img, int colorFactor, int t)
      Calculate and return the offset for the given image and time slice.
      Parameters:
      img - -- ModelImage whose offset is being computed
      colorFactor - -- the image's colorFactor
      t - -- current time slice
      Returns:
      -- the computed offset into the data buffer