Class AlgorithmCorrectSpacing

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

    public class AlgorithmCorrectSpacing
    extends AlgorithmBase
    Algorithm to adjust image volume for cases when the slice spacing is not equal to the slice thickness. When spacing > thickness: repeat images from original image set insert blank images (so that in the final image volume, all images will have the same slice thickness and the image volume will be to proper scale. When spacing < thickness: set thickness = spacing.
    • Field Detail

      • DIM

        private int DIM
        The number of dimensions in the image.
      • newZdim

        private int newZdim
        New Z dimension.
      • numBlanks

        private int numBlanks
        Number of blank images, to make up gap.
      • numRepIm

        private int numRepIm
        Number of repeated images, to compensate for gap.
      • oldTimeStepVolume

        private int oldTimeStepVolume
        Volume for each time step.
      • newTimeStepVolume

        private int newTimeStepVolume
        Volume for each time step.
      • oldZdim

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

        private ModelImage resultImage
        Result Image.
      • sliceArea

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

        private int Tdim
        Time dimension of the image.
      • Xdim

        private int Xdim
        X dimension of the image.
      • Ydim

        private int Ydim
        Y dimension of the image.
      • colorFactor

        private int colorFactor
    • Constructor Detail

      • AlgorithmCorrectSpacing

        public AlgorithmCorrectSpacing​(ModelImage srcImage,
                                       ModelImage resultImage,
                                       int numRepIm,
                                       int numBlanks)
        Import source image into the class.
        Parameters:
        srcImage - source image (image to clip from)
        resultImage - corrected image
        numRepIm - number of times to repeat each of original images
        numBlanks - number of blank images to insert
    • Method Detail

      • disposeLocal

        public void disposeLocal()
        Dispose of local variables that may be taking up lots of room.
      • finalize

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

        public ModelImage getResultImage()
        Returns corrected image.
        Returns:
        resultImage