Class DicomDictionaryBase
- Direct Known Subclasses:
DicomDictionary
The DicomDictionaryBase
class
is an abstract class for creating and accessing a dictionary of DICOM
attributes and associated information.
Defines methods for creating a dictionary of DICOM attributes and associated information, and implements methods for accessing that information.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a dictionary by calling all create methods of the concrete sub-class. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Concrete sub-classes implement this method to create a map of attribute full names from tags for each tag in the dictionary.protected abstract void
Concrete sub-classes implement this method to create a map of information entities for each tag in the dictionary.protected abstract void
Concrete sub-classes implement this method to create a map of attribute names from tags for each tag in the dictionary.protected abstract void
Concrete sub-classes implement this method to create a map of tags from attribute names for each tag in the dictionary.protected abstract void
Concrete sub-classes implement this method to create a list of all tags in the dictionary.protected abstract void
Concrete sub-classes implement this method to create a map of value representations for each tag in the dictionary.Get the string full name of an attribute from its tag.Get the information entity (patient, study, and so on) of an attribute.Get the string name of an attribute from its tag.getTagFromName
(String name) Get the tag of an attribute from its string name.Get anIterator
to iterate through every tag in the dictionary.byte[]
Get the value representation of an attribute.static void
Unit test.
-
Field Details
-
tagList
-
valueRepresentationsByTag
-
informationEntityByTag
-
nameByTag
-
tagByName
-
fullNameByTag
-
-
Constructor Details
-
DicomDictionaryBase
public DicomDictionaryBase()Instantiate a dictionary by calling all create methods of the concrete sub-class.
-
-
Method Details
-
createTagList
protected abstract void createTagList()Concrete sub-classes implement this method to create a list of all tags in the dictionary.
-
createValueRepresentationsByTag
protected abstract void createValueRepresentationsByTag()Concrete sub-classes implement this method to create a map of value representations for each tag in the dictionary.
-
createInformationEntityByTag
protected abstract void createInformationEntityByTag()Concrete sub-classes implement this method to create a map of information entities for each tag in the dictionary.
-
createTagByName
protected abstract void createTagByName()Concrete sub-classes implement this method to create a map of tags from attribute names for each tag in the dictionary.
-
createNameByTag
protected abstract void createNameByTag()Concrete sub-classes implement this method to create a map of attribute names from tags for each tag in the dictionary.
-
createFullNameByTag
protected abstract void createFullNameByTag()Concrete sub-classes implement this method to create a map of attribute full names from tags for each tag in the dictionary.
-
getValueRepresentationFromTag
Get the value representation of an attribute.
- Parameters:
tag
- the tag of the attribute- Returns:
- the value representation of the attribute as an array of two bytes
-
getInformationEntityFromTag
Get the information entity (patient, study, and so on) of an attribute.
- Parameters:
tag
- the tag of the attribute- Returns:
- the information entity of the attribute
-
getTagFromName
Get the tag of an attribute from its string name.
Though the DICOM standard does not formally define names to be used as keys for attributes, the convention used here is to use the name from the PS 3.6 Name field and remove spaces, apostrophes, capitalize first letters of words and so on to come up with a unique name for each attribute.
- Parameters:
name
- the string name of the attribute- Returns:
- the tag of the attribute
-
getNameFromTag
Get the string name of an attribute from its tag.
- Parameters:
tag
- the tag of the attribute- Returns:
- the string name of the attribute
- See Also:
-
getFullNameFromTag
Get the string full name of an attribute from its tag.
The full name may not be unique, so do not use it as a key (e.g., "Group Length").
- Parameters:
tag
- the tag of the attribute- Returns:
- the string full name of the attribute
-
getTagIterator
Get an
Iterator
to iterate through every tag in the dictionary.The order in which the dictionary attributes are returned is by ascending tag value.
- Returns:
- an iterator
- See Also:
-
main
Unit test.
- Parameters:
arg
- ignored
-