MeVisLab Scripting Reference
MLABDicomSurfaceSaveWrapper Class Reference

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 https://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7150.html
segmentationPropertyTypeShould be created with createCodeMacro according to https://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

Copies required equipment specific data from another DICOM tree.

(see https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.5.2.html)

◆ copyRequiredPatientTags

void MLABDicomSurfaceSaveWrapper::copyRequiredPatientTags ( MLABDicomTree refTree)
slot

Copies required patient specific data from another DICOM tree.

(see https://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

Copies required patient specific data from another DICOM tree.

(see https://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

Creates a tree to use in algorithm identification sequence tags.

Appropriate values depends on the tag.

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

The result may be augmented with additional values.

See https://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

Creates a tree to use in various code sequence tags.

Appropriate values depends on the tag.

The result may be augmented with additional values.

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

◆ finalize

bool MLABDicomSurfaceSaveWrapper::finalize ( )
slot

Puts finishing steps on resulting DICOM tree.

◆ getSurface

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

Returns the 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

Sets required tags about content.

◆ setEquipmentTags

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

Sets required equipment specific tags.

(alternative to copyRequiredEquipmentTags)

◆ setGeneralRequiredTags

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

Sets generally required tags.

(see https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.3.html#sect_C.7.3.1 and https://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

Sets 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.