|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dicom4j.dicom.DicomTag
public class DicomTag
a DICOM Tag (a Group and a Element)
An instance is immutable
Safe to use in hashed collections such as
Hashtable and HashMap
(i.e. it takes care to implement
hashCode() and
equals() consistently).
| Constructor Summary | |
|---|---|
DicomTag(int group,
int element)
Construct a DICOM data element (attribute) tag. |
|
DicomTag(int aGroup,
int aElement,
String aName)
Creates a new DICOM Tag |
|
DicomTag(int aGroup,
int aElement,
String aName,
ValueRepresentation aVR)
Creates a new DICOM Tag |
|
| Method Summary | |
|---|---|
int |
compareTo(DicomTag o)
Compare tags based on the numeric order of their group and then element values. |
boolean |
equals(Object aObject)
|
int |
getElement()
Return the element value. |
String |
getElementAsString()
|
int |
getGroup()
Get the group value. |
String |
getGroupAsString()
|
String |
getName()
Return the name of this Tag |
ValueRepresentation |
getValueRepresentation()
|
int |
hashCode()
Get a hash value which represents the tag. |
boolean |
isGroupLength()
Is the tag a group length tag ? |
boolean |
isPrivate()
Is the tag a private tag ? |
String |
toString()
Get a human-readable rendering of the tag. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DicomTag(int group,
int element)
Construct a DICOM data element (attribute) tag.
group - the 16 bit unsigned binary groupelement - the 16 bit unsigned binary element
public DicomTag(int aGroup,
int aElement,
String aName)
Creates a new DICOM Tag
aGroup - the 16 bit unsigned binary groupaElement - the 16 bit unsigned binary elementaName - the name of this tag
public DicomTag(int aGroup,
int aElement,
String aName,
ValueRepresentation aVR)
Creates a new DICOM Tag
aGroup - the 16 bit unsigned binary groupaElement - the 16 bit unsigned binary elementaName - the name of this tagaVR - the ValueRepresentation| Method Detail |
|---|
public int compareTo(DicomTag o)
Compare tags based on the numeric order of their group and then element values.
compareTo in interface Comparable<DicomTag>o - the AttributeTag to compare
this AttributeTag against
public boolean equals(Object aObject)
equals in class ObjectaObject - the AttributeTag to compare
this AttributeTag against
public int getElement()
Return the element value.
public String getElementAsString()
public int getGroup()
Get the group value.
public String getGroupAsString()
public String getName()
public ValueRepresentation getValueRepresentation()
public int hashCode()
Get a hash value which represents the tag.
This method is implemented to override
java.lang.Object.hashCode() so as to
comply with the contract that two tags that return true for equals() will
return the same value for hashCode(), which would not be the case unless
overridden (i.e. two allocations of a tag with the same group and element
would be equal but the default implementation would return different hash
values).
hashCode in class Objectpublic boolean isGroupLength()
Is the tag a group length tag ?
Group Length tags are those with Element equals to 0.
public boolean isPrivate()
Is the tag a private tag ?
Private tags are those with odd-numbered groups.
public String toString()
Get a human-readable rendering of the tag.
This takes the form "(0xgggg,0xeeee)" where gggg and eeee are the zero-padded hexadecimal representations of the group and element respectively.
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||