public class ShrinkSegmentationToBoundingBox extends 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(String inputFileName,
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(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(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.
inputFileName - the input file nameoutputFileName - the output file nameDicomExceptionFileNotFoundExceptionIOExceptionprotected void addTLHCOfClippedRegionToImagePosition(AttributeList list, int[] box) throws DicomException
DicomExceptionprotected void clipAllFramesToSpecifiedSize(AttributeList list, int[] box) throws DicomException
DicomExceptionprotected int[] compute2DInPlaneBoundingBoxForSegments(AttributeList list) throws DicomException
DicomExceptionprotected static int getBit(byte[] pixelData,
int f,
int r,
int c,
int rows,
int columns)
public static void main(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)