MeVisLab Scripting Reference
MLABDicom Class Reference

#include <mlabDicomScriptWrapper.h>

Inherits QObject.

Public Types

enum  LoadDicomTreeOptions { DicomNoOptions = 0 , DicomReadPixelData = 1 , DicomReadPrivateTags = 2 }
 

Public Slots

DICOM related functions.


MLABMutableDicomTreeloadDicomTree (const QString &filename, LoadDicomTreeOptions options=DicomNoOptions)
 
MLABMutableDicomTreecreateDicomTree ()
 
QString createDicomUid ()
 
QStringList allNormalTagNames ()
 
QVariantMap tagInfo (quint32 tag)
 
QVariantMap tagInfo (const QString &name)
 
QVariantMap tagInfo (quint16 group, quint16 element)
 

Detailed Description

Access to global DICOM related functions.

An instance of this class is available as global MLABDicom

Member Enumeration Documentation

◆ LoadDicomTreeOptions

Options for loadDicomTree, can be or'ed together.

Enumerator
DicomNoOptions 

No extra options.

DicomReadPixelData 

Load pixel data.

DicomReadPrivateTags 

Load private tags.

Member Function Documentation

◆ allNormalTagNames

QStringList MLABDicom::allNormalTagNames ( )
slot

Get a list of all normal (non-repeating) DICOM tag names.

◆ createDicomTree

MLABMutableDicomTree * MLABDicom::createDicomTree ( )
slot

Create empty tree.

◆ createDicomUid

QString MLABDicom::createDicomUid ( )
slot

Returns a unique dicom uid with MeVis prefix and software type MeVisLab.

The method uses the DCMTree_Utils::UIDGenerator and offers a globally unique id using the process id, the time stamp and the mac address.

◆ loadDicomTree

MLABMutableDicomTree * MLABDicom::loadDicomTree ( const QString & filename,
LoadDicomTreeOptions options = DicomNoOptions )
slot

Loads a DICOM file and returns it as a tree object.

The tree is freed again when the last reference to it is removed.

With the options parameter you can specify what tags should be read:

  • DicomReadPixelData - read tags containing pixel data
  • DicomReadPrivateTags - read private tags

The values must be or'ed together.

◆ tagInfo [1/3]

QVariantMap MLABDicom::tagInfo ( const QString & name)
slot

Returns a map with information about the DICOM tag.

The name can be a name or a string of the form "(xxxx,yyyy)" where xxxx is the group id and yyyy is the element id. See tagInfo(quint32) for details.

◆ tagInfo [2/3]

QVariantMap MLABDicom::tagInfo ( quint16 group,
quint16 element )
slot

Returns a map with information about the DICOM tag.

see tagInfo(quint32) for details.

◆ tagInfo [3/3]

QVariantMap MLABDicom::tagInfo ( quint32 tag)
slot

Returns a map with information about the DICOM tag.

If the tag is not known, an empty map is returned. The returned map contains the following information:

  • "name" the name of the DICOM tag
  • "id" the tag id as string in the form (xxxx,yyyy)
  • "elementId" the uint16 element id value
  • "groupId" the uint16 element id value
  • "vr" the value representation
  • "multiplicity" the multiplicity (as list of (min, max) values)