Module ij
Package ij.process

Class StackProcessor


  • public class StackProcessor
    extends java.lang.Object
    This class processes stacks.
    • Constructor Detail

      • StackProcessor

        public StackProcessor​(ImageStack stack)
        Constructs a StackProcessor from a stack.
      • StackProcessor

        public StackProcessor​(ImageStack stack,
                              ImageProcessor ip)
        Constructs a StackProcessor from a stack. 'ip' is the processor that will be used to process the slices. 'ip' can be null when using crop().
    • Method Detail

      • invert

        public void invert()
      • flipHorizontal

        public void flipHorizontal()
      • flipVertical

        public void flipVertical()
      • applyTable

        public void applyTable​(int[] table)
      • scale

        public void scale​(double xScale,
                          double yScale)
      • scale

        public void scale​(double xScale,
                          double yScale,
                          double fillValue)
      • resize

        public ImageStack resize​(int newWidth,
                                 int newHeight)
        Creates a new stack with dimensions 'newWidth' x 'newHeight'. To reduce memory requirements, the orginal stack is deleted as the new stack is created.
      • resize

        public ImageStack resize​(int newWidth,
                                 int newHeight,
                                 boolean averageWhenDownsizing)
      • crop

        public ImageStack crop​(int x,
                               int y,
                               int width,
                               int height)
        Crops the stack to the specified rectangle.
      • copyBits

        public void copyBits​(ImageProcessor src,
                             int xloc,
                             int yloc,
                             int mode)
      • copyBits

        public void copyBits​(ImageStack src,
                             int xloc,
                             int yloc,
                             int mode)
      • filter3D

        public void filter3D​(ImageStack out,
                             float radx,
                             float rady,
                             float radz,
                             int zmin,
                             int zmax,
                             int filter)
        3D filter using threads
        Parameters:
        out -
        radx - Radius of mean filter in x
        rady - Radius of mean filter in y
        radz - Radius of mean filter in z
        zmin -
        zmax -
        filter -
      • filter3D

        public void filter3D​(ImageStack out,
                             int nChs,
                             int nZSlices,
                             float radx,
                             float rady,
                             float radz,
                             int cmin,
                             int cmax,
                             int zmin,
                             int zmax,
                             int tmin,
                             int tmax,
                             int filter)
        filter3d with added channel, frame, chs, and slices info for hyperstack
        Parameters:
        out - ImageStack output
        chs - Number of channels in the hyperstack
        nZSlices - Number of slices in the hyperstack
        radx - Radius of filter in x
        rady - Radius of filter in y
        radz - Radis of filter in z
        cmin - start channel (0-based)
        cmax - end channel (0-based)
        zmin - start slice (0-based)
        zmax - end slice (0-based)
        tmin - start frame (0-based)
        tmax - end frame (0-based)
        filter -