#include <ImageSuperClasses.h>
Public Member Functions | |
virtual double | getElementTypeMaximum () const =0 |
virtual double | getElementTypeMinimum () const =0 |
double | getValueRangeMaximum () const |
double | getValueRangeMinimum () const |
Image () | |
void | readFromFile (const char *fileName) |
void | setValueRangeMaximum (double value) |
void | setValueRangeMinimum (double value) |
void | writeToFile (const char *fileName) const |
virtual | ~Image () |
Protected Member Functions | |
void | setupImageBaseVariables () |
Protected Attributes | |
double | mValueRangeMaximum |
double | mValueRangeMinimum |
Definition at line 6 of file ImageSuperClasses.h.
Image::Image | ( | ) |
Constructor
Definition at line 25 of file ImageSuperClasses.cpp.
Image::~Image | ( | ) | [virtual] |
Destructor
Definition at line 29 of file ImageSuperClasses.cpp.
virtual double puma2::Image::getElementTypeMaximum | ( | ) | const [pure virtual] |
Tell about the maximal value which can be stored by an element (a sample) which is the base type of this image class. (see getElementTypeMaximum().)
virtual double puma2::Image::getElementTypeMinimum | ( | ) | const [pure virtual] |
Tell about the minimal value which can be stored by an element (a sample) which is the base type of this image class.lementTypeM (This should be some kind of constant, individually set for each subclass, but C++ allows such overloading only for functions, so we have to implement it as a constant function.)
double puma2::Image::getValueRangeMaximum | ( | ) | const [inline] |
get mValueRangeMaximum
Definition at line 71 of file ImageSuperClasses.h.
double puma2::Image::getValueRangeMinimum | ( | ) | const [inline] |
get mValueRangeMinimum
Definition at line 69 of file ImageSuperClasses.h.
void Image::readFromFile | ( | const char * | fileName | ) |
Read in an image from a given file. This usually is a convenience shortcut, in fact the class ImageReader will be employed to do the real work.
[in] | fileName | name of image file |
Definition at line 11 of file ImageSuperClasses.cpp.
void Image::setupImageBaseVariables | ( | ) | [protected] |
This function initializes the defaults for the variables mValueRangeMinimum and mValueRangeMaximum by setting them to the default value as delivered by calling getValueRangeMinimum() and getValueRangeMaximum() for the ElementType of the current image class. It must be called by every constructor of classes derived from Image, as I didn't find a way to inherit this behaviour "down the chain" :-(
Definition at line 31 of file ImageSuperClasses.cpp.
void puma2::Image::setValueRangeMaximum | ( | double | value | ) | [inline] |
set mValueRangeMaximum to value
[in] | value | new maximum |
Definition at line 67 of file ImageSuperClasses.h.
void puma2::Image::setValueRangeMinimum | ( | double | value | ) | [inline] |
set mValueRangeMinimum to value
[in] | value | new minimum |
Definition at line 64 of file ImageSuperClasses.h.
void Image::writeToFile | ( | const char * | fileName | ) | const |
Write this image to a file. This usually is a convenience shortcut, in fact the class ImageWriter will be employed to do the real work. The file type to be written is determined from the file name suffix.
[in] | fileName | name of image file |
Definition at line 18 of file ImageSuperClasses.cpp.
double puma2::Image::mValueRangeMaximum [protected] |
Holds the intended maximum value any sample of this image should have. This is not the current minimal value of all samples, but the value according to the range expected, like an 8-bit gray level image usually has an expected range from 0 (mValueRangeMinimum) to 255 (mValueRangeMaximum), whereas a 4-bit image has a range of 0..15, 12-bit has 0..4095 and so on.
Definition at line 33 of file ImageSuperClasses.h.
double puma2::Image::mValueRangeMinimum [protected] |
Holds the intended minimum value any sample of this image should have. This is not the current minimal value of all samples, but the value according to the range expected, like an 8-bit gray level image usually has an expected range from 0 (mValueRangeMinimum) to 255 (mValueRangeMaximum), whereas a 4-bit image has a range of 0..15, 12-bit has 0..4095 and so on.
Definition at line 24 of file ImageSuperClasses.h.