Package com.pixelmed.convert
Class IndexedLabelMapToSegmentation
java.lang.Object
com.pixelmed.convert.IndexedLabelMapToSegmentation
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list, IndexedLabelMapToSegmentation.LabelInformation labelinfo) addSegmentSequence(AttributeList list, Set<Integer> usedLabels, Map<Integer, IndexedLabelMapToSegmentation.LabelInformation> labelMap, Set<Integer> unrecognizedLabels) protected voidaddSegmentSequenceItem(int segmentNumber, SequenceAttribute saSegmentSequence, int index, IndexedLabelMapToSegmentation.LabelInformation labelinfo) protected voidaddSegmentSequenceItem(int segmentNumber, SequenceAttribute saSegmentSequence, IndexedLabelMapToSegmentation.LabelInformation labelinfo) static voidRead a DICOM image containing pixel values that are indices into a label map and the corresponding map and convert to a DICOM Segmentation object.readLabelMapFile(String filename) static voidsetBit(byte[] pixelData, int f, int r, int c, int rows, int columns)
-
Field Details
-
suppressFramesForBackgroundSegment
protected boolean suppressFramesForBackgroundSegment -
spatialAndRelationalConcepts
-
tissueConcepts
-
backgroundLabel
-
backgroundIndex
-
-
Constructor Details
-
IndexedLabelMapToSegmentation
public IndexedLabelMapToSegmentation(String inputFilename, String labelFilename, String outputFilename, String referenceImageFilename, String seriesNumber, String seriesDescription, String contentLabel, String contentDescription, String contentCreatorName) throws IOException, NumberFormatException, DicomException
-
-
Method Details
-
readLabelMapFile
protected SortedMap<Integer,IndexedLabelMapToSegmentation.LabelInformation> readLabelMapFile(String filename) throws IOException, NumberFormatException - Throws:
IOExceptionNumberFormatException
-
addAppropriateSegmentedPropertyCategoryCodeSequence
protected void addAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException - Throws:
DicomException
-
addSegmentSequenceItem
protected void addSegmentSequenceItem(int segmentNumber, SequenceAttribute saSegmentSequence, int index, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException - Throws:
DicomException
-
addSegmentSequenceItem
protected void addSegmentSequenceItem(int segmentNumber, SequenceAttribute saSegmentSequence, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException - Throws:
DicomException
-
addSegmentSequence
protected Map<Integer,Integer> addSegmentSequence(AttributeList list, Set<Integer> usedLabels, Map<Integer, IndexedLabelMapToSegmentation.LabelInformation> labelMap, Set<Integer> unrecognizedLabels) throws DicomException- Throws:
DicomException
-
setBit
public static void setBit(byte[] pixelData, int f, int r, int c, int rows, int columns) -
main
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.
- Parameters:
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 creator
-