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 and 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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addTLHCOfClippedRegionToImagePosition(AttributeList list,
int[] box) |
protected void |
clipAllFramesToSpecifiedSize(AttributeList list,
int[] box) |
protected int[] |
compute2DInPlaneBoundingBoxForSegments(AttributeList list) |
protected static int |
getBit(byte[] pixelData,
int f,
int r,
int c,
int rows,
int columns) |
static void |
main(java.lang.String[] arg)
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) |
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.
inputFileName
- the input file nameoutputFileName
- the output file nameDicomException
java.io.FileNotFoundException
java.io.IOException
protected void addTLHCOfClippedRegionToImagePosition(AttributeList list, int[] box) throws DicomException
DicomException
protected void clipAllFramesToSpecifiedSize(AttributeList list, int[] box) throws DicomException
DicomException
protected int[] compute2DInPlaneBoundingBoxForSegments(AttributeList list) throws DicomException
DicomException
protected static int getBit(byte[] pixelData, int f, int r, int c, int rows, int columns)
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.
arg
- two parameters, the inputFile, outputFileprotected static void setBit(byte[] pixelData, int f, int r, int c, int rows, int columns)