MLABDicomTag Class Reference

This class wraps a DCMTree::TagPtr for scripting use. More...

List of all members.

Public Slots

Scripting access
int compare (const MLABDicomTag *tag, double tolerance=0) const
int elementId () const
unsigned int getValueSize (int idx=0) const
int groupId () const
QString id () const
bool isBinary () const
bool isDate () const
bool isDateTime () const
bool isEmpty () const
bool isFloat () const
bool isInteger () const
bool isNull (int idx) const
bool isSequence () const
bool isSequenceItemNull (int idx) const
bool isTagId () const
bool isTime () const
int numberOfSequenceItems () const
int numberOfValues () const
QList< MLABDicomTree * > sequenceItems () const
QString tagName () const
QString toString () const
QString toString (int idx) const
QVariant value (int idx=0) const
QString vr () const


Detailed Description

This class wraps a DCMTree::TagPtr for scripting use.

Objects of this class are handed to the scripting API and deleted when not referenced anymore (at least under Python).


Member Function Documentation

int MLABDicomTag::compare ( const MLABDicomTag tag,
double  tolerance = 0 
) const [slot]

Compare this to tag and return -1 if this < tag, 0 if this == tag, and 1 if this > tag.

Comparison is performed value by value if both tags are numeric, otherwise byte by byte. If one tag is numeric and the other is a string, this results in nonsense. tolerance specifies the relative difference that is still accepted for 'equal' result.

int MLABDicomTag::elementId (  )  const [slot]

Gives the element ID of this tag as decimal integer.

unsigned int MLABDicomTag::getValueSize ( int  idx = 0  )  const [slot]

Get size of value with given index (especially for binary data).

int MLABDicomTag::groupId (  )  const [slot]

Gives the group ID of this tag as decimal integer.

(Remember that DICOM IDs are normally shown with hexadecimal notation!) Private tags have an odd group ID.

QString MLABDicomTag::id (  )  const [slot]

Gives the ID of this tag as a string with format "(xxxx,yyyy)", where xxxx is the group ID and yyyy is the element ID in hexadecimal notation.

bool MLABDicomTag::isBinary (  )  const [slot]

Contains this tag binary data?

The value() method will return a string object containing the bytes if this returns true. Since the whole value will be copied, value() should only used with care in this case.

bool MLABDicomTag::isDate (  )  const [slot]

Contains this tag date values (only)?

The value() method will return a date object if this returns true.

bool MLABDicomTag::isDateTime (  )  const [slot]

Contains this tag date+time values?

The value() method will return a date/time object if this returns true.

bool MLABDicomTag::isEmpty (  )  const [slot]

Return true if this tag has no sequences and no values.

bool MLABDicomTag::isFloat (  )  const [slot]

Contains this tag float values? (Also double precision and integer values).

The value() method will return a floating point number if this returns true.

bool MLABDicomTag::isInteger (  )  const [slot]

Contains this tag integer values? (Also unsigned and short integers and tag IDs).

The value() method will return an integer number if this returns true.

bool MLABDicomTag::isNull ( int  idx  )  const [slot]

Check if the value with index idx is null. Returns false if index is out of range.

bool MLABDicomTag::isSequence (  )  const [slot]

Contains this tag embedded DICOM trees?

bool MLABDicomTag::isSequenceItemNull ( int  idx  )  const [slot]

Check if the sequence with index idx is null. Returns false if index is out of range.

bool MLABDicomTag::isTagId (  )  const [slot]

Contains this tag tag-ids?

The value() method will return an unsigned integer where the upper 16 bit contain the group ID and the lower 16 bit contain the element ID. To receive a string containing a tag ID in the format as described in the id() method, use the toString() method.

bool MLABDicomTag::isTime (  )  const [slot]

Contains this tag time values (only)?

The value() method will return a time object if this returns true.

int MLABDicomTag::numberOfSequenceItems (  )  const [slot]

Get the number of sequence items of this tag.

int MLABDicomTag::numberOfValues (  )  const [slot]

Get the number of values of this tag.

QList<MLABDicomTree*> MLABDicomTag::sequenceItems (  )  const [slot]

Access the embedded DICOM trees of this tag.

Returns empty list if this tag is not of type SQ. This method is only accessible from Python.

QString MLABDicomTag::tagName (  )  const [slot]

Returns the name of this tag (if known).

QString MLABDicomTag::toString (  )  const [slot]

Convert the complete tag to a string, values concatenated by a backslash.

QString MLABDicomTag::toString ( int  idx  )  const [slot]

Get the value of tag-value idx as string. Returns empty string if failed.

QVariant MLABDicomTag::value ( int  idx = 0  )  const [slot]

Get value with given index.

Returns integer, double, date, time, date/time or string objects as appropriate.

QString MLABDicomTag::vr (  )  const [slot]

Returns the VR of this tag as a 2-letter string.


Generated on Sat Sep 3 18:38:02 2011 for MeVisLab Scripting Reference by  doxygen 1.5.8