Package com.pixelmed.apps
Class ShrinkSegmentationToBoundingBox
java.lang.Object
com.pixelmed.apps.ShrinkSegmentationToBoundingBox
A class of static methods to read DICOM segmentation images, and shrink their extent to the minimum bounding box surrounding the segments.
-
Constructor Summary
ConstructorsConstructorDescriptionShrinkSegmentationToBoundingBox
(String inputFileName, String outputFileName) Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTLHCOfClippedRegionToImagePosition
(AttributeList list, int[] box) protected void
clipAllFramesToSpecifiedSize
(AttributeList list, int[] box) protected int[]
protected static int
getBit
(byte[] pixelData, int f, int r, int c, int rows, int columns) static void
Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.protected static void
setBit
(byte[] pixelData, int f, int r, int c, int rows, int columns)
-
Constructor Details
-
ShrinkSegmentationToBoundingBox
public ShrinkSegmentationToBoundingBox(String inputFileName, String outputFileName) throws DicomException, FileNotFoundException, IOException Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.
- Parameters:
inputFileName
- the input file nameoutputFileName
- the output file name- Throws:
DicomException
FileNotFoundException
IOException
-
-
Method Details
-
addTLHCOfClippedRegionToImagePosition
protected void addTLHCOfClippedRegionToImagePosition(AttributeList list, int[] box) throws DicomException - Throws:
DicomException
-
compute2DInPlaneBoundingBoxForSegments
- Throws:
DicomException
-
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) -
clipAllFramesToSpecifiedSize
- Throws:
DicomException
-
main
Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.
- Parameters:
arg
- two parameters, the inputFile, outputFile
-