|
|||||||||
| 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.SignedShort
public class SignedShort
A concrete class specializing
Attribute for Signed Short (SS)
attributes.
Though an instance of this class may be created using its constructors, there
is also a factory class,
AttributeFactory.
DataElement,
DataElementFactory| Constructor Summary | |
|---|---|
SignedShort(DicomTag t)
Construct an (empty) attribute. |
|
| Method Summary | |
|---|---|
void |
addValue(int v)
Add a(nother) int value after any existing values of this attribute. |
void |
addValue(long v)
Add a(nother) long value after any existing values of this attribute. |
void |
addValue(short v)
Add a(nother) short value after any existing values of this attribute. |
int[] |
getIntegerValues()
Get the values of this attribute as an int array. |
long[] |
getLongValues()
Get the values of this attribute as a long array. |
short[] |
getShortValues()
Get the values of this attribute as a short array. |
String[] |
getStringValues(NumberFormat format)
Get the values of this attribute as strings. |
ValueRepresentation |
getValueRepresentation()
Return the value representation of this data element |
byte[] |
getVR()
Get the value representation of this attribute (SS). |
void |
read(DicomInputStream aStream,
long aLength,
SpecificCharacterSet aCharacterSet)
|
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 SignedShort(DicomTag t)
Construct an (empty) attribute.
t - the tag of the attribute| Method Detail |
|---|
public void addValue(int v)
throws DicomException
DataElement
addValue in class DataElementv -
DicomException
public void addValue(long v)
throws DicomException
DataElement
addValue in class DataElementv -
DicomException
public void addValue(short v)
throws DicomException
DataElement
addValue in class DataElementv -
DicomException
public int[] getIntegerValues()
throws DicomException
DataElementGet the values of this attribute as an int array.
getIntegerValues in class DataElementDicomException
public long[] getLongValues()
throws DicomException
DataElementGet the values of this attribute as a long array.
getLongValues in class DataElementDicomException
public short[] getShortValues()
throws DicomException
DataElementGet the values of this attribute as a short array.
getShortValues in class DataElementDicomException
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
DicomExceptionpublic ValueRepresentation getValueRepresentation()
getValueRepresentation in class DataElementpublic byte[] getVR()
Get the value representation of this attribute (SS).
public void read(DicomInputStream aStream,
long aLength,
SpecificCharacterSet aCharacterSet)
throws IOException,
DicomException
read in class DataElementvl - i -
IOException
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 -
IOException
DicomException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||