Class ShrinkSegmentationToBoundingBox


  • public class ShrinkSegmentationToBoundingBox
    extends java.lang.Object

    A class of static methods to read DICOM segmentation images, and shrink their extent to the minimum bounding box surrounding the segments.

    • Constructor Detail

      • ShrinkSegmentationToBoundingBox

        public ShrinkSegmentationToBoundingBox​(java.lang.String inputFileName,
                                               java.lang.String outputFileName)
                                        throws DicomException,
                                               java.io.FileNotFoundException,
                                               java.io.IOException

        Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.

        Parameters:
        inputFileName - the input file name
        outputFileName - the output file name
        Throws:
        DicomException
        java.io.FileNotFoundException
        java.io.IOException
    • Method Detail

      • setBit

        protected static void setBit​(byte[] pixelData,
                                     int f,
                                     int r,
                                     int c,
                                     int rows,
                                     int columns)
      • getBit

        protected static int getBit​(byte[] pixelData,
                                    int f,
                                    int r,
                                    int c,
                                    int rows,
                                    int columns)
      • main

        public static void main​(java.lang.String[] arg)

        Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.

        Parameters:
        arg - two parameters, the inputFile, outputFile