|
Trispark JDT 2.50.13 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.archimed.dicom.TagValue
com.archimed.dicom.DataElement
public class DataElement
The DataElement class represents a single data element in a DicomObject. The DataElement contains all the values that are present in the data element and stores them internally in an array. This class also has a number of setters/getters to retrieve and set values in data elements.
| Field Summary |
|---|
| Fields inherited from class com.archimed.dicom.TagValue |
|---|
dataLen, dcm, dcm_type, element, group, val |
| Constructor Summary | |
|---|---|
DataElement()
|
|
| Method Summary | |
|---|---|
void |
addATValue(ATValue atValue)
adds a value to this data element as an ATValue object Supported value representations:AT |
void |
addBigDecimal(java.math.BigDecimal bd)
adds a value to this data element as a BigDecimal object. |
void |
addBytes(byte[] bytes)
adds a value to this data element as a byte array Supported value representations:AE,AS,CS,DA,DS,DT,IS,LO,OB,OW,PN,SH,ST,TM,UI,UN,UT,OB_OW |
void |
addDouble(java.lang.Double d)
adds a value to this data element as a Double Supported value representations:FD |
void |
addFloat(java.lang.Float f)
adds a value to this data element as a Float Supported value representations:FL |
void |
addFloats(float[] floats)
adds a value to this data element at the specified index as a float array Supported value representations:OF |
void |
addInteger(java.lang.Integer i)
adds a value to this data element as a Integer Supported value representations:UL,SL,US,SS,IS |
void |
addLong(java.lang.Long l)
adds a value to this data element as a Long Supported value representations:UL,SL,US,SS,IS |
void |
addPersonName(Person p)
adds a value to this data element as Person object. |
void |
addPersonName(Person p,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
adds a value to this data element as Person object. |
void |
addSequenceItem(DicomObject item)
adds a value to this data element as a DicomObject. |
void |
addShort(java.lang.Short sh)
adds a value to this data element as a Short Supported value representations:UL,SL,US,SS,IS |
void |
addString(java.lang.String s)
adds a value to the data element. |
void |
addString(java.lang.String s,
DicomCharset dicomCharset)
adds a value to the data element using the specified charset for encoding into bytes. |
void |
clear()
clears the data element. |
java.lang.Object |
fromATValue(ATValue atValue)
|
java.lang.Object |
fromBytes(byte[] bytes)
|
java.lang.Object |
fromDicomObject(DicomObject dicomObject)
|
java.lang.Object |
fromDouble(java.lang.Double d)
|
java.lang.Object |
fromFloat(java.lang.Float f)
|
java.lang.Object |
fromFloats(float[] floats)
|
ATValue |
getATValue(int index)
returns an ATValue representation of the value of a data element. Supported value representations:AT |
java.math.BigDecimal |
getBigDecimal(int index)
returns a BigDecimal representation of the value of a data element. Supported value representations:DS A BigDecimal will preserve the precision of the value encoded in the decimal string. |
byte[] |
getBytes(int index)
returns a byte array representation of the value of a data element. Supported value representations: AE,AS,CS,DA,DS,DT,IS,LO,LT,OB,OW,PN,SH,ST,TM,UI,UN,UT |
java.lang.Double |
getDouble(int index)
returns a double representation of the value of a data element. Supported value representations:FD |
int |
getElement()
returns the element number of the data element. |
java.lang.Float |
getFloat(int index)
returns a float representation of the value of a data element. Supported value representations: FL |
float[] |
getFloats(int index)
returns a double representation of the value of a data element. Supported value representations:OF |
int |
getGroup()
returns the group number of the data element. |
java.lang.Integer |
getInteger(int index)
returns an java.lang.Integer representation of the value of a data element. Supported value representations: IS,SL,US,SS |
java.lang.Long |
getLong(int index)
returns a java.lang.Long representation of the value of a data element. Supported value representations: IS,UL,SL,US,SS |
Person |
getPersonName(int index)
returns a Person representation of the value of a data element. Supported value representations: PN |
DicomObject |
getSequenceItem(int index)
returns a DicomObject representation of the value of a data element. |
java.lang.Short |
getShort(int index)
returns a java.lang.Short representation of the value of a data element. Supported value representations: SS |
java.lang.String |
getString(int index)
returns getString(index,true); |
java.lang.String |
getString(int index,
boolean trim)
returns a String representation of the values of a data element, with the optional trimming of insignificant whitespace. This method will return a suitable String representation for all value representations except SQ for which null will be returned. |
int |
getTag()
returns the DDict constant corresponding to the group,element pair of this data element. |
java.lang.Object |
getValue()
returns the value at index 0. |
java.lang.Object |
getValue(int index)
returns the value at the specified index for this data element. |
int |
getValueLength()
returns the 'Value Length' field of a Data Element. |
int |
getVR()
returns the value representation of the data element. |
java.lang.Object |
removeValue(int index)
removes the value at the specified index and shift any subsequent values to the left. |
void |
setATValue(ATValue atValue,
int index)
sets the value in this data element at the specified index as an ATValue object Supported value representations:AT |
void |
setBigDecimal(java.math.BigDecimal bd,
int index)
sets the value in this data element at the specified index as a BigDecimal object. |
void |
setBytes(byte[] bytes,
int index)
sets the value in this data element at the specified index as a byte array Supported value representations:AE,AS,CS,DA,DS,DT,IS,LO,OB,OW,PN,SH,ST,TM,UI,UN,UT,OB_OW |
void |
setDouble(java.lang.Double d,
int index)
sets the value in this data element at the specified index as a Double Supported value representations:FD |
void |
setFloat(java.lang.Float f,
int index)
sets the value in this data element at the specified index as a Float Supported value representations:FL |
void |
setFloats(float[] floats,
int index)
sets the value in this data element at the specified index as a float array Supported value representations:OF |
void |
setInteger(java.lang.Integer i,
int index)
sets the value in this data element at the specified index as a Integer Supported value representations:UL,SL,US,SS,IS |
void |
setLong(java.lang.Long l,
int index)
sets the value in this data element at the specified index as a Long Supported value representations:UL,SL,US,SS,IS |
void |
setPersonName(Person p,
int index)
sets the value at the specified index of this data element as Person object. |
void |
setPersonName(Person p,
int index,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
sets the value at the specified index of this data element as Person object. |
void |
setSequenceItem(DicomObject item,
int index)
sets the value in this data element as a DicomObject. |
void |
setShort(java.lang.Short sh,
int index)
sets the value in this data element at the specified index as a Short Supported value representations:UL,SL,US,SS,IS |
void |
setString(java.lang.String s,
int index)
sets the value at index using a String representation. |
void |
setString(java.lang.String s,
int index,
DicomCharset dicomCharset)
sets the value at index making use of the specified dicomCharset for encoding into bytes. |
int |
size()
returns the size (or multiplicity) of the data element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataElement()
| Method Detail |
|---|
public int getGroup()
getGroup in class TagValuepublic int getElement()
getElement in class TagValuepublic int getTag()
public int size()
size in class TagValuepublic java.lang.Object getValue(int index)
getValue in class TagValueindex - int
public java.lang.Object getValue()
getValue in class TagValuepublic int getVR()
public int getValueLength()
public void clear()
public java.lang.Object removeValue(int index)
index - int
public java.lang.String getString(int index)
throws DicomException
index - int
DicomException
public java.lang.String getString(int index,
boolean trim)
index - int the index of the valuetrim - boolean
public void setString(java.lang.String s,
int index)
throws DicomException
s - Stringindex - int
DicomException
public void addString(java.lang.String s)
throws DicomException
s - String
DicomException
public void setString(java.lang.String s,
int index,
DicomCharset dicomCharset)
throws DicomException
s - Stringindex - intdicomCharset - DicomCharset
DicomException
public void addString(java.lang.String s,
DicomCharset dicomCharset)
throws DicomException
s - StringdicomCharset - DicomCharset
DicomException
public java.lang.Short getShort(int index)
throws DicomException
index - int
DicomException
public void setShort(java.lang.Short sh,
int index)
throws DicomException
sh - Shortindex - int
DicomException
public void addShort(java.lang.Short sh)
throws DicomException
sh - Short
DicomException
public java.lang.Integer getInteger(int index)
throws DicomException
index - int
DicomException
public void setInteger(java.lang.Integer i,
int index)
throws DicomException
i - Integerindex - int
DicomException
public void addInteger(java.lang.Integer i)
throws DicomException
i - Integer
DicomException
public java.lang.Long getLong(int index)
throws DicomException
index - int
DicomException
public void setLong(java.lang.Long l,
int index)
throws DicomException
l - Longindex - int
DicomException
public void addLong(java.lang.Long l)
throws DicomException
l - Long
DicomException
public Person getPersonName(int index)
throws DicomException
index - int
DicomException
public void setPersonName(Person p,
int index)
throws DicomException
p - Personindex - int
DicomException
public void setPersonName(Person p,
int index,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
throws DicomException
p - Personindex - intsingleByteCharset - DicomCharset charset for encoding of the single byte component groupideographicCharset - DicomCharset charset for encoding of the ideographic component groupphoneticCharset - DicomCharset charset for encoding of the phonetic component group
DicomException
public void addPersonName(Person p)
throws DicomException
p - Person
DicomException
public void addPersonName(Person p,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
throws DicomException
p - PersonsingleByteCharset - DicomCharsetideographicCharset - DicomCharsetphoneticCharset - DicomCharset
DicomException
public byte[] getBytes(int index)
throws DicomException
index - int
DicomException
public void setBytes(byte[] bytes,
int index)
throws DicomException
bytes - byte[]index - int
DicomException
public void addBytes(byte[] bytes)
throws DicomException
bytes - byte[]
DicomException
public java.lang.Object fromBytes(byte[] bytes)
throws DicomException
DicomException
public java.lang.Float getFloat(int index)
throws DicomException
index - int
DicomException
public void setFloat(java.lang.Float f,
int index)
throws DicomException
f - Floatindex - int
DicomException
public void addFloat(java.lang.Float f)
throws DicomException
f - Float
DicomException
public java.lang.Object fromFloat(java.lang.Float f)
throws DicomException
DicomException
public java.lang.Double getDouble(int index)
throws DicomException
index - int
DicomException
public void setDouble(java.lang.Double d,
int index)
throws DicomException
d - Doubleindex - int
DicomException
public void addDouble(java.lang.Double d)
throws DicomException
d - Double
DicomException
public java.lang.Object fromDouble(java.lang.Double d)
throws DicomException
DicomException
public float[] getFloats(int index)
throws DicomException
index - int
DicomException
public void setFloats(float[] floats,
int index)
throws DicomException
floats - float[]index - int
DicomException
public void addFloats(float[] floats)
throws DicomException
floats - Float
DicomException
public java.lang.Object fromFloats(float[] floats)
throws DicomException
DicomException
public DicomObject getSequenceItem(int index)
throws DicomException
index - int
DicomException
public void setSequenceItem(DicomObject item,
int index)
throws DicomException
item - DicomObjectindex - int
DicomException
public void addSequenceItem(DicomObject item)
throws DicomException
item - DicomObject
DicomException
public java.lang.Object fromDicomObject(DicomObject dicomObject)
throws DicomException
DicomException
public ATValue getATValue(int index)
throws DicomException
index - int
DicomException
public void setATValue(ATValue atValue,
int index)
throws DicomException
atValue - ATValueindex - int
DicomException
public void addATValue(ATValue atValue)
throws DicomException
atValue - ATValue
DicomException
public java.lang.Object fromATValue(ATValue atValue)
throws DicomException
DicomException
public java.math.BigDecimal getBigDecimal(int index)
throws DicomException
index - int
DicomException
public void setBigDecimal(java.math.BigDecimal bd,
int index)
throws DicomException
bd - BigDecimalindex - int
DicomException
public void addBigDecimal(java.math.BigDecimal bd)
throws DicomException
bd - BigDecimal
DicomException
|
Trispark JDT 2.50.13 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||