Class AlgorithmFlip

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmFlip
    extends AlgorithmBase
    Flips 2D, 3D or 4D grays scale or color dataset about X, Y, or Z axis (when applicable) when AlgorithmFlip.IMAGE is passed to the constructor. An option is given to flip all VOIs at this time. When AlgorithmFlip.VOI is passed, only the selected VOI is flipped about the specified axis.
    Version:
    1.0 July 14, 2000
    Author:
    Matthew J. McAuliffe, Ph.D.
    • Field Detail

      • IMAGE_AND_VOI

        public static final int IMAGE_AND_VOI
        Image and all VOIs should be flipped.
        See Also:
        Constant Field Values
      • IMAGE

        public static final int IMAGE
        Denotes image should be flipped without VOI.
        See Also:
        Constant Field Values
      • VOI_TYPE

        public static final int VOI_TYPE
        Denotes selected VOI should be flipped.
        See Also:
        Constant Field Values
      • flipAxis

        private int flipAxis
        Axis to flip along.
      • flipObject

        private int flipObject
        Type of object to flip.
      • changeOrientationOrigin

        private boolean changeOrientationOrigin
        Whether orientation and origin should change with flipping.
    • Constructor Detail

      • AlgorithmFlip

        public AlgorithmFlip​(ModelImage srcImg,
                             int flipMode,
                             int flipObject,
                             boolean changeOrientationOrigin)
        Flips 2D, 3D or 4D grays scale or color dataset about X or Y axis.
        Parameters:
        srcImg - source image model
        flipMode - flip about which axis
        flipObject - DOCUMENT ME!
        changeOrientationOrigin -
    • Method Detail

      • finalize

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

        private void calcInPlace​(int nImages)
        Generates the flipped image and replaces the source image with the flippeded image.
        Parameters:
        nImages - Number of images to be flipped. If 2D image then nImage = 1, if 3D or 4D image where each image is to processed independently then nImages equals the number of images in the volume.