org.dicom4j.data.elements
Class OtherWordString

java.lang.Object
  extended by org.dicom4j.data.elements.support.DataElement
      extended by org.dicom4j.data.elements.OtherWordString

public class OtherWordString
extends DataElement

Other Word String (OW) DataElement

Since:
0.0.0
Author:
Laurent Lecomte

Constructor Summary
OtherWordString(DicomTag t)
           Construct an (empty) attribute.
 
Method Summary
 short[] getShortValues()
           Get the values of this attribute as a short array.
 ValueRepresentation getValueRepresentation()
          Return the value representation of this data element
 byte[] getVR()
          Deprecated. Get the value representation of this attribute (OW).

 boolean isAvailableAsString()
          used to check if the element's value can be available as a string.
 void read(DicomInputStream aStream, long aLength, SpecificCharacterSet aCharacterSet)
           
 void setValues(short[] v)
          Replace any existing values with the supplied array of short.
 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 org.dicom4j.data.elements.support.DataElement
addValue, addValue, addValue, addValue, addValue, addValue, addValue, clear, getByteValues, getDelimitedStringValues, getDelimitedStringValues, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDoubleValues, getDoubleValues, getFloatValues, getIntegerValues, getIntegerValues, getLongValues, getLongValues, getName, getOriginalStringValues, getPaddedVL, getSingleDoubleValueOrDefault, getSingleDoubleValueOrDefault, getSingleIntegerValue, getSingleIntegerValue, getSingleIntegerValue, getSingleIntegerValueOrDefault, getSingleLongValueOrDefault, getSingleLongValueOrDefault, getSingleStringValue, getSingleStringValue, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrNull, getSingleStringValueOrNull, getSingleStringValueOrNull, getSingleStringValueOrNull, getStringValues, getStringValues, getStringValues, getStringValues, getTag, getValueLength, getValueMultiplicity, isGroupLength, isValid, read, removeValues, setValues, setValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OtherWordString

public OtherWordString(DicomTag t)

Construct an (empty) attribute.

Parameters:
t - the tag of the attribute
Method Detail

getShortValues

public short[] getShortValues()
                       throws DicomException
Description copied from class: DataElement

Get the values of this attribute as a short array.

Overrides:
getShortValues in class DataElement
Returns:
the values as an array of short
Throws:
DicomException

getValueRepresentation

public ValueRepresentation getValueRepresentation()
Return the value representation of this data element

Specified by:
getValueRepresentation in class DataElement
Returns:
the value representation (OW)

getVR

public byte[] getVR()
Deprecated. Get the value representation of this attribute (OW).

Returns:
'O','W' in ASCII as a two byte array; see

isAvailableAsString

public boolean isAvailableAsString()
Description copied from class: DataElement
used to check if the element's value can be available as a string.
must be check before getSrtingxxx methods

Overrides:
isAvailableAsString in class DataElement
Returns:
true if value is available as a string

read

public void read(DicomInputStream aStream,
                 long aLength,
                 SpecificCharacterSet aCharacterSet)
          throws IOException,
                 DataElementException
Specified by:
read in class DataElement
Parameters:
vl -
i -
Throws:
IOException
DicomException
DataElementException

write

public void write(DicomOutputStream o)
           throws IOException,
                  DataElementException
Description copied from class: DataElement

Write the entire attribute (including values) to the output stream.

Specified by:
write in class DataElement
Parameters:
o -
Throws:
IOException
DicomException
DataElementException

setValues

public void setValues(short[] v)
               throws DataElementException
Description copied from class: DataElement
Replace any existing values with the supplied array of short.

Overrides:
setValues in class DataElement
Parameters:
v -
Throws:
DicomException
DataElementException

toString

public String toString()
Description copied from class: DataElement

Dump 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>
 

Overrides:
toString in class DataElement
Returns:
a single String value


Copyright © 2009 dicom4j. All Rights Reserved.