MeVisLab Toolbox Reference
MarkerConversion.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10#pragma once
11
13#if defined(MLAB_CMAKE_BUILDSYSTEM)
15#endif
16#include <mlTypeDefs.h>
17#include "mlUtilsAPI.h"
18#include <mlMatrix4.h> // Matrix4 cannot (with my knowledge) be forward declared because it is a typedef for a template
19
21
22class XMarker;
23class XMarkerList;
24class MedicalImageProperties;
25
26namespace marker_conversion {
27
40
41 namespace SelectedComponents {
42 typedef enum {
45 COUNT
46 } Type;
47 };
48
49 // Note: inline this class and do NOT export since this would lead to C4275 because of not-expotability of std::runtime_error.
50 class MissingReferenceImagePropertiesException : public std::runtime_error
51 {
52 public:
53 inline MissingReferenceImagePropertiesException( const std::string& message ) : std::runtime_error( message ) { };
54 };
55
57
64
67
72 const Matrix4& transformation );
73
78 const ml::Matrix4& transformation );
79
82
90
98
107
116
125
134
140
146
152
158
164
173
177}
178
#define MARKERCONVERSION_EXPORT
This class encapsulates basic medical image properties:
Base object class XMarkerList (derived from BaseListTemplate) specialized for XMarker items.
Base object class XMarker (derived form baseItem) with 6D pos, 3D vec and type int.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
void MARKERCONVERSION_EXPORT ConvertIntegerToFloatVoxelMarker(XMarker &marker, SelectedComponents::Type selectedComponents)
Converts a marker from integer (=index) voxel coordinates to floating point (=continuous) voxel coord...
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...
void MARKERCONVERSION_EXPORT ConvertIntegerToFloatVoxelMarkerList(XMarkerList &markerList, SelectedComponents::Type selectedComponents)
Converts a marker list from integer (=index) voxel coordinates to floating point (=continuous) voxel ...
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 referenceIm...
void MARKERCONVERSION_EXPORT ConvertMarkerList(XMarkerList &markerList, ConversionMode::Type conversionMode, SelectedComponents::Type selectedComponents, const MedicalImageProperties *referenceImage)
Converts the given markerList according to conversionMode and enableDirectionVectorConversion.
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 refe...
void MARKERCONVERSION_EXPORT ConvertFloatToIntegerVoxelMarker(XMarker &marker, SelectedComponents::Type selectedComponents)
Converts a marker from floating point (=continuous) voxel coordinates to integer (=index) voxel coord...
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 referenceIm...
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 refe...
bool MARKERCONVERSION_EXPORT IsDirectionVectorConversionEnabled(SelectedComponents::Type selectedComponents)
Returns 'true' if the direction vector is to be converted according to selectedComponents.
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 referenceImagePr...
void MARKERCONVERSION_EXPORT ConvertFloatToIntegerVoxelMarkerList(XMarkerList &markerList_voxel, SelectedComponents::Type selectedComponents)
Converts a marker list from floating point (=continuous) voxel coordinates to integer (=index) voxel ...
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 referenceImagePr...
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 ConvertWorldToFloatVoxelMarkerList(XMarkerList &markerList, SelectedComponents::Type selectedComponents, const ml::MedicalImageProperties &referenceImageProps)
Converts a marker list from world coordinates to floating point (=continuous) voxel coordinates using...
void MARKERCONVERSION_EXPORT ApplyTransformationMatrixToMarker(XMarker &marker, SelectedComponents::Type selectedComponents, const ml::Matrix4 &transformation)
Transforms a given marker using the transformation matrix T.
STL namespace.