MeVisLab Toolbox Reference
ml::marker_conversion Namespace Reference

Namespaces

namespace  ConversionMode
 
namespace  SelectedComponents
 

Classes

class  MissingReferenceImagePropertiesException
 

Functions

Generic Conversion Methods
void MARKERCONVERSION_EXPORT ConvertMarkerList (XMarkerList &markerList, ConversionMode::Type conversionMode, SelectedComponents::Type selectedComponents, const MedicalImageProperties *referenceImage)
 Converts the given markerList according to conversionMode and enableDirectionVectorConversion.
 
Matrix-based Transformation Methods

-----------------------------------—

void MARKERCONVERSION_EXPORT ApplyTransformationMatrixToMarkerList (XMarkerList &list, SelectedComponents::Type selectedComponents, const Matrix4 &transformation)
 Transforms a given marker list using the transformation matrix T.
 
void MARKERCONVERSION_EXPORT ApplyTransformationMatrixToMarker (XMarker &marker, SelectedComponents::Type selectedComponents, const ml::Matrix4 &transformation)
 Transforms a given marker using the transformation matrix T.
 
Specific Conversion Methods

-----------------------------------—

void MARKERCONVERSION_EXPORT ConvertFloatToIntegerVoxelMarkerList (XMarkerList &markerList_voxel, SelectedComponents::Type selectedComponents)
 Converts a marker list from floating point (=continuous) voxel coordinates to integer (=index) voxel coordinates.
 
void MARKERCONVERSION_EXPORT ConvertFloatToIntegerVoxelMarker (XMarker &marker, SelectedComponents::Type selectedComponents)
 Converts a marker from floating point (=continuous) voxel coordinates to integer (=index) voxel coordinates.
 
void MARKERCONVERSION_EXPORT ConvertIntegerToFloatVoxelMarkerList (XMarkerList &markerList, SelectedComponents::Type selectedComponents)
 Converts a marker list from integer (=index) voxel coordinates to floating point (=continuous) voxel coordinates.
 
void MARKERCONVERSION_EXPORT ConvertIntegerToFloatVoxelMarker (XMarker &marker, SelectedComponents::Type selectedComponents)
 Converts a marker from integer (=index) voxel coordinates to floating point (=continuous) voxel coordinates.
 
void MARKERCONVERSION_EXPORT ConvertIntegerVoxelToWorldMarkerList (XMarkerList &markerList, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker list from integer (=index) voxel coordinates to world coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertIntegerVoxelToWorldMarker (XMarker &marker, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker from integer (=index) voxel coordinates to world coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertFloatVoxelToWorldMarkerList (XMarkerList &markerList, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker list from floating point (=continuous) voxel coordinates to world coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertFloatVoxelToWorldMarker (XMarker &marker, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker from floating point (=continuous) voxel coordinates to world coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertWorldToFloatVoxelMarkerList (XMarkerList &markerList, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker list from world coordinates to floating point (=continuous) voxel coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertWorldToFloatVoxelMarker (XMarker &marker, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker from world coordinates to floating point (=continuous) voxel coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertWorldToIntegerVoxelMarkerList (XMarkerList &markerList, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker list from world coordinates to integer (=index) voxel coordinates using referenceImageProps.
 
void MARKERCONVERSION_EXPORT ConvertWorldToIntegerVoxelMarker (XMarker &marker, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
 Converts a marker from world coordinates to integer (=index) voxel coordinates using referenceImageProps.
 
bool MARKERCONVERSION_EXPORT IsDirectionVectorConversionEnabled (SelectedComponents::Type selectedComponents)
 Returns 'true' if the direction vector is to be converted according to selectedComponents.
 

Function Documentation

◆ ApplyTransformationMatrixToMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ApplyTransformationMatrixToMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents,
const ml::Matrix4 & transformation )

Transforms a given marker using the transformation matrix T.

If enableDirectionVectorConversion == TRUE, then the vector parts of each marker will also be transformed.

References ApplyTransformationMatrixToMarker().

Referenced by ApplyTransformationMatrixToMarker().

◆ ApplyTransformationMatrixToMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ApplyTransformationMatrixToMarkerList ( XMarkerList & list,
SelectedComponents::Type selectedComponents,
const Matrix4 & transformation )

Transforms a given marker list using the transformation matrix T.

If enableDirectionVectorConversion == TRUE, then the vector parts of each marker will also be transformed.

References ApplyTransformationMatrixToMarkerList().

Referenced by ApplyTransformationMatrixToMarkerList().

◆ ConvertFloatToIntegerVoxelMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertFloatToIntegerVoxelMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents )

Converts a marker from floating point (=continuous) voxel coordinates to integer (=index) voxel coordinates.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed. This is done by first computing the target point based on the floating point position and vector, then converting that point to voxel coords, and finally computing the vector by subtracting the integer position from that integer target position.

References ConvertFloatToIntegerVoxelMarker().

Referenced by ConvertFloatToIntegerVoxelMarker().

◆ ConvertFloatToIntegerVoxelMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertFloatToIntegerVoxelMarkerList ( XMarkerList & markerList_voxel,
SelectedComponents::Type selectedComponents )

Converts a marker list from floating point (=continuous) voxel coordinates to integer (=index) voxel coordinates.

If selectedComponents includes the , then the vector parts of a marker will also be transformed. This is done by first computing the target point based on the floating point position and vector, then converting that point to voxel coords, and finally computing the vector by subtracting the integer position from that integer target position.

References ConvertFloatToIntegerVoxelMarkerList().

Referenced by ConvertFloatToIntegerVoxelMarkerList().

◆ ConvertFloatVoxelToWorldMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertFloatVoxelToWorldMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker from floating point (=continuous) voxel coordinates to world coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed.

References ConvertFloatVoxelToWorldMarker().

Referenced by ConvertFloatVoxelToWorldMarker().

◆ ConvertFloatVoxelToWorldMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertFloatVoxelToWorldMarkerList ( XMarkerList & markerList,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker list from floating point (=continuous) voxel coordinates to world coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed.

References ConvertFloatVoxelToWorldMarkerList().

Referenced by ConvertFloatVoxelToWorldMarkerList().

◆ ConvertIntegerToFloatVoxelMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertIntegerToFloatVoxelMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents )

Converts a marker from integer (=index) voxel coordinates to floating point (=continuous) voxel coordinates.

The resulting positions will point to voxel centers (i.e. will all end with .5). If enableDirectionVectorConversion == FALSE, then the vector parts of each marker will not be touched. Note: Any non-integer coordinate in x-, y- or z-dimension for marker.pos or marker.vec (if enableDirectionVectorConversion is true) will be rounded to the closest integer before the conversion (e.g. 0.5 is rounded to 1, so don't provide floating point voxel coordinates!).

References ConvertIntegerToFloatVoxelMarker().

Referenced by ConvertIntegerToFloatVoxelMarker().

◆ ConvertIntegerToFloatVoxelMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertIntegerToFloatVoxelMarkerList ( XMarkerList & markerList,
SelectedComponents::Type selectedComponents )

Converts a marker list from integer (=index) voxel coordinates to floating point (=continuous) voxel coordinates.

The resulting positions will point to voxel centers (i.e. will all end with .5). If enableDirectionVectorConversion == FALSE, then the vector parts of each marker will not be touched. Note: Any non-integer coordinate in x-, y- or z-dimension for marker.pos or marker.vec (if enableDirectionVectorConversion is true) will be rounded to the closest integer before the conversion (e.g. 0.5 is rounded to 1, so don't provide floating point voxel coordinates!).

References ConvertIntegerToFloatVoxelMarkerList().

Referenced by ConvertIntegerToFloatVoxelMarkerList().

◆ ConvertIntegerVoxelToWorldMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertIntegerVoxelToWorldMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker from integer (=index) voxel coordinates to world coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed. Note: Any non-integer coordinate in x-, y- or z-dimension for marker.pos or marker.vec (if enableDirectionVectorConversion is true) will be rounded to the closest integer before the conversion (e.g. 0.5 is rounded to 1, so don't provide floating point voxel coordinates!).

References ConvertIntegerVoxelToWorldMarker().

Referenced by ConvertIntegerVoxelToWorldMarker().

◆ ConvertIntegerVoxelToWorldMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertIntegerVoxelToWorldMarkerList ( XMarkerList & markerList,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker list from integer (=index) voxel coordinates to world coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed. Note: Any non-integer coordinate in x-, y- or z-dimension for marker.pos or marker.vec (if enableDirectionVectorConversion is true) will be rounded to the closest integer before the conversion (e.g. 0.5 is rounded to 1, so don't provide floating point voxel coordinates!).

References ConvertIntegerVoxelToWorldMarkerList().

Referenced by ConvertIntegerVoxelToWorldMarkerList().

◆ ConvertMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertMarkerList ( XMarkerList & markerList,
ConversionMode::Type conversionMode,
SelectedComponents::Type selectedComponents,
const MedicalImageProperties * referenceImage )

Converts the given markerList according to conversionMode and enableDirectionVectorConversion.

If conversion from or to world coordinates is requested, the referenceImage must be non-nullptr since its coordinate system is used. Throws MissingReferenceImagePropertiesException if conversion mode requires a referenceImage but non was given.

References ConvertMarkerList().

Referenced by ConvertMarkerList().

◆ ConvertWorldToFloatVoxelMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertWorldToFloatVoxelMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker from world coordinates to floating point (=continuous) voxel coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed.

References ConvertWorldToFloatVoxelMarker().

Referenced by ConvertWorldToFloatVoxelMarker().

◆ ConvertWorldToFloatVoxelMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertWorldToFloatVoxelMarkerList ( XMarkerList & markerList,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker list from world coordinates to floating point (=continuous) voxel coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed.

References ConvertWorldToFloatVoxelMarkerList().

Referenced by ConvertWorldToFloatVoxelMarkerList().

◆ ConvertWorldToIntegerVoxelMarker()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertWorldToIntegerVoxelMarker ( XMarker & marker,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker from world coordinates to integer (=index) voxel coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed. This is done by first computing the floating point target position based on the floating point position and vector, then converting that point to voxel coords, and finally computing the integer vector by subtracting the integer position from that integer target position.

References ConvertWorldToIntegerVoxelMarker().

Referenced by ConvertWorldToIntegerVoxelMarker().

◆ ConvertWorldToIntegerVoxelMarkerList()

void MARKERCONVERSION_EXPORT ml::marker_conversion::ConvertWorldToIntegerVoxelMarkerList ( XMarkerList & markerList,
SelectedComponents::Type selectedComponents,
const ml::MedicalImageProperties & referenceImageProps )

Converts a marker list from world coordinates to integer (=index) voxel coordinates using referenceImageProps.

If enableDirectionVectorConversion == TRUE, then the vector parts of a marker will also be transformed.

References ConvertWorldToIntegerVoxelMarkerList().

Referenced by ConvertWorldToIntegerVoxelMarkerList().

◆ IsDirectionVectorConversionEnabled()

bool MARKERCONVERSION_EXPORT ml::marker_conversion::IsDirectionVectorConversionEnabled ( SelectedComponents::Type selectedComponents)

Returns 'true' if the direction vector is to be converted according to selectedComponents.

References IsDirectionVectorConversionEnabled().

Referenced by IsDirectionVectorConversionEnabled().