Class FileDicomTagInfo

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_TAG_VERSION
      The default DICOM version string to assign to tags.
      protected FileDicomKey key
      The DICOM tag 'group,element' key indicating what tag this information pertains to.
      protected java.lang.String keyword
      The tag keyword (no spaces).
      protected java.lang.String name
      The real world DICOM tag name.
      private static long serialVersionUID
      Use serialVersionUID for interoperability.
      protected int valueMultiplicity
      Allowed value multiplicity (vm) for this tag.
      protected FileDicomTagInfo.VR valueRepresentation
      DICOM value representation (vr) for this tag.
      protected java.lang.String version
      Version of the tag.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDicomTagInfo​(int group, int element, FileDicomTagInfo.VR vr, int vm, java.lang.String keyword, java.lang.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, java.lang.String version, FileDicomTagInfo.VR vr, int vm, java.lang.String keyword, java.lang.String name)
      Constructor that takes all the information needed about the tag except for the value.
      FileDicomTagInfo​(FileDicomKey dicomKey, FileDicomTagInfo.VR vr, int vm, java.lang.String keyword, java.lang.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, java.lang.String version, FileDicomTagInfo.VR vr, int vm, java.lang.String keyword, java.lang.String name)
      Constructor that takes all the information needed about the tag except for the value and DICOM revision number.
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • DEFAULT_TAG_VERSION

        public static final java.lang.String DEFAULT_TAG_VERSION
        The default DICOM version string to assign to tags.
        See Also:
        Constant Field Values
      • key

        protected FileDicomKey key
        The DICOM tag 'group,element' key indicating what tag this information pertains to.
      • keyword

        protected java.lang.String keyword
        The tag keyword (no spaces).
      • name

        protected java.lang.String name
        The real world DICOM tag name.
      • valueMultiplicity

        protected int valueMultiplicity
        Allowed value multiplicity (vm) for this tag.
      • valueRepresentation

        protected FileDicomTagInfo.VR valueRepresentation
        DICOM value representation (vr) for this tag.
      • version

        protected java.lang.String 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 Detail

      • FileDicomTagInfo

        public FileDicomTagInfo​(FileDicomKey dicomKey,
                                FileDicomTagInfo.VR vr,
                                int vm,
                                java.lang.String keyword,
                                java.lang.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 tag
        vr - the value representation
        vm - the value multiplicity
        keyword - the keyword (no spaces)
        name - the real world name
        See Also:
        DEFAULT_TAG_VERSION
      • FileDicomTagInfo

        public FileDicomTagInfo​(FileDicomKey dicomKey,
                                java.lang.String version,
                                FileDicomTagInfo.VR vr,
                                int vm,
                                java.lang.String keyword,
                                java.lang.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 tag
        version - the DICOM revision (version) number (eg. '3' or 'GEM')
        vr - the value representation
        vm - the value multiplicity
        keyword - the keyword (no spaces)
        name - the real world name
      • FileDicomTagInfo

        public FileDicomTagInfo​(int group,
                                int element,
                                FileDicomTagInfo.VR vr,
                                int vm,
                                java.lang.String keyword,
                                java.lang.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 representation
        vm - the value multiplicity
        keyword - the keyword (no spaces)
        name - the real world name
        See Also:
        DEFAULT_TAG_VERSION
      • FileDicomTagInfo

        public FileDicomTagInfo​(int group,
                                int element,
                                java.lang.String version,
                                FileDicomTagInfo.VR vr,
                                int vm,
                                java.lang.String keyword,
                                java.lang.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 representation
        vm - the value multiplicity
        keyword - the keyword (no spaces)
        name - the real world name
    • Method Detail

      • getType

        public static final DicomType getType​(FileDicomTagInfo.VR vr)
        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

        public boolean equals​(java.lang.Object obj)
        Tests whether a tag info object contains the same information as this tag info object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - A object (hopefully a non-null FileDicomTagInfo, but not required).
        Returns:
        Whether all of the tag info (key, keyword, name, vm, vr, version) in the other tag is the same as this one. False if the tag is null or not a FileDicomTagInfo.
      • getKey

        public FileDicomKey getKey()
        Return the dicom tag key ('group,element') that this information object describes.
        Returns:
        The dicom tag key described by this information object.
      • getKeyword

        public final java.lang.String getKeyword()
        Returns the keyword for this tag, a word with no spaces.
        Returns:
        the keyword
      • getName

        public final java.lang.String 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

        public final FileDicomTagInfo.VR 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

        public final FileDicomTagInfo.VR 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

        public final java.lang.String 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

        public final int getVersionNumber()
                                   throws java.lang.NumberFormatException
        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:
        java.lang.NumberFormatException - when a tag is a Private Tag.
      • hashCode

        public final int hashCode()
        Returns the unique identifier's hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code.
      • setKey

        public final void setKey​(FileDicomKey key)
        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

        public final void setValueRepresentation​(FileDicomTagInfo.VR vr)
        Sets the value representation; used only for explicit vr.
        Parameters:
        vr - the value representation
      • toString

        public final java.lang.String toString()
        Return information about the tag, in string form.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A tag information string.
      • finalize

        public void finalize()
        Overrides:
        finalize in class java.lang.Object