13#ifndef ML_IMAGE_PROPERTIES_H
14#define ML_IMAGE_PROPERTIES_H
102 return getNumVoxels() > 0;
107 inline MLint getNumVoxels()
const {
const MLint retVal = ImageVector::compMul(_extent);
return retVal < 0 ? 0 : retVal; }
This class represents basic image properties:
MLEXPORT ImageProperties()
Constructor.
MLdouble getMaxVoxelValue() const
Returns the assumed maximum value in data.
MLEXPORT bool operator!=(const ImageProperties &imageProperties) const
Returns true if *this and imageProperties differ, otherwise false.
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 val...
bool hasValidExtent() const
Returns if the image has a valid extent (which means that all components are greater than 0).
MLDataType getDataType() const
Returns the data type of the image.
void setMaxVoxelValue(MLdouble maxval)
Sets assumed maximum value to maxval.
MLEXPORT void setImageExtent(const ImageVector &extent)
Sets the extent of the (sub)image.
virtual MLEXPORT void setDataType(MLDataType dataType)
Sets type of data to dataType.
MLEXPORT ImageProperties & operator=(const ImageProperties &imageProperties)
Assignment operator from an existing imageProperties object to get an identical copy.
SubImageBox getBoxFromImageExtent() const
Returns size of image as box with origin 0.
MLint getNumVoxels() const
Returns number of voxels in (sub)image.
virtual MLEXPORT ~ImageProperties()
Virtual destructor to suppress compiler warnings.
ImageVector getImageExtent() const
Returns the extent of the (sub)image.
void setMinVoxelValue(MLdouble minval)
Sets assumed minimum value to minval.
MLEXPORT ImageProperties(const ImageProperties &imageProperties)
Copy constructor from an existing imageProperties object to get an identical copy.
MLdouble getMinVoxelValue() const
Returns the assumed minimum value in data.
MLEXPORT void setImageProperties(const ImageProperties &imageProperties)
Copy property parameters from another image property instance imageProperties.
MLEXPORT bool operator==(const ImageProperties &imageProperties) const
Returns true if *this and imageProperties are identical, otherwise false.
MLint getSizeInBytes() const
Returns number of potential bytes in (sub)image.
MLEXPORT size_t MLSizeOf(MLDataType dataType)
Returns the size of the data type dataType in bytes.
MLint32 MLDataType
MLDataType.
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...