Package com.pixelmed.apps
Class ShrinkSegmentationToBoundingBox
- java.lang.Object
-
- com.pixelmed.apps.ShrinkSegmentationToBoundingBox
-
public class ShrinkSegmentationToBoundingBox extends java.lang.ObjectA class of static methods to read DICOM segmentation images, and shrink their extent to the minimum bounding box surrounding the segments.
-
-
Constructor Summary
Constructors Constructor Description ShrinkSegmentationToBoundingBox(java.lang.String inputFileName, java.lang.String outputFileName)Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTLHCOfClippedRegionToImagePosition(AttributeList list, int[] box)protected voidclipAllFramesToSpecifiedSize(AttributeList list, int[] box)protected int[]compute2DInPlaneBoundingBoxForSegments(AttributeList list)protected static intgetBit(byte[] pixelData, int f, int r, int c, int rows, int columns)static voidmain(java.lang.String[] arg)Read a DICOM segmentation image, and shrink its extent to the minimum bounding box surrounding the segments.protected static voidsetBit(byte[] pixelData, int f, int r, int c, int rows, int columns)
-
-
-
Constructor Detail
-
ShrinkSegmentationToBoundingBox
public ShrinkSegmentationToBoundingBox(java.lang.String inputFileName, java.lang.String outputFileName) throws DicomException, java.io.FileNotFoundException, java.io.IOExceptionRead 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:
DicomExceptionjava.io.FileNotFoundExceptionjava.io.IOException
-
-
Method Detail
-
addTLHCOfClippedRegionToImagePosition
protected void addTLHCOfClippedRegionToImagePosition(AttributeList list, int[] box) throws DicomException
- Throws:
DicomException
-
compute2DInPlaneBoundingBoxForSegments
protected int[] compute2DInPlaneBoundingBoxForSegments(AttributeList list) throws DicomException
- 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
protected void clipAllFramesToSpecifiedSize(AttributeList list, int[] box) throws DicomException
- Throws:
DicomException
-
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
-
-