Package gov.nih.mipav.model.file
Class FileDicomTagInfo
java.lang.Object
gov.nih.mipav.model.structures.ModelSerialCloneable
gov.nih.mipav.model.file.FileDicomTagInfo
- All Implemented Interfaces:
Serializable,Cloneable
Information about a DICOM tag, stored in the DicomDictionary table once for each DICOM tag. This information is read
in from the dicom dictionary on disk.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default DICOM version string to assign to tags.protected FileDicomKeyThe DICOM tag 'group,element' key indicating what tag this information pertains to.protected StringThe tag keyword (no spaces).protected StringThe real world DICOM tag name.private static final longUse serialVersionUID for interoperability.protected intAllowed value multiplicity (vm) for this tag.protected FileDicomTagInfo.VRDICOM value representation (vr) for this tag.protected StringVersion of the tag. -
Constructor Summary
ConstructorsConstructorDescriptionFileDicomTagInfo(int group, int element, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value and DICOM revision number.FileDicomTagInfo(int group, int element, String version, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value.FileDicomTagInfo(FileDicomKey dicomKey, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value and DICOM revision number (which we assume to be 3).FileDicomTagInfo(FileDicomKey dicomKey, String version, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value and DICOM revision number. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether a tag info object contains the same information as this tag info object.voidfinalize()getKey()Return the dicom tag key ('group,element') that this information object describes.final StringReturns the keyword for this tag, a word with no spaces.final StringgetName()Accessor that returns the real world name of this tag.final FileDicomTagInfo.VRgetType()Accessor that returns the type of tag, depending on the value representation.static final DicomTypeAccessor that returns the type of tag, depending on a value representation value.final intAccessor that returns the value multiplicity of the tag.final FileDicomTagInfo.VRAccessor that returns the value representation of the tag.final StringAccessor that returns the DICOM version of the tag.final intAccessor to the DICOM version number for this tag.final inthashCode()Returns the unique identifier's hash code.final voidsetKey(FileDicomKey key) Sets the dicom tag's key.final voidSets the value representation; used only for explicit vr.final StringtoString()Return information about the tag, in string form.Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
DEFAULT_TAG_VERSION
The default DICOM version string to assign to tags.- See Also:
-
key
The DICOM tag 'group,element' key indicating what tag this information pertains to. -
keyword
The tag keyword (no spaces). -
name
The real world DICOM tag name. -
valueMultiplicity
protected int valueMultiplicityAllowed value multiplicity (vm) for this tag. -
valueRepresentation
DICOM value representation (vr) for this tag. -
version
Version of the tag. Usually '2' or '3', although some tags get strings like 'GEM' or 'TSH' when the tag is from a private manufacturer.
-
-
Constructor Details
-
FileDicomTagInfo
public FileDicomTagInfo(FileDicomKey dicomKey, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value and DICOM revision number (which we assume to be 3).- Parameters:
dicomKey- The group and element which uniquely define this tagvr- the value representationvm- the value multiplicitykeyword- the keyword (no spaces)name- the real world name- See Also:
-
FileDicomTagInfo
public FileDicomTagInfo(FileDicomKey dicomKey, String version, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value and DICOM revision number.- Parameters:
dicomKey- The group and element which uniquely define this tagversion- the DICOM revision (version) number (eg. '3' or 'GEM')vr- the value representationvm- the value multiplicitykeyword- the keyword (no spaces)name- the real world name
-
FileDicomTagInfo
public FileDicomTagInfo(int group, int element, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value and DICOM revision number.- Parameters:
group- the integer group word (in hexadecimal)element- the integer element word (in hexadecimal)vr- the value representationvm- the value multiplicitykeyword- the keyword (no spaces)name- the real world name- See Also:
-
FileDicomTagInfo
public FileDicomTagInfo(int group, int element, String version, FileDicomTagInfo.VR vr, int vm, String keyword, String name) Constructor that takes all the information needed about the tag except for the value.- Parameters:
group- the integer group word (in hexadecimal)element- the integer element word (in hexadecimal)version- the DICOM revision (version) number (eg. '3' or 'GEM')vr- the value representationvm- the value multiplicitykeyword- the keyword (no spaces)name- the real world name
-
-
Method Details
-
getType
Accessor that returns the type of tag, depending on a value representation value. This allows the reader to read in the tags properly.- Parameters:
vr- value representation- Returns:
- the type (int, double, short, String, or unknown)
-
equals
Tests whether a tag info object contains the same information as this tag info object. -
getKey
Return the dicom tag key ('group,element') that this information object describes.- Returns:
- The dicom tag key described by this information object.
-
getKeyword
Returns the keyword for this tag, a word with no spaces.- Returns:
- the keyword
-
getName
Accessor that returns the real world name of this tag. For private tags, the name is the value.- Returns:
- the name of this tag
-
getType
Accessor that returns the type of tag, depending on the value representation. This allows the reader to read in the tags properly. This method will be so much simpler when (if) the tags are seperated out as individual classes.- Returns:
- the type (int, double, short, String, or unknown)
-
getValueMultiplicity
public final int getValueMultiplicity()Accessor that returns the value multiplicity of the tag. The value multiplicity is how many instances of this value representation (VR) there can be in one tag.- Returns:
- the value multiplicity
-
getValueRepresentation
Accessor that returns the value representation of the tag. The value representation allows the reader the read and interpret the tag properly. Because private tags are not unique, the VR is null and they may be read and/or displayed improperly.- Returns:
- the value representation
-
getVersion
Accessor that returns the DICOM version of the tag. Although not needed to understand a value, it is important to the dictionary.- Returns:
- the String that is the DICOM version.
-
getVersionNumber
Accessor to the DICOM version number for this tag. Returns it as a number so numerical comparisons (greater-than, equality, etc) can be made. Also, throws a NumberFormatException for private tags.- Returns:
- the version number.
- Throws:
NumberFormatException- when a tag is a Private Tag.
-
hashCode
public final int hashCode()Returns the unique identifier's hash code. -
setKey
Sets the dicom tag's key. This is only used to specify the values of wild card tags stored in the DicomDictionary- Parameters:
vr- the value representation
-
setValueRepresentation
Sets the value representation; used only for explicit vr.- Parameters:
vr- the value representation
-
toString
Return information about the tag, in string form. -
finalize
public void finalize()
-