public class HierarchicalSOPInstanceReference
extends java.lang.Object
A class to represent the study, series and instance identifiers necessary to retrieve a specific instance using the hierarchical model.
Used, for example, when extracting a map of instance uids to hierarchical references from an SR evidence sequence.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
seriesInstanceUID |
protected java.lang.String |
sopClassUID |
protected java.lang.String |
sopInstanceUID |
protected java.lang.String |
studyInstanceUID |
Constructor and Description |
---|
HierarchicalSOPInstanceReference(AttributeList list)
Construct an instance of a reference from the attributes of the referenced instance itself.
|
HierarchicalSOPInstanceReference(HierarchicalSOPInstanceReference reference)
Construct an instance of a reference to an instance, with its hierarchy.
|
HierarchicalSOPInstanceReference(java.lang.String studyInstanceUID,
java.lang.String seriesInstanceUID,
java.lang.String sopInstanceUID,
java.lang.String sopClassUID)
Construct an instance of a reference to an instance, with its hierarchy.
|
Modifier and Type | Method and Description |
---|---|
static void |
addToHierarchicalReferencesToSOPInstances(AttributeList list,
java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> hierarchicalInstancesBySOPInstanceUID)
Find hierarchical references to instances that may be referenced anywhere in any dataset regardless of depth of nesting.
|
static java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> |
findHierarchicalReferencesToSOPInstances(AttributeList list)
Find hierarchical references to instances that may be referenced anywhere in any dataset regardless of depth of nesting.
|
static java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> |
findHierarchicalReferencesToSOPInstancesInStructuredReport(AttributeList list)
Find hierarchical references to instances that may be referenced in the content tree of an SR object.
|
java.lang.String |
getSeriesInstanceUID()
Get the Series Instance UID.
|
java.lang.String |
getSOPClassUID()
Get the SOP Class UID.
|
java.lang.String |
getSOPInstanceUID()
Get the SOP Instance UID.
|
java.lang.String |
getStudyInstanceUID()
Get the Study Instance UID.
|
static void |
main(java.lang.String[] arg)
Dump the references in an a file (whether it is an SR file or not).
|
java.lang.String |
toString() |
static java.lang.String |
toString(java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> map) |
protected java.lang.String seriesInstanceUID
protected java.lang.String sopClassUID
protected java.lang.String sopInstanceUID
protected java.lang.String studyInstanceUID
public HierarchicalSOPInstanceReference(AttributeList list)
Construct an instance of a reference from the attributes of the referenced instance itself.
list
- the attributes of an instancepublic HierarchicalSOPInstanceReference(HierarchicalSOPInstanceReference reference)
Construct an instance of a reference to an instance, with its hierarchy.
reference
- an existing reference to clonepublic HierarchicalSOPInstanceReference(java.lang.String studyInstanceUID, java.lang.String seriesInstanceUID, java.lang.String sopInstanceUID, java.lang.String sopClassUID)
Construct an instance of a reference to an instance, with its hierarchy.
studyInstanceUID
- the Study Instance UIDseriesInstanceUID
- the Series Instance UIDsopInstanceUID
- the SOP Instance UIDsopClassUID
- the SOP Class UIDpublic static void addToHierarchicalReferencesToSOPInstances(AttributeList list, java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> hierarchicalInstancesBySOPInstanceUID)
Find hierarchical references to instances that may be referenced anywhere in any dataset regardless of depth of nesting.
Detects any occurence of ReferencedSOPInstanceUID and then uses surround context to establish hierarchy.
list
- the top level dataset of an instancehierarchicalInstancesBySOPInstanceUID
- a Map
of String
SOPInstanceUIDs to HierarchicalSOPInstanceReference
that is added to as references are foundpublic static java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> findHierarchicalReferencesToSOPInstances(AttributeList list)
Find hierarchical references to instances that may be referenced anywhere in any dataset regardless of depth of nesting.
Detects any occurence of ReferencedSOPInstanceUID and then uses surround context to establish hierarchy.
list
- the top level dataset of an instanceMap
of String
SOPInstanceUIDs to HierarchicalSOPInstanceReference
public static java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> findHierarchicalReferencesToSOPInstancesInStructuredReport(AttributeList list)
Find hierarchical references to instances that may be referenced in the content tree of an SR object.
Uses the mandatory Current Requested Procedure Evidence Sequence in the top level dataset of an SR object.
list
- the top level dataset of an SR instanceMap
of String
SOPInstanceUIDs to HierarchicalSOPInstanceReference
public java.lang.String getSeriesInstanceUID()
Get the Series Instance UID.
public java.lang.String getSOPClassUID()
Get the SOP Class UID.
public java.lang.String getSOPInstanceUID()
Get the SOP Instance UID.
public java.lang.String getStudyInstanceUID()
Get the Study Instance UID.
public static void main(java.lang.String[] arg)
Dump the references in an a file (whether it is an SR file or not).
arg
- DICOM filepublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toString(java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> map)