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 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 static SequenceAttribute |
addCodedSequenceAttribute(AttributeList list,
AttributeTag tag,
CodedSequenceItem csi) |
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(SequenceAttribute saSegmentSequence,
IndexedLabelMapToSegmentation.LabelInformation labelinfo) |
protected void |
addSegmentSequenceItem(SequenceAttribute saSegmentSequence,
int index,
IndexedLabelMapToSegmentation.LabelInformation labelinfo) |
protected java.lang.String |
getStringNoLongerThan64TruncatedIfNecessary(java.lang.String s) |
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 static SequenceAttribute |
newCodedSequenceAttribute(AttributeTag tag,
CodedSequenceItem csi) |
protected java.util.Map<java.lang.Integer,IndexedLabelMapToSegmentation.LabelInformation> |
readLabelMapFile(java.lang.String filename) |
protected void |
setBit(byte[] pixelData,
int f,
int r,
int c,
int rows,
int columns) |
protected static final java.util.Set<java.lang.String> spatialAndRelationalConcepts
protected static final java.util.Set<java.lang.String> tissueConcepts
protected IndexedLabelMapToSegmentation.LabelInformation backgroundLabel
protected java.lang.Integer backgroundIndex
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 java.lang.String getStringNoLongerThan64TruncatedIfNecessary(java.lang.String s)
protected java.util.Map<java.lang.Integer,IndexedLabelMapToSegmentation.LabelInformation> readLabelMapFile(java.lang.String filename) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
protected void addAppropriateSegmentedPropertyCategoryCodeSequence(AttributeList list, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException
DicomException
protected static SequenceAttribute newCodedSequenceAttribute(AttributeTag tag, CodedSequenceItem csi)
protected static SequenceAttribute addCodedSequenceAttribute(AttributeList list, AttributeTag tag, CodedSequenceItem csi)
protected void addSegmentSequenceItem(SequenceAttribute saSegmentSequence, int index, IndexedLabelMapToSegmentation.LabelInformation labelinfo) throws DicomException
DicomException
protected void addSegmentSequenceItem(SequenceAttribute saSegmentSequence, 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 setBit(byte[] pixelData, int f, int r, int c, int rows, int columns)
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
- three 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