public class IndexedLabelMapToSegmentation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
IndexedLabelMapToSegmentation.LabelInformation |
Modifier and Type | Field and Description |
---|---|
protected java.lang.Integer |
backgroundIndex |
protected IndexedLabelMapToSegmentation.LabelInformation |
backgroundLabel |
protected static java.util.Set<java.lang.String> |
spatialAndRelationalConcepts |
protected boolean |
suppressFramesForBackgroundSegment |
protected static java.util.Set<java.lang.String> |
tissueConcepts |
Constructor and Description |
---|
IndexedLabelMapToSegmentation(java.lang.String inputFilename,
java.lang.String labelFilename,
java.lang.String outputFilename,
java.lang.String referenceImageFilename,
java.lang.String seriesNumber,
java.lang.String seriesDescription,
java.lang.String contentLabel,
java.lang.String contentDescription,
java.lang.String contentCreatorName) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list,
IndexedLabelMapToSegmentation.LabelInformation labelinfo) |
protected java.util.Map<java.lang.Integer,java.lang.Integer> |
addSegmentSequence(AttributeList list,
java.util.Set<java.lang.Integer> usedLabels,
java.util.Map<java.lang.Integer,IndexedLabelMapToSegmentation.LabelInformation> labelMap,
java.util.Set<java.lang.Integer> unrecognizedLabels) |
protected void |
addSegmentSequenceItem(int segmentNumber,
SequenceAttribute saSegmentSequence,
IndexedLabelMapToSegmentation.LabelInformation labelinfo) |
protected void |
addSegmentSequenceItem(int segmentNumber,
SequenceAttribute saSegmentSequence,
int index,
IndexedLabelMapToSegmentation.LabelInformation labelinfo) |
static void |
main(java.lang.String[] arg)
Read a DICOM image containing pixel values that are indices into a label map and the corresponding map and convert to a DICOM Segmentation object.
|
protected java.util.SortedMap<java.lang.Integer,IndexedLabelMapToSegmentation.LabelInformation> |
readLabelMapFile(java.lang.String filename) |
static void |
setBit(byte[] pixelData,
int f,
int r,
int c,
int rows,
int columns) |
protected java.lang.Integer backgroundIndex
protected IndexedLabelMapToSegmentation.LabelInformation backgroundLabel
protected static final java.util.Set<java.lang.String> spatialAndRelationalConcepts
protected boolean suppressFramesForBackgroundSegment
protected static final java.util.Set<java.lang.String> tissueConcepts
public IndexedLabelMapToSegmentation(java.lang.String inputFilename, java.lang.String labelFilename, java.lang.String outputFilename, java.lang.String referenceImageFilename, java.lang.String seriesNumber, java.lang.String seriesDescription, java.lang.String contentLabel, java.lang.String contentDescription, java.lang.String contentCreatorName) throws java.io.IOException, java.lang.NumberFormatException, DicomException
java.io.IOException
java.lang.NumberFormatException
DicomException
protected void addAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException
DicomException
protected java.util.Map<java.lang.Integer,java.lang.Integer> addSegmentSequence(AttributeList list, java.util.Set<java.lang.Integer> usedLabels, java.util.Map<java.lang.Integer,IndexedLabelMapToSegmentation.LabelInformation> labelMap, java.util.Set<java.lang.Integer> unrecognizedLabels) throws DicomException
DicomException
protected void addSegmentSequenceItem(int segmentNumber, SequenceAttribute saSegmentSequence, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException
DicomException
protected void addSegmentSequenceItem(int segmentNumber, SequenceAttribute saSegmentSequence, int index, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException
DicomException
public static void main(java.lang.String[] arg)
Read a DICOM image containing pixel values that are indices into a label map and the corresponding map and convert to a DICOM Segmentation object.
arg
- four or more parameters, the inputFile, the CSV file containing a list of labels and their coded values, the outputFile, the reference image file, and optionally, the series number, series description, content label, content description and content creatorprotected java.util.SortedMap<java.lang.Integer,IndexedLabelMapToSegmentation.LabelInformation> readLabelMapFile(java.lang.String filename) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
public static void setBit(byte[] pixelData, int f, int r, int c, int rows, int columns)