public class IndexedLabelMapToSegmentation extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
IndexedLabelMapToSegmentation.LabelInformation |
Modifier and Type | Field and Description |
---|---|
protected Integer |
backgroundIndex |
protected IndexedLabelMapToSegmentation.LabelInformation |
backgroundLabel |
protected static Set<String> |
spatialAndRelationalConcepts |
protected boolean |
suppressFramesForBackgroundSegment |
protected static Set<String> |
tissueConcepts |
Constructor and Description |
---|
IndexedLabelMapToSegmentation(String inputFilename,
String labelFilename,
String outputFilename,
String referenceImageFilename,
String seriesNumber,
String seriesDescription,
String contentLabel,
String contentDescription,
String contentCreatorName) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list,
IndexedLabelMapToSegmentation.LabelInformation labelinfo) |
protected Map<Integer,Integer> |
addSegmentSequence(AttributeList list,
Set<Integer> usedLabels,
Map<Integer,IndexedLabelMapToSegmentation.LabelInformation> labelMap,
Set<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(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 SortedMap<Integer,IndexedLabelMapToSegmentation.LabelInformation> |
readLabelMapFile(String filename) |
static void |
setBit(byte[] pixelData,
int f,
int r,
int c,
int rows,
int columns) |
protected Integer backgroundIndex
protected IndexedLabelMapToSegmentation.LabelInformation backgroundLabel
protected boolean suppressFramesForBackgroundSegment
public IndexedLabelMapToSegmentation(String inputFilename, String labelFilename, String outputFilename, String referenceImageFilename, String seriesNumber, String seriesDescription, String contentLabel, String contentDescription, String contentCreatorName) throws IOException, NumberFormatException, DicomException
protected void addAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException
DicomException
protected Map<Integer,Integer> addSegmentSequence(AttributeList list, Set<Integer> usedLabels, Map<Integer,IndexedLabelMapToSegmentation.LabelInformation> labelMap, Set<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(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 SortedMap<Integer,IndexedLabelMapToSegmentation.LabelInformation> readLabelMapFile(String filename) throws IOException, NumberFormatException
IOException
NumberFormatException
public static void setBit(byte[] pixelData, int f, int r, int c, int rows, int columns)