|
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.GroupList
com.archimed.dicom.DicomObject
public class DicomObject
A DicomObject represents a DICOM dataset and is essentially a collection
of DataElements. DicomObjects can be initialized from a DICOM File or Dicom stream
by using DicomReader and can be written to a DICOM file or stream with a DicomWriter.
The DicomObject class provides a number of setters/getters for creating new DataElements
and for manipulating and quering the values of DataElementS. There are setters/getters that
accept the DDict constants for identifying tag and there are corresponding setters/getters
that take a group,element pair as arguments. New implementations that make use of this class
should use the typesafe getters/setters like setString,addString,getString,setShort,addShort,getShort,
... .
getString is supported for all DICOM types.
Padding to even length is taken care of internally by JDT and when setting/manipulating values of
DataElements.
The Java type for the DICOM type OF is a float[] array. The OF type must always have a multiplicity
of one, which means that maximum one float[] array of arbitrary length can be set in a tag
of type OF.
The conversion table below shows for every setter/adder, the supported DICOM types.
| Java Type | DICOM Type |
| setShort/addShort | UL,SL,US,SS,IS |
| setATValue/addATValue | AT |
| setInteger/addInteger | UL,SL,US,SS,IS |
| setLong/addLong | UL,SL,US,SS,IS |
| setFloat/addFloat | FL |
| setDouble/addDouble | FD |
| setBigDecimal/addBigDecimal | DS |
| setBytes/addBytes | AE,AS,CS,DA,DS,DT,IS,LO,OB,OW,PN,SH,ST,TM,UI,UN,UT,OB_OW |
| setFloats/addFloats | OF |
| setString/addString | LT,ST,UT,LO,SH,AE,CT,DT,TM,UI,AS,PN,DA,DS,FL,IS,SS,US,US_SS,SL,UL,FD,OB,OW,OB_OW,UN |
| setPersonName/addPersonName | PN |
| setSequenceItem/addSequenceItem | SQ |
| Java Type | DICOM Type |
| getShort | SS |
| getATValue | AT |
| getInteger | SL,US,SS,IS |
| getLong | UL,SL,US,SS,IS |
| getFloat | FL |
| getDouble | FD |
| getBigDecimal | DS |
| getBytes | AE,AS,CS,DA,DS,DT,IS,LO,LT,OB,OW,PN,SH,ST,TM,UI,UN,UT |
| getFloats | OF |
| getString | all DICOM Value Representations except SQ |
| getPersonName | PN |
| getSequenceItem | SQ |
| Field Summary | |
|---|---|
protected JdtLogger |
log
|
| Constructor Summary | |
|---|---|
DicomObject()
Constructs an empty DicomObject |
|
| Method Summary | |
|---|---|
void |
addATValue_ge(int group,
int element,
ATValue atValue)
|
void |
addATValue(int dname,
ATValue atValue)
|
void |
addBigDecimal_ge(int group,
int element,
java.math.BigDecimal bd)
|
void |
addBigDecimal(int dname,
java.math.BigDecimal bd)
|
void |
addBytes_ge(int group,
int element,
byte[] bytes)
|
void |
addBytes(int dname,
byte[] bytes)
|
void |
addDouble_ge(int group,
int element,
java.lang.Double d)
|
void |
addDouble(int dname,
java.lang.Double d)
|
void |
addFloat_ge(int group,
int element,
java.lang.Float f)
|
void |
addFloat(int dname,
java.lang.Float f)
|
void |
addFloats_ge(int group,
int element,
float[] floats)
|
void |
addFloats(int dname,
float[] floats)
|
void |
addInteger_ge(int group,
int element,
java.lang.Integer i)
|
void |
addInteger(int dname,
java.lang.Integer i)
|
void |
addLong_ge(int group,
int element,
java.lang.Long l)
|
void |
addLong(int dname,
java.lang.Long l)
|
void |
addPersonName_ge(int group,
int element,
Person person)
|
void |
addPersonName_ge(int group,
int element,
Person person,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
adds a Person value to a PN data element. |
void |
addPersonName(int dname,
Person person)
|
void |
addPersonName(int dname,
Person person,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
adds a Person value to a PN data element. |
void |
addSequenceItem_ge(int group,
int element,
DicomObject dicomObject)
|
void |
addSequenceItem(int dname,
DicomObject item)
|
void |
addShort_ge(int group,
int element,
java.lang.Short sh)
|
void |
addShort(int dname,
java.lang.Short sh)
|
void |
addString_ge(int group,
int element,
java.lang.String s)
|
void |
addString(int dname,
java.lang.String s)
|
void |
append_ge(int g,
int e,
java.lang.Object o)
Does the same as append(dname, o) using a (group, element) - pair instead of 'dname' |
void |
append(int dname,
java.lang.Object o)
This methods takes an Object 'o', converts it to the appropriate Java type and appends it after the last value of the data element with name 'dname'. |
long |
calculateOffset(int seq,
int i,
int transferSyntax,
boolean sequenceUndefined,
boolean grouplens)
This method calculates the offset of the 'i'th item of sequence 'seq', starting from the very first byte of the Dicom file. |
java.util.Vector |
deleteItem_ge(int g,
int e)
Does the same as deleteItem(dname) using a (group, element) - pair instead of 'dname' |
java.lang.Object |
deleteItem_ge(int g,
int e,
int i)
Does the same as deleteItem(dname, i) using a (group, element) - pair instead of 'dname' |
java.util.Vector |
deleteItem(int dname)
Deletes the data element named 'dname' from this DicomObject and returns the values of that data element as a Vector. |
java.lang.Object |
deleteItem(int dname,
int i)
Deletes the value at index 'i' from the data element called 'dname' The elements with a higher index are all shifted downwards. |
DicomCharset[] |
dicomCharsets()
returns the specific character sets specified in the SpecificCharacterSet data element as an array of DicomCharset objects. |
void |
dumpVRs(java.io.OutputStream os)
prints all data elements in this DicomObject to an OutputStream in a nice, orderly fashion. |
void |
dumpVRs(java.io.OutputStream os,
boolean metainfo)
prints all data elements in this DicomObject to an OutputStream in a nice, orderly fashion. |
java.lang.Object |
get_ge(int g,
int e)
Does the same as get(dname) using a (group, element) - pair instead of 'dname'. |
java.lang.Object |
get_ge(int g,
int e,
int i)
Does the same as get(dname, i) using a (group, element) - pair instead of 'dname' |
java.lang.Object |
get(int dname)
This method finds the first value of the data element named 'dname' and returns it as its default Java type. |
java.lang.Object |
get(int dname,
int i)
This method finds the value at index 'i' of the data element named 'dname' and returns it as its default Java type. |
ATValue |
getATValue_ge(int group,
int element,
int index)
|
ATValue |
getATValue(int dname,
int index)
|
java.math.BigDecimal |
getBigDecimal_ge(int group,
int element,
int index)
|
java.math.BigDecimal |
getBigDecimal(int dname,
int index)
|
byte[] |
getBytes_ge(int group,
int element,
int index)
|
byte[] |
getBytes(int dname,
int index)
|
DataElement |
getDataElement(int dname)
returns the tag value as a DataElement for the specified DDict constant or null if this object does not contain such a DataElement. |
DataElement |
getDataElement(int group,
int element)
returns the tag value as a DataElement for the specified group and element number or null if this object does not contain such a DataElement. |
java.lang.Double |
getDouble_ge(int group,
int element,
int index)
|
java.lang.Double |
getDouble(int dname,
int index)
|
DicomObject |
getFileMetaInformation()
File Meta Information is stored in a separate DicomObject. |
java.lang.Float |
getFloat_ge(int group,
int element,
int index)
|
java.lang.Float |
getFloat(int dname,
int index)
|
float[] |
getFloats_ge(int group,
int element,
int index)
|
float[] |
getFloats(int dname,
int index)
|
int |
getI_ge(int g,
int e)
Does the same as getI(dname) using a (group, element) - pair instead of 'dname' |
int |
getI_ge(int g,
int e,
int i)
Does the same as getI(dname, i) using a (group, element) - pair instead of 'dname' |
int |
getI(int dname)
Gets the same value as in get(dname) and, if possible, returns it as an int. |
int |
getI(int dname,
int i)
Gets the same value as in get(dname, i) and, if possible, returns it as an int. |
java.lang.Integer |
getInteger_ge(int group,
int element,
int index)
|
java.lang.Integer |
getInteger(int dname,
int index)
|
java.lang.Long |
getLong_ge(int group,
int element,
int index)
|
java.lang.Long |
getLong(int dname,
int index)
|
long |
getOffset(int seq,
int i)
returns the offset of the 'i'th SequenceItem 'seq'. |
DicomObject |
getParent()
returns the parent DicomObject. |
Person |
getPersonName_ge(int group,
int element,
int index)
|
Person |
getPersonName(int dname,
int index)
|
byte[] |
getPreamble()
returns the 128 byte preamble or null if the preamble is not set in a new DicomObject. |
java.lang.String |
getS_ge(int g,
int e)
Does the same as getS(dname) using a (group, element) - pair instead of 'dname' |
java.lang.String |
getS_ge(int g,
int e,
int i)
Gets the same value as in get_ge(g, e, i) and, if possible, returns it as a String. |
java.lang.String |
getS(int dname)
Gets the same value as in get(dname) and, if possible, returns it as a String. |
java.lang.String |
getS(int dname,
int i)
Gets the same value as in get(dname, i) and, if possible, returns it as a String. |
int |
getSeqItemLenState()
returns the length encoding of this DicomObject in case it is a sequence item in a sequence. |
int |
getSeqLenState_ge(int group,
int element)
returns the length encoding of a sequence with specified group and element number. |
int |
getSeqLenState(int tag)
returns the length encoding of a sequence with specified tag. |
DicomObject |
getSequenceItem_ge(int group,
int element,
int index)
|
DicomObject |
getSequenceItem(int dname,
int index)
|
java.lang.Short |
getShort_ge(int group,
int element,
int index)
|
java.lang.Short |
getShort(int dname,
int index)
|
int |
getSize_ge(int g,
int e)
Does the same as getSize(dname)
using a (group, element) - pair instead of 'dname' |
int |
getSize(int dname)
Method returns the number of values in the data element with name 'dname'. |
java.lang.String |
getString_ge(int group,
int element,
int index)
|
java.lang.String |
getString_ge(int group,
int element,
int index,
boolean trim)
|
java.lang.String |
getString(int dname,
int index)
|
java.lang.String |
getString(int dname,
int index,
boolean trim)
|
int |
getType_ge(int group,
int element)
Returns the VR type of a tag in this DicomObject. |
int |
getType(int dname)
Returns the VR type of a tag in this DicomObject. |
DataElement |
newDataElement_ge(int group,
int element)
creates a new DataElement for the specified group and element and adds it to the DicomObject. |
DataElement |
newDataElement(int dname)
creates a new DataElement for the specified DDict constant and adds it to the DicomObject. |
void |
read(java.io.InputStream in)
Does the same as read(in, readpixels),
with the 'readpixels' boolean set to true. |
void |
read(java.io.InputStream in,
boolean readpixels)
reads a DICOM dataset from an InputStream and stores the data elements in this DicomObject. |
void |
read(java.io.InputStream in,
int transfersyntax,
boolean readpixels)
reads a DICOM Dataset from an InputStream. |
void |
remove_ge(int group,
int element)
|
void |
remove(int dname)
|
void |
set_ge(int g,
int e,
java.lang.Object o)
Does the same as set(dname, o) using a (group, element) - pair instead of 'dname' |
void |
set_ge(int g,
int e,
java.lang.Object o,
int i)
Does the same as set(dname, o, i) using a (group, element) - pair instead of 'dname' |
void |
set(int dname,
java.lang.Object o)
This methods takes an Object 'o', converts it to the approprate Java type and replaces the data element with name 'dname' with it. |
void |
set(int dname,
java.lang.Object o,
int i)
This methods takes an Object 'o', converts it to the approprate Java type and Overwrites the value at index 'i' of the data element named 'dname' with it. |
void |
setATValue_ge(int group,
int element,
ATValue atValue,
int index)
|
void |
setATValue(int dname,
ATValue atValue,
int index)
|
void |
setBigDecimal_ge(int group,
int element,
java.math.BigDecimal bd,
int index)
|
void |
setBigDecimal(int dname,
java.math.BigDecimal bd,
int index)
|
void |
setBytes_ge(int group,
int element,
byte[] bytes,
int index)
|
void |
setBytes(int dname,
byte[] bytes,
int index)
|
void |
setDouble_ge(int group,
int element,
java.lang.Double d,
int index)
|
void |
setDouble(int dname,
java.lang.Double d,
int index)
|
DicomObject |
setFileMetaInformation(DicomObject fmi)
Use this method to specify a new file meta information object that will be used when writing to a Dicom file. |
void |
setFloat_ge(int group,
int element,
java.lang.Float f,
int index)
|
void |
setFloat(int dname,
java.lang.Float f,
int index)
|
void |
setFloats_ge(int group,
int element,
float[] floats,
int index)
|
void |
setFloats(int dname,
float[] floats,
int index)
|
void |
setInteger_ge(int group,
int element,
java.lang.Integer i,
int index)
|
void |
setInteger(int dname,
java.lang.Integer i,
int index)
|
void |
setLong_ge(int group,
int element,
java.lang.Long l,
int index)
|
void |
setLong(int dname,
java.lang.Long l,
int index)
|
void |
setPersonName_ge(int group,
int element,
Person person,
int index)
|
void |
setPersonName_ge(int group,
int element,
Person person,
int index,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
sets a value of a PN element at the specified tag and index. |
void |
setPersonName(int dname,
Person person,
int index)
|
void |
setPersonName(int dname,
Person person,
int index,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
sets a value of a PN data element at the specified tag and index. |
void |
setPreamble(byte[] preamble)
sets the 128 byte preamble. |
void |
setSeqItemLenState(int state)
sets the length encoding of this DicomObject in case it is a sequence item |
void |
setSeqLenState_ge(int group,
int element,
int seqLenState)
sets the length encoding of a sequence. |
void |
setSeqLenState(int tag,
int seqLenState)
sets the length encoding of a sequence. |
void |
setSequenceItem_ge(int group,
int element,
DicomObject item,
int index)
|
void |
setSequenceItem(int dname,
DicomObject item,
int index)
|
void |
setShort_ge(int group,
int element,
java.lang.Short sh,
int index)
|
void |
setShort(int dname,
java.lang.Short sh,
int index)
|
void |
setString_ge(int group,
int element,
java.lang.String s,
int index)
|
void |
setString(int dname,
java.lang.String s,
int index)
|
void |
setType_ge(int group,
int element,
int vrtype)
Use this method to further specify the type for tags which the type is currently tUS_US or tOW_OB.Only these VR type changes are allowed: tUS_US -> tUS or tSS tOW_OB -> tOW or tOB |
void |
setType(int dname,
int vrtype)
Use this method to further specify the type for tags which type is currently tUS_US or tOW_OB. |
void |
write(java.io.OutputStream out,
boolean dicomfile)
writes this DICOM data set to an OutputStream as a DICOM file or DICOM stream. |
void |
write(java.io.OutputStream out,
boolean dicomfile,
int transfersyntax,
boolean seq_undef)
writes this DICOM data set to an OutputStream as a DICOM file or DICOM stream. |
void |
write(java.io.OutputStream out,
boolean dicomfile,
int transfersyntax,
boolean seq_undef,
boolean grouplens)
Does the same as write(out, f, ts, seq_undef)
and, in addition, lets you specify whether to write grouplengths. |
| Methods inherited from class com.archimed.dicom.GroupList |
|---|
addGroups, clear, containsGroup, copyGroup, enumerateVRs, enumerateVRs, isEmpty, numberOfElements, numberOfGroups, removeGroup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JdtLogger log
| Constructor Detail |
|---|
public DicomObject()
| Method Detail |
|---|
public DicomObject getParent()
public DicomCharset[] dicomCharsets()
public void setSeqItemLenState(int state)
state - int one of DicomObject.SEQITEM_NEW,DicomObject.SEQITEM_UNDEFLEN,DicomObject.SEQITEM_DEFLENpublic int getSeqItemLenState()
public void setPreamble(byte[] preamble)
preamble - public byte[] getPreamble()
public DataElement newDataElement(int dname)
dname -
public DataElement newDataElement_ge(int group,
int element)
group - element -
public void set(int dname,
java.lang.Object o)
throws DicomException
o - if 'null' is given, the data element becomes empty
DicomException
public void set_ge(int g,
int e,
java.lang.Object o)
throws DicomException
set(dname, o) using a (group, element) - pair instead of 'dname'
DicomException
public void append(int dname,
java.lang.Object o)
throws DicomException
o - if 'null' is given, nothing will happen.
DicomException
public void append_ge(int g,
int e,
java.lang.Object o)
throws DicomException
append(dname, o) using a (group, element) - pair instead of 'dname'
o - - if 'null' is given, nothing will happen.
DicomException
public void set(int dname,
java.lang.Object o,
int i)
throws DicomException
o - if 'null' is given, nothing will happen.
DicomException
public void set_ge(int g,
int e,
java.lang.Object o,
int i)
throws DicomException
set(dname, o, i) using a (group, element) - pair instead of 'dname'
DicomException
public int getType(int dname)
throws DicomException
dname - one of the DDict constants representing a tag
DicomException - if no tag is found in this DicomObject
public int getType_ge(int group,
int element)
throws DicomException
group - groupelement - element
DicomException - if no tag is found in this DicomObject
public void setType(int dname,
int vrtype)
throws DicomException
dname - one of the DDict constants representing a tagvrtype - one of the DDict constants such as tST,tUL, ...
DicomException - if the tag is not found or the type conversion is
illegal
public void setType_ge(int group,
int element,
int vrtype)
throws DicomException
group - element - vrtype - one of the DDict constants such as tST,tUL, ...
DicomException - if the tag is not found or the type conversion is
illegal
public void setSeqLenState_ge(int group,
int element,
int seqLenState)
throws DicomException
group - element - seqLenState - one of VR.SEQ_NEW,VR.SEQ_UNDEFLEN,VR.SEQ_DEFLEN
DicomException
public void setSeqLenState(int tag,
int seqLenState)
throws DicomException
tag - seqLenState - one of VR.SEQ_NEW,VR.SEQ_UNDEFLEN,VR.SEQ_DEFLEN
DicomException
public int getSeqLenState_ge(int group,
int element)
throws DicomException
group - element -
DicomException
public int getSeqLenState(int tag)
throws DicomException
tag -
DicomExceptionpublic int getSize(int dname)
public int getSize_ge(int g,
int e)
getSize(dname)
using a (group, element) - pair instead of 'dname'
public long calculateOffset(int seq,
int i,
int transferSyntax,
boolean sequenceUndefined,
boolean grouplens)
Offsets
seq - the name of the sequence the item is ini - the number of the itemtransferSyntax - the transfer syntax that will be used for writing this DicomObjectsequenceUndefined - what kind of sequence encoding will be used when writing this DicomObjectgrouplens - boolean indicating whether grouplengths will be written
public long getOffset(int seq,
int i)
DDict.tUNKNOWN.
If the sequence or item aren't found, 0 is returned.
calculateOffset(seq, item, ts, su, grouplen).
public java.lang.String getString(int dname,
int index)
throws DicomException
DicomException
public java.lang.String getString(int dname,
int index,
boolean trim)
throws DicomException
DicomException
public java.lang.String getString_ge(int group,
int element,
int index)
throws DicomException
DicomException
public java.lang.String getString_ge(int group,
int element,
int index,
boolean trim)
throws DicomException
DicomException
public void setString(int dname,
java.lang.String s,
int index)
throws DicomException
DicomException
public void setString_ge(int group,
int element,
java.lang.String s,
int index)
throws DicomException
DicomException
public void addString(int dname,
java.lang.String s)
throws DicomException
DicomException
public void addString_ge(int group,
int element,
java.lang.String s)
throws DicomException
DicomException
public java.math.BigDecimal getBigDecimal(int dname,
int index)
throws DicomException
DicomException
public java.math.BigDecimal getBigDecimal_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setBigDecimal(int dname,
java.math.BigDecimal bd,
int index)
throws DicomException
DicomException
public void setBigDecimal_ge(int group,
int element,
java.math.BigDecimal bd,
int index)
throws DicomException
DicomException
public void addBigDecimal(int dname,
java.math.BigDecimal bd)
throws DicomException
DicomException
public void addBigDecimal_ge(int group,
int element,
java.math.BigDecimal bd)
throws DicomException
DicomException
public java.lang.Short getShort(int dname,
int index)
throws DicomException
DicomException
public java.lang.Short getShort_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setShort(int dname,
java.lang.Short sh,
int index)
throws DicomException
DicomException
public void setShort_ge(int group,
int element,
java.lang.Short sh,
int index)
throws DicomException
DicomException
public void addShort(int dname,
java.lang.Short sh)
throws DicomException
DicomException
public void addShort_ge(int group,
int element,
java.lang.Short sh)
throws DicomException
DicomException
public java.lang.Integer getInteger(int dname,
int index)
throws DicomException
DicomException
public java.lang.Integer getInteger_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setInteger(int dname,
java.lang.Integer i,
int index)
throws DicomException
DicomException
public void setInteger_ge(int group,
int element,
java.lang.Integer i,
int index)
throws DicomException
DicomException
public void addInteger(int dname,
java.lang.Integer i)
throws DicomException
DicomException
public void addInteger_ge(int group,
int element,
java.lang.Integer i)
throws DicomException
DicomException
public java.lang.Long getLong(int dname,
int index)
throws DicomException
DicomException
public java.lang.Long getLong_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setLong(int dname,
java.lang.Long l,
int index)
throws DicomException
DicomException
public void setLong_ge(int group,
int element,
java.lang.Long l,
int index)
throws DicomException
DicomException
public void addLong(int dname,
java.lang.Long l)
throws DicomException
DicomException
public void addLong_ge(int group,
int element,
java.lang.Long l)
throws DicomException
DicomException
public java.lang.Float getFloat(int dname,
int index)
throws DicomException
DicomException
public java.lang.Float getFloat_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setFloat(int dname,
java.lang.Float f,
int index)
throws DicomException
DicomException
public void setFloat_ge(int group,
int element,
java.lang.Float f,
int index)
throws DicomException
DicomException
public void addFloat(int dname,
java.lang.Float f)
throws DicomException
DicomException
public void addFloat_ge(int group,
int element,
java.lang.Float f)
throws DicomException
DicomException
public java.lang.Double getDouble(int dname,
int index)
throws DicomException
DicomException
public java.lang.Double getDouble_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setDouble(int dname,
java.lang.Double d,
int index)
throws DicomException
DicomException
public void setDouble_ge(int group,
int element,
java.lang.Double d,
int index)
throws DicomException
DicomException
public void addDouble(int dname,
java.lang.Double d)
throws DicomException
DicomException
public void addDouble_ge(int group,
int element,
java.lang.Double d)
throws DicomException
DicomException
public float[] getFloats(int dname,
int index)
throws DicomException
DicomException
public float[] getFloats_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setFloats(int dname,
float[] floats,
int index)
throws DicomException
DicomException
public void setFloats_ge(int group,
int element,
float[] floats,
int index)
throws DicomException
DicomException
public void addFloats(int dname,
float[] floats)
throws DicomException
DicomException
public void addFloats_ge(int group,
int element,
float[] floats)
throws DicomException
DicomException
public ATValue getATValue(int dname,
int index)
throws DicomException
DicomException
public ATValue getATValue_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setATValue(int dname,
ATValue atValue,
int index)
throws DicomException
DicomException
public void setATValue_ge(int group,
int element,
ATValue atValue,
int index)
throws DicomException
DicomException
public void addATValue(int dname,
ATValue atValue)
throws DicomException
DicomException
public void addATValue_ge(int group,
int element,
ATValue atValue)
throws DicomException
DicomException
public DicomObject getSequenceItem(int dname,
int index)
throws DicomException
DicomException
public DicomObject getSequenceItem_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setSequenceItem(int dname,
DicomObject item,
int index)
throws DicomException
DicomException
public void setSequenceItem_ge(int group,
int element,
DicomObject item,
int index)
throws DicomException
DicomException
public void addSequenceItem(int dname,
DicomObject item)
throws DicomException
DicomException
public void addSequenceItem_ge(int group,
int element,
DicomObject dicomObject)
throws DicomException
DicomException
public Person getPersonName(int dname,
int index)
throws DicomException
DicomException
public Person getPersonName_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setPersonName(int dname,
Person person,
int index)
throws DicomException
DicomException
public void setPersonName(int dname,
Person person,
int index,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
throws DicomException
setPersonName_ge(int,Person,index,DicomCharset,DicomCharset,DicomCharset)
for an explanation of the use of the different charsets
DicomException
public void setPersonName_ge(int group,
int element,
Person person,
int index)
throws DicomException
DicomException
public void setPersonName_ge(int group,
int element,
Person person,
int index,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
throws DicomException
group - element - person - index - singleByteCharset - ideographicCharset - phoneticCharset -
DicomException
public void addPersonName(int dname,
Person person)
throws DicomException
DicomException
public void addPersonName(int dname,
Person person,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
throws DicomException
setPersonName_ge(int,Person,index,DicomCharset,DicomCharset,DicomCharset)
for an explanation of the use of the different charsets
dname - person - singleByteCharset - ideographicCharset - phoneticCharset -
DicomException
public void addPersonName_ge(int group,
int element,
Person person)
throws DicomException
DicomException
public void addPersonName_ge(int group,
int element,
Person person,
DicomCharset singleByteCharset,
DicomCharset ideographicCharset,
DicomCharset phoneticCharset)
throws DicomException
setPersonName_ge(int,Person,index,DicomCharset,DicomCharset,DicomCharset)
for an explanation of the use of the different charsets
group - element - person - singleByteCharset - ideographicCharset - phoneticCharset -
DicomException
public byte[] getBytes(int dname,
int index)
throws DicomException
DicomException
public byte[] getBytes_ge(int group,
int element,
int index)
throws DicomException
DicomException
public void setBytes(int dname,
byte[] bytes,
int index)
throws DicomException
DicomException
public void setBytes_ge(int group,
int element,
byte[] bytes,
int index)
throws DicomException
DicomException
public void addBytes(int dname,
byte[] bytes)
throws DicomException
DicomException
public void addBytes_ge(int group,
int element,
byte[] bytes)
throws DicomException
DicomExceptionpublic DataElement getDataElement(int dname)
dname - a DDict constant
public DataElement getDataElement(int group,
int element)
group - element -
public java.lang.Object get(int dname)
public java.lang.Object get_ge(int g,
int e)
get(dname) using a (group, element) - pair instead of 'dname'.
public java.lang.Object get(int dname,
int i)
public java.lang.Object get_ge(int g,
int e,
int i)
get(dname, i) using a (group, element) - pair instead of 'dname'
public java.lang.String getS(int dname)
throws DicomException
get(dname) and, if possible, returns it as a String. If the data element does'nt exist or is empty,
the method returns null.
DicomException
public java.lang.String getS_ge(int g,
int e)
throws DicomException
getS(dname) using a (group, element) - pair instead of 'dname'
DicomException
public java.lang.String getS(int dname,
int i)
throws DicomException
get(dname, i) and, if possible, returns it as a String.
If the data element doesn't exist, the method returns 'null'.
DicomException
public java.lang.String getS_ge(int g,
int e,
int i)
throws DicomException
get_ge(g, e, i) and, if possible, returns it as a String.
If the data element doesn't exist, the method returns 'null'.
DicomException
public int getI(int dname)
throws DicomException
get(dname) and, if possible, returns it as an int.
If the Data Element is not present, this method returns Integer.MAX_VALUE.
An exception is thrown if the requested value cannot be converted to int.
DicomException
public int getI_ge(int g,
int e)
throws DicomException
getI(dname) using a (group, element) - pair instead of 'dname'
DicomException
public int getI(int dname,
int i)
throws DicomException
get(dname, i) and, if possible, returns it as an int.
If the Data Element is not present, this method returns Integer.MAX_VALUE.
An exception is thrown if the requested value cannot be converted to int.
DicomException
public int getI_ge(int g,
int e,
int i)
throws DicomException
getI(dname, i) using a (group, element) - pair instead of 'dname'
DicomExceptionpublic void remove(int dname)
public void remove_ge(int group,
int element)
public java.util.Vector deleteItem(int dname)
public java.util.Vector deleteItem_ge(int g,
int e)
deleteItem(dname) using a (group, element) - pair instead of 'dname'
public java.lang.Object deleteItem(int dname,
int i)
public java.lang.Object deleteItem_ge(int g,
int e,
int i)
deleteItem(dname, i) using a (group, element) - pair instead of 'dname'
public void read(java.io.InputStream in)
throws java.io.IOException,
DicomException
read(in, readpixels),
with the 'readpixels' boolean set to true.
DicomReader class.
java.io.IOException
DicomException
public void read(java.io.InputStream in,
boolean readpixels)
throws java.io.IOException,
DicomException
DicomReader class.
in - the InputStream from which must the DICOM stream must be read.readpixels - A boolean indicating whether to read pixel data
java.io.IOException
DicomException
public void read(java.io.InputStream in,
int transfersyntax,
boolean readpixels)
throws java.io.IOException,
DicomException
DicomReader class.
in - the InputStream to a DICOM datasettransfersyntax - the transfer syntax with which this Dataset is encodedreadpixels - A boolean indicating whether to read pixel data
java.io.IOException
DicomExceptionTransferSyntax
public void write(java.io.OutputStream out,
boolean dicomfile)
throws DicomException,
java.io.IOException
DicomWriter.write(DicomObject,OutputStream,boolean) method.
dicomfile - indicates whether the data set should be written as a DICOM
file (see Part 3.10)(true) or as a DICOM stream (false)out -
DicomException
java.io.IOException
public void write(java.io.OutputStream out,
boolean dicomfile,
int transfersyntax,
boolean seq_undef)
throws DicomException,
java.io.IOException
DicomWriter class.
out - the outputstream written todicomfile - true for writing a DICOM part 10 file, false for a raw datasettransfersyntax - the transfersyntax to use for writingseq_undef - true - all sequences and items are encoded using undefined length,
false - all sequences and items are encoded using defined length
DicomException
java.io.IOExceptionTransferSyntax
public void write(java.io.OutputStream out,
boolean dicomfile,
int transfersyntax,
boolean seq_undef,
boolean grouplens)
throws DicomException,
java.io.IOException
write(out, f, ts, seq_undef)
and, in addition, lets you specify whether to write grouplengths.
DicomWriter class.
out - the outputstream written todicomfile - true for writing a DICOM part 10 file, false for a raw datasettransfersyntax - the transfersyntax to use for writingseq_undef - true - all sequences and items are encoded using undefined length,
false - all sequences and items are encoded using defined lengthgrouplens - set to true to include group length tags
DicomException
java.io.IOExceptionpublic DicomObject getFileMetaInformation()
public DicomObject setFileMetaInformation(DicomObject fmi)
public void dumpVRs(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionDumpUtils
public void dumpVRs(java.io.OutputStream os,
boolean metainfo)
throws java.io.IOException
metainfo - specifies whether to print out the File Meta Information (if present).
java.io.IOExceptionDumpUtils
|
Trispark JDT 2.50.13 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||