MeVisLab Toolbox Reference
ml::marker_conversion Namespace Reference

Namespaces

 ConversionMode
 
 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. More...
 
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. More...
 
void MARKERCONVERSION_EXPORT ApplyTransformationMatrixToMarker (XMarker &marker, SelectedComponents::Type selectedComponents, const ml::Matrix4 &transformation)
 Transforms a given marker using the transformation matrix T. More...
 
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. More...
 
void MARKERCONVERSION_EXPORT ConvertFloatToIntegerVoxelMarker (XMarker &marker, SelectedComponents::Type selectedComponents)
 Converts a marker from floating point (=continuous) voxel coordinates to integer (=index) voxel coordinates. More...
 
void MARKERCONVERSION_EXPORT ConvertIntegerToFloatVoxelMarkerList (XMarkerList &markerList, SelectedComponents::Type selectedComponents)
 Converts a marker list from integer (=index) voxel coordinates to floating point (=continuous) voxel coordinates. More...
 
void MARKERCONVERSION_EXPORT ConvertIntegerToFloatVoxelMarker (XMarker &marker, SelectedComponents::Type selectedComponents)
 Converts a marker from integer (=index) voxel coordinates to floating point (=continuous) voxel coordinates. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool MARKERCONVERSION_EXPORT IsDirectionVectorConversionEnabled (SelectedComponents::Type selectedComponents)
 Returns 'true' if the direction vector is to be converted according to selectedComponents. More...
 

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.

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

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

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

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

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

◆ 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!).

◆ 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!).

◆ 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!).

◆ 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!).

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

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

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

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

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

◆ IsDirectionVectorConversionEnabled()

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

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