ML Reference
ml::ImageProperties Class Reference

This class represents basic image properties: More...

#include <mlImageProperties.h>

Inheritance diagram for ml::ImageProperties:
ml::MedicalImageProperties ml::PagedImage

Public Member Functions

Construction, copying and initialization of ImageProperties
MLEXPORT ImageProperties ()
 Constructor.
 
virtual MLEXPORT ~ImageProperties ()
 Virtual destructor to suppress compiler warnings.
 
MLEXPORT ImageProperties (ImageVector extent, MLDataType dataType, MLdouble minValue, MLdouble maxValue)
 Constructor to set extent to extent, data type to dataType, minimum value to minValue and maximum value to maxValue.
 
MLEXPORT ImageProperties (const ImageProperties &imageProperties)
 Copy constructor from an existing imageProperties object to get an identical copy.
 
MLEXPORT ImagePropertiesoperator= (const ImageProperties &imageProperties)
 Assignment operator from an existing imageProperties object to get an identical copy.
 
MLEXPORT void setImageProperties (const ImageProperties &imageProperties)
 Copy property parameters from another image property instance imageProperties.
 
Comparison.
MLEXPORT bool operator== (const ImageProperties &imageProperties) const
 Returns true if *this and imageProperties are identical, otherwise false.
 
MLEXPORT bool operator!= (const ImageProperties &imageProperties) const
 Returns true if *this and imageProperties differ, otherwise false.
 
Set/Get image size/extents etc.
MLEXPORT void setImageExtent (const ImageVector &extent)
 Sets the extent of the (sub)image.
 
ImageVector getImageExtent () const
 Returns the extent of the (sub)image.
 
SubImageBox getBoxFromImageExtent () const
 Returns size of image as box with origin 0.
 
bool hasValidExtent () const
 Returns if the image has a valid extent (which means that all components are greater than 0).
 
MLint getNumVoxels () const
 Returns number of voxels in (sub)image.
 
MLint getSizeInBytes () const
 Returns number of potential bytes in (sub)image.
 
Set/Get data type.
virtual MLEXPORT void setDataType (MLDataType dataType)
 Sets type of data to dataType.
 
MLDataType getDataType () const
 Returns the data type of the image.
 
Set minimum and maximum data value.
void setMinVoxelValue (MLdouble minval)
 Sets assumed minimum value to minval.
 
MLdouble getMinVoxelValue () const
 Returns the assumed minimum value in data.
 
void setMaxVoxelValue (MLdouble maxval)
 Sets assumed maximum value to maxval.
 
MLdouble getMaxVoxelValue () const
 Returns the assumed maximum value in data.
 

Detailed Description

This class represents basic image properties:

The following image properties are available in this class:

  • Image extent,
  • Data type,
  • Minimum and maximum voxel value in image Note that the class itself is not exported to make inline possible. Stuff which is not inlined is exported explicitly.

Definition at line 42 of file mlImageProperties.h.

Constructor & Destructor Documentation

◆ ImageProperties() [1/3]

MLEXPORT ml::ImageProperties::ImageProperties ( )

Constructor.

Sets data type to MLuint8, extents to (0,...,0), minimum voxel value to 0, maximum voxel value to 0.

◆ ~ImageProperties()

virtual MLEXPORT ml::ImageProperties::~ImageProperties ( )
virtual

Virtual destructor to suppress compiler warnings.

◆ ImageProperties() [2/3]

MLEXPORT ml::ImageProperties::ImageProperties ( ImageVector extent,
MLDataType dataType,
MLdouble minValue,
MLdouble maxValue )

Constructor to set extent to extent, data type to dataType, minimum value to minValue and maximum value to maxValue.

◆ ImageProperties() [3/3]

MLEXPORT ml::ImageProperties::ImageProperties ( const ImageProperties & imageProperties)

Copy constructor from an existing imageProperties object to get an identical copy.

Member Function Documentation

◆ getBoxFromImageExtent()

SubImageBox ml::ImageProperties::getBoxFromImageExtent ( ) const
inline

Returns size of image as box with origin 0.

Definition at line 98 of file mlImageProperties.h.

◆ getDataType()

MLDataType ml::ImageProperties::getDataType ( ) const
inline

Returns the data type of the image.

Definition at line 122 of file mlImageProperties.h.

◆ getImageExtent()

ImageVector ml::ImageProperties::getImageExtent ( ) const
inline

Returns the extent of the (sub)image.

Definition at line 95 of file mlImageProperties.h.

◆ getMaxVoxelValue()

MLdouble ml::ImageProperties::getMaxVoxelValue ( ) const
inline

Returns the assumed maximum value in data.

Definition at line 136 of file mlImageProperties.h.

◆ getMinVoxelValue()

MLdouble ml::ImageProperties::getMinVoxelValue ( ) const
inline

Returns the assumed minimum value in data.

Definition at line 132 of file mlImageProperties.h.

◆ getNumVoxels()

MLint ml::ImageProperties::getNumVoxels ( ) const
inline

Returns number of voxels in (sub)image.

Note that it could become larger than 2^32 even on 32 bit systems. It will never be smaller than 0; the signed return type is used for safer signed arithmetics.

Definition at line 107 of file mlImageProperties.h.

◆ getSizeInBytes()

MLint ml::ImageProperties::getSizeInBytes ( ) const
inline

Returns number of potential bytes in (sub)image.

Note that it could become larger than 2^32 even on 32 bit systems. It will never be smaller than 0; the signed return type is used for safer signed arithmetics.

Definition at line 111 of file mlImageProperties.h.

References MLSizeOf().

◆ hasValidExtent()

bool ml::ImageProperties::hasValidExtent ( ) const
inline

Returns if the image has a valid extent (which means that all components are greater than 0).

Definition at line 101 of file mlImageProperties.h.

◆ operator!=()

MLEXPORT bool ml::ImageProperties::operator!= ( const ImageProperties & imageProperties) const

Returns true if *this and imageProperties differ, otherwise false.

◆ operator=()

MLEXPORT ImageProperties & ml::ImageProperties::operator= ( const ImageProperties & imageProperties)

Assignment operator from an existing imageProperties object to get an identical copy.

◆ operator==()

MLEXPORT bool ml::ImageProperties::operator== ( const ImageProperties & imageProperties) const

Returns true if *this and imageProperties are identical, otherwise false.

◆ setDataType()

virtual MLEXPORT void ml::ImageProperties::setDataType ( MLDataType dataType)
virtual

Sets type of data to dataType.

Reimplemented in ml::PagedImage.

◆ setImageExtent()

MLEXPORT void ml::ImageProperties::setImageExtent ( const ImageVector & extent)
inline

Sets the extent of the (sub)image.

Definition at line 92 of file mlImageProperties.h.

Referenced by ml::PagedImage::setImageExtent().

◆ setImageProperties()

MLEXPORT void ml::ImageProperties::setImageProperties ( const ImageProperties & imageProperties)

Copy property parameters from another image property instance imageProperties.

◆ setMaxVoxelValue()

void ml::ImageProperties::setMaxVoxelValue ( MLdouble maxval)
inline

Sets assumed maximum value to maxval.

Definition at line 134 of file mlImageProperties.h.

◆ setMinVoxelValue()

void ml::ImageProperties::setMinVoxelValue ( MLdouble minval)
inline

Sets assumed minimum value to minval.

Definition at line 130 of file mlImageProperties.h.


The documentation for this class was generated from the following file: