org.dicom4j.dicom
Class ValueRepresentation

java.lang.Object
  extended by org.dicom4j.dicom.ValueRepresentation
All Implemented Interfaces:
Comparable<ValueRepresentation>

public class ValueRepresentation
extends Object
implements Comparable<ValueRepresentation>

Utilities to support the concept of the DICOM Value Representation (VR), including two byte arrays for each VR, and tester methods that determine whether or not a particular two byte array is a particular type of VR.

Author:
dclunie

Field Summary
static byte[] AE
           
static ValueRepresentation AgeString
          AGE STRING Value Representation
static ValueRepresentation ApplicationEntity
          APPLICATION ENTITY Value Representation
static byte[] AS
           
static byte[] AT
           
static ValueRepresentation AttributeTag
          ATTRIBUTE TAG Value Representation
static ValueRepresentation CodeString
          CODE STRING Value Representation
static byte[] CS
           
static byte[] DA
           
static ValueRepresentation Date
          DATE Value Representation
static ValueRepresentation DateTime
          DATE TIME Value Representation
static ValueRepresentation DecimalString
          DECIMAL STRING Value Representation
static byte[] DS
           
static byte[] DT
           
static byte[] FD
           
static byte[] FL
           
static ValueRepresentation FloatingPointDouble
          FLOATING POINT DOUBLE Value Representation
static ValueRepresentation FloatingPointSingle
          FLOATING POINT SINGLE Value Representation
static ValueRepresentation IntegerString
          INTGER STRING Value Representation
static byte[] IS
           
static byte[] LO
           
static ValueRepresentation LongString
          LONG STRING Value Representation
static ValueRepresentation LongText
          LONG TEXT Value Representation
static byte[] LT
           
static byte[] OB
           
static byte[] OF
           
static ValueRepresentation OtherByteString
          OTHER BYTE STRING Value Representation
static ValueRepresentation OtherFloatString
          OTHER FLOAT STRING Value Representation
static ValueRepresentation OtherWordString
          OTHER WORD STRING Value Representation
static byte[] OW
           
static byte[] OX
           
static ValueRepresentation PersonName
          PERSON NAME Value Representation
static byte[] PN
           
static ValueRepresentation SequenceOfItems
          SEQUENCE OF ITEMS Value Representation
static byte[] SH
           
static ValueRepresentation ShortString
          SHORT STRING Value Representation
static ValueRepresentation ShortText
          SHORT TEXT Value Representation
static ValueRepresentation SignedLong
          SIGNED LONG Value Representation
static ValueRepresentation SignedShort
          SIGNED SHORT Value Representation
static byte[] SL
           
static byte[] SQ
           
static byte[] SS
           
static byte[] ST
           
static ValueRepresentation Time
          TIME Value Representation
static byte[] TM
           
static byte[] UI
           
static byte[] UL
           
static byte[] UN
           
static ValueRepresentation UniqueIdentifier
          UNIQUE IDENTIFIER Value Representation
static ValueRepresentation Unknown
          UNKNOW Value Representation
static ValueRepresentation UnlimitedText
          UNLIMITED TEXT Value Representation
static ValueRepresentation UnsignedLong
          UNSIGNED LONG Value Representation
static ValueRepresentation UnsignedShort
          UNSIGNED SHORT Value Representation
static byte[] US
           
static byte[] UT
           
static byte[] XO
           
static byte[] XS
           
 
Constructor Summary
ValueRepresentation(byte[] aVR)
          create a new VR from bytes
ValueRepresentation(String aVR, String aName)
          creates a new VR from a VR's code and name
 
Method Summary
 int compareTo(ValueRepresentation aValueRepresentation)
           
 boolean equals(Object o)
           
static String getAsString(byte[] vr)
           
 String getName()
           
static ValueRepresentation getValueRepresentation(byte[] aVr)
          TODO
static int getWordLengthOfValueAffectedByEndianness(byte[] vr)
           Get the length of the "word" corresponding to an individual value for this VR, such as may be needed when swapping the endianness of values.
 int hashCode()
           
static boolean isAffectedBySpecificCharacterSet(byte[] vr)
           
static boolean isCodeStringVR(byte[] vr)
           
static boolean isDateTimeVR(byte[] vr)
           
static boolean isDateVR(byte[] vr)
           
static boolean isDecimalStringVR(byte[] vr)
          Deprecated.  
static boolean isFloatDoubleVR(byte[] vr)
           
static boolean isFloatSingleVR(byte[] vr)
           
static boolean isIntegerStringVR(byte[] vr)
           
static boolean isLongStringVR(byte[] vr)
           
static boolean isLongTextVR(byte[] vr)
           
static boolean isOtherByteOrWordVR(byte[] vr)
           
static boolean isOtherByteVR(byte[] vr)
           
static boolean isOtherFloatVR(byte[] vr)
           
static boolean isOtherUnspecifiedVR(byte[] vr)
           
static boolean isOtherUnspecifiedVR(ValueRepresentation aVR)
           
static boolean isOtherWordVR(byte[] vr)
           
static boolean isPersonNameVR(byte[] vr)
           
static boolean isSequenceVR(byte[] vr)
           
static boolean isShortStringVR(byte[] vr)
           
static boolean isShortTextVR(byte[] vr)
           
static boolean isShortValueLengthVR(byte[] vr)
           
static boolean isSignedLongVR(byte[] vr)
           
static boolean isSignedShortVR(byte[] vr)
           
static boolean isTimeVR(byte[] vr)
           
static boolean isUniqueIdentifierVR(byte[] vr)
           
static boolean isUnknownVR(byte[] vr)
           
static boolean isUnlimitedTextVR(byte[] vr)
           
static boolean isUnsignedLongVR(byte[] vr)
           
static boolean isUnsignedShortVR(byte[] vr)
           
static boolean isUnspecifiedShortOrOtherWordVR(byte[] vr)
           
static boolean isUnspecifiedShortOrOtherWordVR(ValueRepresentation aVR)
           
static boolean isUnspecifiedShortVR(byte[] vr)
           
static boolean isUnspecifiedShortVR(ValueRepresentation aVR)
           
 byte[] toBytes()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AE

public static byte[] AE

ApplicationEntity

public static final ValueRepresentation ApplicationEntity
APPLICATION ENTITY Value Representation


AS

public static byte[] AS

AgeString

public static final ValueRepresentation AgeString
AGE STRING Value Representation


AT

public static byte[] AT

AttributeTag

public static final ValueRepresentation AttributeTag
ATTRIBUTE TAG Value Representation


CS

public static byte[] CS

CodeString

public static final ValueRepresentation CodeString
CODE STRING Value Representation


DA

public static byte[] DA

Date

public static final ValueRepresentation Date
DATE Value Representation


DT

public static byte[] DT

DateTime

public static final ValueRepresentation DateTime
DATE TIME Value Representation


DS

public static byte[] DS

DecimalString

public static final ValueRepresentation DecimalString
DECIMAL STRING Value Representation


FD

public static byte[] FD

FloatingPointDouble

public static final ValueRepresentation FloatingPointDouble
FLOATING POINT DOUBLE Value Representation


FL

public static byte[] FL

FloatingPointSingle

public static final ValueRepresentation FloatingPointSingle
FLOATING POINT SINGLE Value Representation


IntegerString

public static final ValueRepresentation IntegerString
INTGER STRING Value Representation


IS

public static byte[] IS

LO

public static byte[] LO

LongString

public static final ValueRepresentation LongString
LONG STRING Value Representation


LongText

public static final ValueRepresentation LongText
LONG TEXT Value Representation


LT

public static byte[] LT

OB

public static byte[] OB

OF

public static byte[] OF

OtherByteString

public static final ValueRepresentation OtherByteString
OTHER BYTE STRING Value Representation


OtherFloatString

public static final ValueRepresentation OtherFloatString
OTHER FLOAT STRING Value Representation


OtherWordString

public static final ValueRepresentation OtherWordString
OTHER WORD STRING Value Representation


OW

public static byte[] OW

OX

public static byte[] OX

PersonName

public static final ValueRepresentation PersonName
PERSON NAME Value Representation


PN

public static byte[] PN

SequenceOfItems

public static final ValueRepresentation SequenceOfItems
SEQUENCE OF ITEMS Value Representation


SH

public static byte[] SH

ShortString

public static final ValueRepresentation ShortString
SHORT STRING Value Representation


ShortText

public static final ValueRepresentation ShortText
SHORT TEXT Value Representation


SignedLong

public static final ValueRepresentation SignedLong
SIGNED LONG Value Representation


SignedShort

public static final ValueRepresentation SignedShort
SIGNED SHORT Value Representation


SL

public static byte[] SL

SQ

public static byte[] SQ

SS

public static byte[] SS

ST

public static byte[] ST

Time

public static final ValueRepresentation Time
TIME Value Representation


TM

public static byte[] TM

UI

public static byte[] UI

UL

public static byte[] UL

UN

public static byte[] UN

UniqueIdentifier

public static final ValueRepresentation UniqueIdentifier
UNIQUE IDENTIFIER Value Representation


Unknown

public static final ValueRepresentation Unknown
UNKNOW Value Representation


UnlimitedText

public static final ValueRepresentation UnlimitedText
UNLIMITED TEXT Value Representation


UnsignedLong

public static final ValueRepresentation UnsignedLong
UNSIGNED LONG Value Representation


UnsignedShort

public static final ValueRepresentation UnsignedShort
UNSIGNED SHORT Value Representation


US

public static byte[] US

UT

public static byte[] UT

XO

public static byte[] XO

XS

public static byte[] XS
Constructor Detail

ValueRepresentation

public ValueRepresentation(byte[] aVR)
create a new VR from bytes

Parameters:
aVR -

ValueRepresentation

public ValueRepresentation(String aVR,
                           String aName)
creates a new VR from a VR's code and name

Parameters:
aVR -
aName -
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(ValueRepresentation aValueRepresentation)
Specified by:
compareTo in interface Comparable<ValueRepresentation>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getName

public String getName()

toBytes

public byte[] toBytes()

toString

public String toString()
Overrides:
toString in class Object

getAsString

public static final String getAsString(byte[] vr)
Parameters:
vr -

getValueRepresentation

public static ValueRepresentation getValueRepresentation(byte[] aVr)
                                                  throws Exception
TODO

Throws:
Exception

getWordLengthOfValueAffectedByEndianness

public static final int getWordLengthOfValueAffectedByEndianness(byte[] vr)

Get the length of the "word" corresponding to an individual value for this VR, such as may be needed when swapping the endianness of values.

Parameters:
vr -

isAffectedBySpecificCharacterSet

public static final boolean isAffectedBySpecificCharacterSet(byte[] vr)
Parameters:
vr -

isCodeStringVR

public static final boolean isCodeStringVR(byte[] vr)
Parameters:
vr -

isDateTimeVR

public static final boolean isDateTimeVR(byte[] vr)
Parameters:
vr -

isDateVR

public static final boolean isDateVR(byte[] vr)
Parameters:
vr -

isDecimalStringVR

public static final boolean isDecimalStringVR(byte[] vr)
Deprecated. 

Parameters:
vr -

isFloatDoubleVR

public static final boolean isFloatDoubleVR(byte[] vr)
Parameters:
vr -

isFloatSingleVR

public static final boolean isFloatSingleVR(byte[] vr)
Parameters:
vr -

isIntegerStringVR

public static final boolean isIntegerStringVR(byte[] vr)
Parameters:
vr -

isLongStringVR

public static final boolean isLongStringVR(byte[] vr)
Parameters:
vr -

isLongTextVR

public static final boolean isLongTextVR(byte[] vr)
Parameters:
vr -

isOtherByteOrWordVR

public static final boolean isOtherByteOrWordVR(byte[] vr)
Parameters:
vr -

isOtherByteVR

public static final boolean isOtherByteVR(byte[] vr)
Parameters:
vr -

isOtherFloatVR

public static final boolean isOtherFloatVR(byte[] vr)
Parameters:
vr -

isOtherUnspecifiedVR

public static final boolean isOtherUnspecifiedVR(byte[] vr)
Parameters:
vr -

isOtherUnspecifiedVR

public static final boolean isOtherUnspecifiedVR(ValueRepresentation aVR)
Parameters:
aVR -

isOtherWordVR

public static final boolean isOtherWordVR(byte[] vr)
Parameters:
vr -

isPersonNameVR

public static final boolean isPersonNameVR(byte[] vr)
Parameters:
vr -

isSequenceVR

public static final boolean isSequenceVR(byte[] vr)
Parameters:
vr -

isShortStringVR

public static final boolean isShortStringVR(byte[] vr)
Parameters:
vr -

isShortTextVR

public static final boolean isShortTextVR(byte[] vr)
Parameters:
vr -

isShortValueLengthVR

public static final boolean isShortValueLengthVR(byte[] vr)
Parameters:
vr -

isSignedLongVR

public static final boolean isSignedLongVR(byte[] vr)
Parameters:
vr -

isSignedShortVR

public static final boolean isSignedShortVR(byte[] vr)
Parameters:
vr -

isTimeVR

public static final boolean isTimeVR(byte[] vr)
Parameters:
vr -

isUniqueIdentifierVR

public static final boolean isUniqueIdentifierVR(byte[] vr)
Parameters:
vr -

isUnknownVR

public static final boolean isUnknownVR(byte[] vr)
Parameters:
vr -

isUnlimitedTextVR

public static final boolean isUnlimitedTextVR(byte[] vr)
Parameters:
vr -

isUnsignedLongVR

public static final boolean isUnsignedLongVR(byte[] vr)
Parameters:
vr -

isUnsignedShortVR

public static final boolean isUnsignedShortVR(byte[] vr)
Parameters:
vr -

isUnspecifiedShortOrOtherWordVR

public static final boolean isUnspecifiedShortOrOtherWordVR(byte[] vr)
Parameters:
vr -

isUnspecifiedShortOrOtherWordVR

public static final boolean isUnspecifiedShortOrOtherWordVR(ValueRepresentation aVR)

isUnspecifiedShortVR

public static final boolean isUnspecifiedShortVR(byte[] vr)
Parameters:
vr -

isUnspecifiedShortVR

public static final boolean isUnspecifiedShortVR(ValueRepresentation aVR)


Copyright © 2009 dicom4j. All Rights Reserved.