MeVisLab Scripting Reference
MLTransformationProviderWrapper Class Reference

#include <mlTransformationProviderWrapper.h>

Inherits MLRefCountedBaseWrapper.

Inherited by MLStandardTransformationProviderWrapper.

Public Slots

TransformationProviderMappingPathWrappercreateEmptyMappingPath ()
 
MLAbstractTransformationWrappergetTransformation (const QVariantMap &fromRef, const QVariantMap &toRef, TransformationProviderMappingPathWrapper *mappingPath=nullptr)
 
bool isSameImage (const QVariantMap &ref1, const QVariantMap &ref2)
 

Signals

void transformationsChanged (TransformationChangedEventWrapper *changeEvent)
 

Detailed Description

This class wraps the class ml::TransformationProvider.

This class provides ml::AbstractTransformation objects through a generic interface, where you request the transformation between two coordinate systems (usually associated with a 3D image).

Coordinate systems are referenced through certain properties of the associated (medical) images. The recognized properties currently are:

  • frameOfReferenceUID: The value of the FrameOfReferenceUID DICOM tag. (optional)
  • seriesInstanceUID: The value of the SeriesInstanceUID DICOM tag. (mandatory)
  • timePointIndex: The index of a time point in a 4D image with a time series. (optional)

Not all values must be given, but the more properties are given, the higher the chances are to obtain an appropriate transformation from a given implementation.

How the transformation between two coordinate systems is obtained is implementation specific. This class only provides the abstract interface. See e.g. the implementation MLStandardTransformationProviderWrapper.

Member Function Documentation

◆ createEmptyMappingPath

TransformationProviderMappingPathWrapper * MLTransformationProviderWrapper::createEmptyMappingPath ( )
slot

Generate an object that can be handed to getTransformation to store the path taken to arrive at the resulting transformation.

This path can especially be used to check if the resulting transformation has changed when this provider emits a transformationsChanged notification.

◆ getTransformation

MLAbstractTransformationWrapper * MLTransformationProviderWrapper::getTransformation ( const QVariantMap & fromRef,
const QVariantMap & toRef,
TransformationProviderMappingPathWrapper * mappingPath = nullptr )
slot

Get an appropriate transformation between the coordinate systems represented by the properties of fromRef and toRef.

For an explanation of these see the class description.

You can also provide a mappingPath created with createEmptyMappingPath. This will be updated with the path used for getting a transformation and can be used in change notifications to check if this transformation is affected by the change.

◆ isSameImage

bool MLTransformationProviderWrapper::isSameImage ( const QVariantMap & ref1,
const QVariantMap & ref2 )
slot

Return if the two given coordinate system references are considered to belong to basically the same image.

This means that the identity transformation is returned for these, but also says that derived data that originated on ref1 can also considered to be originated from ref2. This could e.g. used to allow editing of structures.

◆ transformationsChanged

void MLTransformationProviderWrapper::transformationsChanged ( TransformationChangedEventWrapper * changeEvent)
signal

This signal is emitted if the state of the TransformationProvider changes.

Users should connect to the signal and refresh any transformation they obtained from this provider.