|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dicom4j.data.elements.support.DataElement
org.dicom4j.data.elements.UnsignedShort
public class UnsignedShort
Unsigned Short (US) Attribute
| Constructor Summary | |
|---|---|
UnsignedShort(DicomTag aDataElementTag)
creates new Element |
|
UnsignedShort(DicomTag t,
int aUnsigned16)
|
|
| Method Summary | |
|---|---|
void |
addValue(int aUnsigned16)
add a new Value to this element |
int |
getIntegerValue(int aIndex)
|
int[] |
getIntegerValues()
Get the values of this attribute as an int array. |
long |
getPaddedVL()
Get the value length of this attribute, accounting for the need for even-length padding. |
String[] |
getStringValues(NumberFormat format)
Get the values of this attribute as strings. |
int |
getValueMultiplicity()
Get the value multiplicity of this element |
ValueRepresentation |
getValueRepresentation()
get the value representation of this data element |
int[] |
getValues()
|
byte[] |
getVR()
Get the value representation of this attribute (US). |
void |
read(DicomInputStream aStream,
long aLength,
SpecificCharacterSet aCharacterSet)
|
void |
setValue(int aUnsigned16)
|
String |
toString()
Dump the contents of the attribute as a human-readable string. |
void |
write(DicomOutputStream o)
Write the entire attribute (including values) to the output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UnsignedShort(DicomTag aDataElementTag)
aDataElementTag - the tag
public UnsignedShort(DicomTag t,
int aUnsigned16)
throws DicomException
DicomException| Method Detail |
|---|
public void addValue(int aUnsigned16)
throws DicomException
addValue in class DataElementaUnsigned16 - the value
DicomExceptionpublic int getIntegerValue(int aIndex)
public int[] getIntegerValues()
throws DicomException
DataElementGet the values of this attribute as an int array.
getIntegerValues in class DataElementDicomException - thrown if values are not available (such as not supported for
this concrete attribute class)public long getPaddedVL()
DataElementGet the value length of this attribute, accounting for the need for even-length padding.
getPaddedVL in class DataElement
public String[] getStringValues(NumberFormat format)
throws DicomException
DataElementGet the values of this attribute as strings.
The strings may have been cleaned up into a canonical form, such as to remove padding as well as numbers formatted.
getStringValues in class DataElementformat - the format to use for each numerical or decimal value
String
DicomException - thrown if values are not available (such as not supported for
this concrete attribute class)public int getValueMultiplicity()
DataElementGet the value multiplicity of this element
getValueMultiplicity in class DataElementpublic ValueRepresentation getValueRepresentation()
getValueRepresentation in class DataElementpublic int[] getValues()
public byte[] getVR()
Get the value representation of this attribute (US).
public void read(DicomInputStream aStream,
long aLength,
SpecificCharacterSet aCharacterSet)
throws IOException,
DicomException
read in class DataElementIOException
DicomException
public void setValue(int aUnsigned16)
throws DicomException
DicomExceptionpublic String toString()
DataElementDump the contents of the attribute as a human-readable string.
No new line is appended.
The result is of the form:
(0xgggg,0xeeee) VR=<XX> VL=<0xnnnn> <...>
For example:
(0x0018,0x0020) VR=<CS> VL=<0x2> <GR>
toString in class DataElementString value
public void write(DicomOutputStream o)
throws DicomException,
IOException
DataElementWrite the entire attribute (including values) to the output stream.
write in class DataElemento - the output stream
DicomException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||