Package com.pixelmed.dicom
Class ContentItemFactory.NumericContentItem
java.lang.Object
com.pixelmed.dicom.ContentItem
com.pixelmed.dicom.ContentItemWithValue
com.pixelmed.dicom.ContentItemFactory.NumericContentItem
- All Implemented Interfaces:
TreeNode
- Enclosing class:
- ContentItemFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Double
protected String
protected CodedSequenceItem
protected Long
protected Integer
protected CodedSequenceItem
Fields inherited from class com.pixelmed.dicom.ContentItemWithValue
conceptName, referencedContentItemIdentifier, valueType
Fields inherited from class com.pixelmed.dicom.ContentItem
observationDateTime, observationUID, relationshipType
-
Constructor Summary
ConstructorsConstructorDescriptionNumericContentItem
(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, double floatingPointValue, CodedSequenceItem units) NumericContentItem
(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, int numerator, long denominator, CodedSequenceItem units, String observationDateTime, String observationUID) NumericContentItem
(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem qualifier) Construct numeric content item with emptyMeasuredValueSequence
with qualifier explaining why it is empty.NumericContentItem
(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier) NumericContentItem
(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, String numericValue, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier, String observationDateTime, String observationUID) NumericContentItem
(ContentItem parent, AttributeList list) NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, double floatingPointValue, CodedSequenceItem units) NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, int numerator, long denominator, CodedSequenceItem units) NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem qualifier) Construct SR numeric content item with emptyMeasuredValueSequence
with qualifier explaining why it is empty.NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, CodedSequenceItem units) NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier) NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier) NumericContentItem
(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier, String observationDateTime, String observationUID) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
constructOnlyQualifier
(CodedSequenceItem qualifier) protected void
doCommonConstructorStuff
(boolean isNotSR, String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue) Get a string representation of the concept name and the value of the concept.Get a string representation of the value of the concept.double
long
int
getUnits()
boolean
boolean
toString()
Get a human-readable string representation of the content item.Methods inherited from class com.pixelmed.dicom.ContentItemWithValue
contentItemNameMatchesCodeValueAndCodingSchemeDesignator, getConceptName, getConceptNameCodeMeaning, getConceptNameCodeValue, getConceptNameCodingSchemeDesignator, getValueType
Methods inherited from class com.pixelmed.dicom.ContentItem
addChild, addSibling, children, contentItemNameMatchesCodeValueAndCodingSchemeDesignator, getAllowsChildren, getAttributeList, getChildAt, getChildCount, getGraphicData, getGraphicType, getIndex, getNamedChild, getNamedChild, getObservationDateTime, getObservationUID, getParent, getParentAsContentItem, getPositionInTreeToUseAsReferencedContentItemIdentifier, getReferencedContentItemIdentifier, getReferencedContentItemIdentifierArray, getReferencedSOPClassUID, getReferencedSOPInstanceUID, getRelationshipType, getSingleStringValueOrNull, getSingleStringValueOrNullOfNamedChild, getSingleStringValueOrNullOfNamedChild, isLeaf
-
Field Details
-
numericValue
-
floatingPointValue
-
rationalNumeratorValue
-
rationalDenominatorValue
-
units
-
qualifier
-
-
Constructor Details
-
NumericContentItem
- Parameters:
parent
- parent content item to add tolist
- the list of attributes for this content item- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, double floatingPointValue, CodedSequenceItem units) throws DicomException - Parameters:
parent
- parent content item to add toisNotSR
- affects whether value type is NUM (false) or NUMERIC (true)relationshipType
- relationship typeconceptName
- coded concept namefloatingPointValue
- will be converted to stringunits
- code for the units- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, double floatingPointValue, CodedSequenceItem units) throws DicomException - Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namefloatingPointValue
- will be converted to stringunits
- code for the units- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, int numerator, long denominator, CodedSequenceItem units, String observationDateTime, String observationUID) throws DicomException - Parameters:
parent
- parent content item to add toisNotSR
- affects whether value type is NUM (false) or NUMERIC (true)relationshipType
- relationship typeconceptName
- coded concept namenumerator
- integer numeratordenominator
- integer denominatorunits
- code for the unitsobservationDateTime
- Observation DateTime (or null or empty if none)observationUID
- Observation UID (or null or empty if none)- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, int numerator, long denominator, CodedSequenceItem units) throws DicomException - Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namenumerator
- integer numeratordenominator
- integer denominatorunits
- code for the units- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier) throws DicomException - Parameters:
parent
- parent content item to add toisNotSR
- affects whether value type is NUM (false) or NUMERIC (true)relationshipType
- relationship typeconceptName
- coded concept namenumericValue
- numeric value as decimal stringunits
- code for the unitsqualifier
- code for qualifier- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, CodedSequenceItem units) throws DicomException - Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namenumericValue
- numeric value as decimal stringunits
- code for the units- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier) throws DicomException - Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namenumericValue
- numeric value as decimal stringunits
- code for the unitsqualifier
- code for qualifier- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, String numericValue, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier, String observationDateTime, String observationUID) throws DicomException - Parameters:
parent
- parent content item to add toisNotSR
- affects whether value type is NUM (false) or NUMERIC (true)relationshipType
- relationship typeconceptName
- coded concept namenumericValue
- numeric value as decimal stringfloatingPointValue
- numeric value as floating pointrationalNumeratorValue
- integer numeratorrationalDenominatorValue
- integer denominatorunits
- code for the unitsqualifier
- code for qualifierobservationDateTime
- Observation DateTime (or null or empty if none)observationUID
- Observation UID (or null or empty if none)- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier) throws DicomException - Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namenumericValue
- numeric value as decimal stringfloatingPointValue
- numeric value as floating pointrationalNumeratorValue
- integer numeratorrationalDenominatorValue
- integer denominatorunits
- code for the unitsqualifier
- code for qualifier- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, String numericValue, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier, String observationDateTime, String observationUID) throws DicomException - Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namenumericValue
- numeric value as decimal stringfloatingPointValue
- numeric value as floating pointrationalNumeratorValue
- integer numeratorrationalDenominatorValue
- integer denominatorunits
- code for the unitsqualifier
- code for qualifierobservationDateTime
- Observation DateTime (or null or empty if none)observationUID
- Observation UID (or null or empty if none)- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, boolean isNotSR, String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem qualifier) throws DicomException Construct numeric content item with empty
MeasuredValueSequence
with qualifier explaining why it is empty.- Parameters:
parent
- parent content item to add toisNotSR
- affects whether value type is NUM (false) or NUMERIC (true)relationshipType
- relationship typeconceptName
- coded concept namequalifier
- code for qualifier- Throws:
DicomException
- if error in DICOM encoding
-
NumericContentItem
public NumericContentItem(ContentItem parent, String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem qualifier) throws DicomException Construct SR numeric content item with empty
MeasuredValueSequence
with qualifier explaining why it is empty.- Parameters:
parent
- parent content item to add torelationshipType
- relationship typeconceptName
- coded concept namequalifier
- code for qualifier- Throws:
DicomException
- if error in DICOM encoding
-
-
Method Details
-
doCommonConstructorStuff
protected void doCommonConstructorStuff(boolean isNotSR, String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier, Double floatingPointValue, Integer rationalNumeratorValue, Long rationalDenominatorValue) throws DicomException - Throws:
DicomException
-
constructOnlyQualifier
-
getQualifier
- Returns:
- the qualifier, or null if none
-
getUnits
- Returns:
- the units
-
getNumericValue
- Returns:
- the decimal string numeric value, or null if none
-
hasFloatingPointValue
public boolean hasFloatingPointValue()- Returns:
- true if there is a floating point value encoded
-
getFloatingPointValue
public double getFloatingPointValue()- Returns:
- the floating point value
-
hasRationalValue
public boolean hasRationalValue()- Returns:
- true if there is a rational value encoded with an integer numerator and denominator
-
getRationalNumeratorValue
public int getRationalNumeratorValue()- Returns:
- the rational numerator value
-
getRationalDenominatorValue
public long getRationalDenominatorValue()- Returns:
- the rational denomninator value
-
getConceptValue
Description copied from class:ContentItemWithValue
Get a string representation of the value of the concept.
The exact form of the returned string is specific to the type of ContentItem.
- Specified by:
getConceptValue
in classContentItemWithValue
- Returns:
- a String representation of the name and value, or an empty string
-
getConceptNameAndValue
Description copied from class:ContentItemWithValue
Get a string representation of the concept name and the value of the concept.
The exact form of the returned string is specific to the type of ContentItem.
- Overrides:
getConceptNameAndValue
in classContentItemWithValue
- Returns:
- a String representation of the name and value, or an empty string
-
toString
Description copied from class:ContentItemWithValue
Get a human-readable string representation of the content item.
- Overrides:
toString
in classContentItemWithValue
- Returns:
- the string representation of the content item
-