MeVisLab Scripting Reference
MLABMutableDicomTag Class Reference
Inheritance diagram for MLABMutableDicomTag:
MLABDicomTag

Public Slots

Scripting access.


void setValues (const QVariant &values)
 
void setValueFromNumPyArray (PyObject *array)
 
QList< MLABMutableDicomTree * > sequenceItems ()
 
void setSequenceItems (const QList< MLABMutableDicomTree * > &items)
 
void clearSequenceItems ()
 
void clearSequenceItem (int index)
 
MLABMutableDicomTreeaddSequenceItem ()
 
void addSequenceItem (MLABMutableDicomTree *item)
 
MLABMutableDicomTreegetSequenceItem (int index)
 
void setVr (const QString &vr)
 
- Public Slots inherited from MLABDicomTag
int groupId () const
 
int elementId () const
 
QString id () const
 
QString vr () const
 
QString tagName () const
 
int compare (const MLABDicomTag *tag, double tolerance=0) const
 
QList< MLABDicomTree * > sequenceItems () const
 
MLABDicomTreegetSequenceItem (int index) const
 
int numberOfValues () const
 
int numberOfSequenceItems () const
 
bool isNull (int idx) const
 
bool isSequenceItemNull (int idx) const
 
bool isEmpty () const
 
bool isSequence () const
 
bool isInteger () const
 
bool isFloat () const
 
bool isDate () const
 
bool isTime () const
 
bool isDateTime () const
 
bool isBinary () const
 
bool isTagId () const
 
QString toString (int idx) const
 
QString toString () const
 
QVariant toNumPyArray () const
 
QVariant value (int idx=0) const
 
QVariantList values () const
 
unsigned int getValueSize (int idx=0) const
 
bool isEqual (MLABDicomTag *other, double tolerance=0.)
 

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.

Member Function Documentation

◆ addSequenceItem [1/2]

MLABMutableDicomTree* MLABMutableDicomTag::addSequenceItem ( )
slot

Add a new empty sequence item.

◆ addSequenceItem [2/2]

void MLABMutableDicomTag::addSequenceItem ( MLABMutableDicomTree item)
slot

Add a sequence item. If item is NULL/None, an empty sequence item is added.

◆ clearSequenceItem

void MLABMutableDicomTag::clearSequenceItem ( int  index)
slot

Clears the given sequence item at index, it will be NULL afterwards.

◆ clearSequenceItems

void MLABMutableDicomTag::clearSequenceItems ( )
slot

Clear/remove all sequence items.

◆ getSequenceItem

MLABMutableDicomTree* MLABMutableDicomTag::getSequenceItem ( int  index)
slot

Get a mutable sequence tree, returns NULL if index is invalid.

◆ sequenceItems

QList<MLABMutableDicomTree*> MLABMutableDicomTag::sequenceItems ( )
slot

Access the embedded DICOM trees of this tag.

Returns empty list if this tag is not of type SQ.

◆ setSequenceItems

void MLABMutableDicomTag::setSequenceItems ( const QList< MLABMutableDicomTree * > &  items)
slot

Sets the given sequence items.

Clears the existing sequence items.

◆ setValueFromNumPyArray

void MLABMutableDicomTag::setValueFromNumPyArray ( PyObject *  array)
slot

Set the binary values of the tag from a NumPy array.

This copies the NumPy array into contiguous memory and only allows NumPy types that match the datatype size of the VR.

◆ setValues

void MLABMutableDicomTag::setValues ( const QVariant &  values)
slot

Sets the given values to the tag.

It can be a single value (QString, float, double, int, QDate, QTime, QDateTime, QByteArray) or a list of values for tags with multiplicity > 1. If the value is a string and contains backslash separators and if the VR of the tag allows this as value separator, then the string is split automatically. Any previous values are dropped.

◆ setVr

void MLABMutableDicomTag::setVr ( const QString &  vr)
slot

Set a new value representation if the VR is unknown.