Class AlgorithmExtractSlices

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.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:
    AlgorithmRemoveSlices
    • Field Detail

      • convert4Dto3D

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

        private java.util.Vector<java.lang.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 Detail

      • AlgorithmExtractSlices

        public AlgorithmExtractSlices​(ModelImage srcImage,
                                      ModelImage destImage,
                                      java.lang.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 Detail

      • getExtractList

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

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

        private void calcStoreInDest()
        DOCUMENT ME!