13#ifndef ML_MEDICAL_IMAGE_PROPERTIES_H
14#define ML_MEDICAL_IMAGE_PROPERTIES_H
28#pragma warning( push )
33#pragma warning(disable : 4275 )
226 void updateVoxelSizeFromToWorldMatrix();
233 void updateToWorldMatrixFromVoxelSize();
238 void correctToWorldMatrix();
271 bool _isToWorldMatrixValid;
280 std::vector<std::string> _cDimInfos;
281 std::vector<DateTime> _tDimInfos;
282 std::vector<std::string> _uDimInfos;
298#pragma warning( pop )
MLEXPORT ImageProperties()
void setVoxelSize(const Vector3 &voxelSize)
Sets the voxel size to voxelSize. The transformation matrix is adapted adequately.
Vector3 getVoxelSize() const
Returns the voxel size.
const std::vector< std::string > & getUDimensionInfos() const
ImagePropertyExtensionContainer & getImagePropertyContainer()
Permits access to the container for user image properties.
const Matrix4 & getWorldToVoxelMatrix() const
Returns the worlToVoxel matrix.
bool isVoxelToWorldMatrixValid() const
std::vector< DateTime > & getTDimensionInfos()
void setVoxelToWorldMatrix(const Matrix4 &matrix)
Sets the matrix that transforms voxel to world coordinates to matrix.
const ImagePropertyExtensionContainer & getConstImagePropertyContainer() const
void setImageProperties(const MedicalImageProperties &medicalImageProperties)
const std::vector< std::string > & getCDimensionInfos() const
const std::vector< DateTime > & getTDimensionInfos() const
Vector3 mapWorldToVoxel(const Vector3 &worldPosition) const
Maps the worldPosition vector to voxel coordinates and returns it.
std::vector< std::string > & getUDimensionInfos()
MedicalImageProperties & operator=(const MedicalImageProperties &medicalImageProperties)
bool operator!=(const MedicalImageProperties &medicalImageProperties) const
Returns true if *this and medicalImageProperties differ; otherwise, it returns false.
bool operator==(const MedicalImageProperties &medicalImageProperties) const
Returns true if *this and medicalImageProperties are identical; otherwise, it returns false.
void setVoxelToWorldMatrixValid(bool valid)
~MedicalImageProperties() override
Destructor. Cleans up dynamically allocated memory.
void setVoxelSize(MLdouble dx, MLdouble dy, MLdouble dz)
Sets the voxel size to dx, dy, and dz. This changes the voxelToWorld matrix.
std::vector< std::string > & getCDimensionInfos()
double getVoxelVolumeInMilliliters() const
Vector3 mapVoxelToWorld(const Vector3 &voxelPosition) const
Maps the voxelPosition vector to world coordinates and returns it.
MedicalImageProperties(const MedicalImageProperties &medicalImageProperties)
void translateVoxelToWorldMatrix(const Vector3 &offsetVector)
Translates the voxelToWorld matrix by the offsetVector.
void scaleVoxelToWorldMatrix(const Vector3 &scaleFactors)
double getVoxelVolumeInCubicMillimeters() const
const Matrix4 & getVoxelToWorldMatrix() const
Returns the voxelToWorld matrix.
#define MLEXPORT
Code it as import symbol if compiled elsewhere.
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
Tvec3< MLdouble > Vector3
A vector with three components of type double.