Class AlgorithmExtractSlices

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

public class AlgorithmExtractSlices extends AlgorithmBase
Algorithm that extracts the slices indicated in the list from the srcImage and puts them into the destImage.

Note that an image is a set of slices; each slice is XxY, with Z slices.

Version:
v0.11 1 Nov 1999 (processes most images)
Author:
Lynne Pusanik based on AlgorithmRemoveSlices, David Parsons (parsonsd@cbel.cit.nih.gov) (with vast help from M.McAuliffe)
See Also:
  • Field Details

    • convert4Dto3D

      private boolean convert4Dto3D
      If true convert the selected images to 3D datasets.
    • extractList

      private Vector<String> extractList
      List of slices to extract from source image.
    • 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.
  • Constructor Details

    • AlgorithmExtractSlices

      public AlgorithmExtractSlices(ModelImage srcImage, ModelImage destImage, String[] extractSlices)
      Import source and destination images into the class.
      Parameters:
      srcImage - source image (image to clip from)
      destImage - destination image (image to paste to)
      extractSlices - list of slice numbers indicating which slices in source should be extracted to destination.
  • Method Details

    • getExtractList

      public Vector<String> getExtractList()
      Method to return the extract list since local copies may change while the algorithm runs.
      Returns:
      DOCUMENT ME!
    • runAlgorithm

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

      public void setConvert4Dto3D(boolean doConvert)
      DOCUMENT ME!
      Parameters:
      doConvert - DOCUMENT ME!
    • calcStoreInDest

      private void calcStoreInDest()
      DOCUMENT ME!