MeVisLab Scripting Reference
MLABDicomSurfaceSaveWrapper Class Reference

#include <mlabDicomSurfaceSaveWrapper.h>

Inherits QObject.

Public Types

enum  SegmentAlgorithmType { AUTOMATIC = ml::DicomSurfaceSaveSupport::AUTOMATIC , SEMIAUTOMATIC = ml::DicomSurfaceSaveSupport::SEMIAUTOMATIC , MANUAL = ml::DicomSurfaceSaveSupport::MANUAL }
 

Public Slots

void copyRequiredPatientTags (MLABDicomTree *refTree)
 
void copyRequiredStudyTags (MLABDicomTree *refTree)
 
void copyRequiredEquipmentTags (MLABDicomTree *refTree)
 
void setEquipmentTags (const QString &manufacturer, const QString &manufacturersModelName, const QString &deviceSerialNumber, const QString &softwareVersions)
 
void setGeneralRequiredTags (MLABDicomTree *refTree, unsigned int seriesNumber)
 
void setContentTags (const QString &contentDate, const QString &contentTime, const QString &contentLabel, const QString &contentDescription="", const QString &contentCreatorsName="", unsigned int instanceNumber=1)
 
void setReferencedSeries (const QList< MLABDicomTree * > &refTrees)
 
unsigned int addSurface (MLWEMPatchWrapper *patch, bool isVolume=false, float cieL=50, float cieA=0, float cieB=0, float opacity=0.5f)
 
MLABMutableDicomTreegetSurface (unsigned int surfaceNumber)
 
bool addSegment (const QVector< unsigned int > &surfaceIndices, const QString &label, const QString &description, SegmentAlgorithmType algorithmType, MLABDicomTree *algorithm, MLABDicomTree *segmentationPropertyCategory, MLABDicomTree *segmentationPropertyType)
 
bool finalize ()
 
MLABMutableDicomTreecreateCodeMacro (const QString &value, const QString &scheme, const QString &meaning)
 
MLABMutableDicomTreecreateAlgorithmIdentification (MLABDicomTree *algorithmFamily, const QString &algorithmName, const QString &algorithmVersion)
 

Detailed Description

A scripting wrapper for the ml::DicomSurfaceSaveSupport class.

Member Enumeration Documentation

◆ SegmentAlgorithmType

Enum for how the segmentation was created.

Enumerator
AUTOMATIC 

segmentation was created automatically

SEMIAUTOMATIC 

segmentation was created semi-automatically

MANUAL 

segmentation was created manually

Member Function Documentation

◆ addSegment

bool MLABDicomSurfaceSaveWrapper::addSegment ( const QVector< unsigned int > & surfaceIndices,
const QString & label,
const QString & description,
SegmentAlgorithmType algorithmType,
MLABDicomTree * algorithm,
MLABDicomTree * segmentationPropertyCategory,
MLABDicomTree * segmentationPropertyType )
slot

Appends one or more entry to the SegmentSequence tags.

Returns
true if the operation succeeded
Parameters
surfaceIndicesmust be one or more return values of the addSurface call.
labelprovides the value for the SegmentLabel tag
algorithmshould be created with createAlgorithmIdentifaction()
segmentationPropertyCategoryshould be created with createCodeMacro according to http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7150.html
segmentationPropertyTypeshould be created with createCodeMacro according to http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7151.html

◆ addSurface

unsigned int MLABDicomSurfaceSaveWrapper::addSurface ( MLWEMPatchWrapper * patch,
bool isVolume = false,
float cieL = 50,
float cieA = 0,
float cieB = 0,
float opacity = 0.5f )
slot

Appends one WEM patch to the SurfaceSequence tags, returned value must be used in a addSegment call.

Returns
the index of the surface added if the operation succeeded, otherwise 0. Use this in addSegment.
Parameters
patchthe label of the patch is set as the SurfaceComments tag (if not empty)
isVolumeset this to true if you are sure that this patch is a closed volume
cieLcolor: CIELab L value (range 0 to 100)
cieAcolor: CIELab a* value (range -128 to 127)
cieBcolor: CIELab b* value (range -128 to 127)
opacityhas a range of 0 to 1

◆ copyRequiredEquipmentTags

void MLABDicomSurfaceSaveWrapper::copyRequiredEquipmentTags ( MLABDicomTree * refTree)
slot

Copy required equipment specific data from another DICOM tree (see http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.5.2.html)

◆ copyRequiredPatientTags

void MLABDicomSurfaceSaveWrapper::copyRequiredPatientTags ( MLABDicomTree * refTree)
slot

Copy required patient specific data from another DICOM tree (see http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.html#sect_C.7.1.1)

◆ copyRequiredStudyTags

void MLABDicomSurfaceSaveWrapper::copyRequiredStudyTags ( MLABDicomTree * refTree)
slot

Copy required patient specific data from another DICOM tree (see http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.2.html#sect_C.7.2.1)

◆ createAlgorithmIdentification

MLABMutableDicomTree * MLABDicomSurfaceSaveWrapper::createAlgorithmIdentification ( MLABDicomTree * algorithmFamily,
const QString & algorithmName,
const QString & algorithmVersion )
slot

Create a tree to use in algorithm identification sequence tags.

Appropriate values depends on the tag.

Parameters
algorithmFamilymay be created with createCodeMacro, refer to http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7162.html

The result may be augmented with additional values.

See http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_10.16.html#table_10-19

◆ createCodeMacro

MLABMutableDicomTree * MLABDicomSurfaceSaveWrapper::createCodeMacro ( const QString & value,
const QString & scheme,
const QString & meaning )
slot

Create a tree to use in various code sequence tags.

Appropriate values depends on the tag.

The result may be augmented with additional values.

See http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_8.8.html#table_8.8-1

◆ finalize

bool MLABDicomSurfaceSaveWrapper::finalize ( )
slot

Put finishing steps on resulting DICOM tree.

◆ getSurface

MLABMutableDicomTree * MLABDicomSurfaceSaveWrapper::getSurface ( unsigned int surfaceNumber)
slot

Get surface with given number (as returned by addSurface), index is 1-based.

◆ setContentTags

void MLABDicomSurfaceSaveWrapper::setContentTags ( const QString & contentDate,
const QString & contentTime,
const QString & contentLabel,
const QString & contentDescription = "",
const QString & contentCreatorsName = "",
unsigned int instanceNumber = 1 )
slot

Set required tags about content:

◆ setEquipmentTags

void MLABDicomSurfaceSaveWrapper::setEquipmentTags ( const QString & manufacturer,
const QString & manufacturersModelName,
const QString & deviceSerialNumber,
const QString & softwareVersions )
slot

Set required equipment specific tags (alternative to copyRequiredEquipmentTags)

◆ setGeneralRequiredTags

void MLABDicomSurfaceSaveWrapper::setGeneralRequiredTags ( MLABDicomTree * refTree,
unsigned int seriesNumber )
slot

Set generally required tags.

(see http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.3.html#sect_C.7.3.1 and http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.4.html#sect_C.7.4.1)

Copies FrameOfReferenceUID from refTree, sets the SeriesNumber, creates a new unique SeriesInstanceUID, sets the correct SOPClassUID, creates a new unique SOPInstanceUID, sets the SpecificCharacterSet to UTF-8, and the Modality to SEG.

◆ setReferencedSeries

void MLABDicomSurfaceSaveWrapper::setReferencedSeries ( const QList< MLABDicomTree * > & refTrees)
slot

Set the DICOM series that are referenced by this surface (must be set after the StudyInstanceUID has been set, e.g., with copyRequiredStudyData)

This will reference all SOP instances in the series (if encoded through the EnhancedMF). If you only used a subset of the images (e.g., only one timepoint), you have to fill this yourself.