ML Reference
|
This class represents basic image properties: More...
#include <mlImageProperties.h>
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 ImageProperties & | operator= (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. | |
Deprecated | |
MLEXPORT void | setImgProps (const ImageProperties &imgProps) |
MLEXPORT void | setImgExt (const ImageVector &ext) |
ImageVector | getImgExt () const |
SubImageBox | getBoxFromImgExt () const |
MLint | getSize () const |
MLint | getByteSize () const |
This class represents basic image properties:
The following image properties are available in this class:
Definition at line 40 of file mlImageProperties.h.
MLEXPORT ml::ImageProperties::ImageProperties | ( | ) |
Constructor.
Sets data type to MLuint8, extents to (0,...,0), minimum voxel value to 0, maximum voxel value to 0.
virtual MLEXPORT ml::ImageProperties::~ImageProperties | ( | ) | [virtual] |
Virtual destructor to suppress compiler warnings.
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
.
MLEXPORT ml::ImageProperties::ImageProperties | ( | const ImageProperties & | imageProperties | ) |
Copy constructor from an existing imageProperties
object to get an identical copy.
SubImageBox ml::ImageProperties::getBoxFromImageExtent | ( | ) | const [inline] |
Returns size of image as box with origin 0.
Definition at line 96 of file mlImageProperties.h.
References ml::ImageVector.
SubImageBox ml::ImageProperties::getBoxFromImgExt | ( | ) | const [inline] |
Definition at line 179 of file mlImageProperties.h.
MLint ml::ImageProperties::getByteSize | ( | ) | const [inline] |
Definition at line 185 of file mlImageProperties.h.
MLDataType ml::ImageProperties::getDataType | ( | ) | const [inline] |
Returns the data type of the image.
Definition at line 120 of file mlImageProperties.h.
ImageVector ml::ImageProperties::getImageExtent | ( | ) | const [inline] |
Returns the extent of the (sub)image.
Definition at line 93 of file mlImageProperties.h.
ImageVector ml::ImageProperties::getImgExt | ( | ) | const [inline] |
Definition at line 176 of file mlImageProperties.h.
MLdouble ml::ImageProperties::getMaxVoxelValue | ( | ) | const [inline] |
Returns the assumed maximum value in data.
Definition at line 134 of file mlImageProperties.h.
MLdouble ml::ImageProperties::getMinVoxelValue | ( | ) | const [inline] |
Returns the assumed minimum value in data.
Definition at line 130 of file mlImageProperties.h.
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 105 of file mlImageProperties.h.
References ml::compMul().
MLint ml::ImageProperties::getSize | ( | ) | const [inline] |
Definition at line 182 of file mlImageProperties.h.
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 109 of file mlImageProperties.h.
References MLSizeOf().
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 99 of file mlImageProperties.h.
MLEXPORT bool ml::ImageProperties::operator!= | ( | const ImageProperties & | imageProperties | ) | const |
Returns true if *this and imageProperties
differ, otherwise false.
MLEXPORT ImageProperties& ml::ImageProperties::operator= | ( | const ImageProperties & | imageProperties | ) |
Assignment operator from an existing imageProperties
object to get an identical copy.
MLEXPORT bool ml::ImageProperties::operator== | ( | const ImageProperties & | imageProperties | ) | const |
Returns true if *this and imageProperties
are identical, otherwise false.
virtual MLEXPORT void ml::ImageProperties::setDataType | ( | MLDataType | dataType | ) | [virtual] |
Sets type of data to dataType
.
MLEXPORT void ml::ImageProperties::setImageExtent | ( | const ImageVector & | extent | ) | [inline] |
Sets the extent
of the (sub)image.
Definition at line 90 of file mlImageProperties.h.
MLEXPORT void ml::ImageProperties::setImageProperties | ( | const ImageProperties & | imageProperties | ) |
Copy property parameters from another image property instance imageProperties
.
Referenced by ml::MedicalImageProperties::setImgProps().
MLEXPORT void ml::ImageProperties::setImgExt | ( | const ImageVector & | ext | ) | [inline] |
Definition at line 173 of file mlImageProperties.h.
MLEXPORT void ml::ImageProperties::setImgProps | ( | const ImageProperties & | imgProps | ) | [inline] |
Definition at line 170 of file mlImageProperties.h.
void ml::ImageProperties::setMaxVoxelValue | ( | MLdouble | maxval | ) | [inline] |
Sets assumed maximum value to maxval.
Definition at line 132 of file mlImageProperties.h.
void ml::ImageProperties::setMinVoxelValue | ( | MLdouble | minval | ) | [inline] |
Sets assumed minimum value to minval.
Definition at line 128 of file mlImageProperties.h.