MeVisLab Scripting Reference
MLABMutableDicomTree Class Reference
Inheritance diagram for MLABMutableDicomTree:
MLABDicomTree

Public Slots

Scripting access.


MLABMutableDicomTaggetMutableTag (const QString &name)
 
MLABMutableDicomTaggetMutableTagById (int group, int element)
 
MLABMutableDicomTagsetTag (const QString &name, const QVariant &values=QVariant(), const QString &vr=QString())
 
MLABMutableDicomTagsetTagById (int group, int element, const QVariant &values=QVariant(), const QString &vr=QString())
 
void removeTag (const QString &name)
 
void removeTagById (int group, int element)
 
MLABMutableDicomTagsetPrivateTag (int group, const QString &privateCreator, int elementOffset, const QVariant &values, const QString &vr)
 
MLABMutableDicomTaggetMutablePrivateTag (int group, const QString &privateCreator, int elementOffset)
 
bool removePrivateTags (int group, const QString &privateCreator)
 
- Public Slots inherited from MLABDicomTree
QList< MLABDicomTag * > getTags ()
 
MLABDicomTaggetTag (const QString &name)
 
MLABDicomTaggetTagById (int group, int element)
 
QString getPrivateCreator (int group, int element)
 
int findPrivateSlot (int group, const QString &privateCreator)
 
MLABDicomTaggetPrivateTag (int group, const QString &privateCreator, int elementOffset)
 
MLABDicomTreeparentTree () const
 
MLABMutableDicomTreedeepCopy ()
 
MLABMutableDicomTreecreateDerivedTree ()
 
bool save (const QString &filename, bool generateSOPInstanceUID=true)
 
static QString createDicomUid ()
 

Detailed Description

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

Objects of this class are handed to the scripting API and deleted when not referenced anymore.

Member Function Documentation

◆ getMutablePrivateTag

MLABMutableDicomTag* MLABMutableDicomTree::getMutablePrivateTag ( int  group,
const QString &  privateCreator,
int  elementOffset 
)
slot

Get a private tag.

Uses findPrivateSlot to find the correct slot for the private tag.

This method might fail if it is not applied to the tree on the top-most level, since the private creator might only be set on the top-most tree.

◆ getMutableTag

MLABMutableDicomTag* MLABMutableDicomTree::getMutableTag ( const QString &  name)
slot

Returns a tag from DICOM tree selected either by name or by id with format "(xxxx,yyyy)", where xxxx is the group id and yyyy is the element id.

It only returns the tag if it is owned by this tree and not by a parent tree.

◆ getMutableTagById

MLABMutableDicomTag* MLABMutableDicomTree::getMutableTagById ( int  group,
int  element 
)
slot

Returns the tag from DICOM tree selected by group and element id.

It only returns the tag if it is owned by this tree and not by a parent tree.

◆ removePrivateTags

bool MLABMutableDicomTree::removePrivateTags ( int  group,
const QString &  privateCreator 
)
slot

Removes all private tags for the given group and privateCreator.

◆ removeTag

void MLABMutableDicomTree::removeTag ( const QString &  name)
slot

Removes the tag with the given name or id with format "(xxxx,yyyy)", where xxxx is the group id and yyyy is the element id.

◆ removeTagById

void MLABMutableDicomTree::removeTagById ( int  group,
int  element 
)
slot

Removes the tag with the given group and element id.

◆ setPrivateTag

MLABMutableDicomTag* MLABMutableDicomTree::setPrivateTag ( int  group,
const QString &  privateCreator,
int  elementOffset,
const QVariant &  values,
const QString &  vr 
)
slot

Create a new private tag.

Uses findPrivateSlot to find the correct slot for the private tag.

This method might fail if it is not applied to the tree on the top-most level, since the private creator might only be set on the top-most tree.

◆ setTag

MLABMutableDicomTag* MLABMutableDicomTree::setTag ( const QString &  name,
const QVariant &  values = QVariant(),
const QString &  vr = QString() 
)
slot

Creates a new tag and sets it in the DICOM tree selected either by name or by id with format "(xxxx,yyyy)", where xxxx is the group id and yyyy is the element id.

The given values parameter is passed to the MLABMutableDicomTag::setValues() method. Typically the VR is read from the DICOM dictionary, but it can also be passed manually to allow to switch e.g. between OB and OW on PixelData tags.

◆ setTagById

MLABMutableDicomTag* MLABMutableDicomTree::setTagById ( int  group,
int  element,
const QVariant &  values = QVariant(),
const QString &  vr = QString() 
)
slot

Creates a new tag and sets it in the DICOM tree selected by group and element id.

The given values parameter is passed to the MLABMutableDicomTag::setValues() method. The vr should only be specified for private tags, for normal tags it is auto-detected from the dictionary.