Base class for inrimages
![]() | getX () const get image x dimension |
![]() | getY () const get image y dimension |
![]() | getZ () const get image z dimension |
![]() | setX (const unsigned int x) set image x dimension |
![]() | setY (const unsigned int y) set image y dimension |
![]() | setZ (const unsigned int z) set image z dimension |
![]() | setVdim (const unsigned int v) set image vectorial dimension |
![]() | getVdim (void) const get image vectorial dimension |
![]() | getWdim (void) const get image words size (in bytes) |
![]() | getVX () const get image voxel size in x dimension |
![]() | getVY () const get image voxel size in y dimension |
![]() | getVZ () const get image voxel size in z dimension |
![]() | getData () const get image data buffer |
![]() | getWordSize () const get image word size |
![]() | getWordKind () const get word kind |
![]() | getWordSign () const get word sign |
![]() | getVectorialMode () const get VECTORIAL_MODE |
![]() | getFileFormat (void) const get image file format |
![]() | setFileFormat (IMAGE_FORMAT f) set a new image file format for saving |
![]() | write (const char *name) const throw(UnableToCreateFile, UnableToWriteHeader, UnableToWriteData) Writes inrimage to file whose path is given as argument |
![]() | operator= (const BaseInrimage& img) throw(InvalidSize, InvalidVectorialMode, InvalidVoxelSize, NotEnoughMemory) Makes *this an replica of img |
![]() | allocate (void) throw(NotEnoughMemory) Allocates and fills with zero image data buffer |
![]() | free (void) frees image data buffer |
![]() | setVoxelSize (float vx, float vy, float vz) throw(InvalidVoxelSize) set a new image voxel size |
![]() | setData (void *data) set a new data buffer |
![]() | setVectorialMode (VECTORIAL_MODE vm) throw(InvalidVectorialMode) Changes image vectorial mode |
![]() | setInterlacedData (void) toggles buffer to produce an interlaced vector image (for vectorial images only) |
![]() | setNonInterlacedData (void) toggles buffer to produce an interlaced vector image (for vectorial images only) |
![]() | setUserParams (unsigned int n, char **params) set user defined parameters strings to write into image file header |
![]() | resize (unsigned int xdim, unsigned int ydim, unsigned int zdim, unsigned int vdim = 1, unsigned int wdim = 1, WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED) throw(InvalidSize, NotEnoughMemory) Changes image size |
![]() | setWords (WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED) throw(NotEnoughMemory) Changes image word type |
![]() | _image2BaseInrimage (const _image& img) throw(BaseInrimage::InvalidSize, BaseInrimage::InvalidVoxelSize, BaseInrimage::InvalidVectorialMode) Converts an _image structure to a BaseInrimage |
![]() | BaseInrimage2_image (const BaseInrimage& bimg) Converts a BaseImage structure to an _image |
![]() | userField (const char *name, char *val, unsigned int n) const Check whether given field exists in user defined strings |
![]() | updateUserField (const char *name, const char *val) const Check whether given field exists in user defined strings |
![]() | addUserField (const char *name, const char *val) Add a given field to the user defined strings |
![]() | removeUserField (const char *name) Remove a given field to the user defined strings |
![]() | rescaleBuffer (FROM, TO, double fmin, double fmax, double tmin, double tmax, double offset, BaseInrimage& img) Rescale data values into another image |
![]() | getBounds (double &min, double &max) const compute grey level bounds of image buffer (valid for image scalar types only) |
![]() | Exception classes | ||||||||
![]() | Constructors
| ||||||||
![]() | Destructors
|
![]() | xdim Image x dimension (number of columns) |
![]() | ydim Image y dimension (number of rows) |
![]() | zdim Image z dimension (number of planes) |
![]() | vdim Image vectorial dimension |
![]() | vx Image voxel size in x dimension |
![]() | vy Image voxel size in y dimension |
![]() | vz Image voxel size in z dimension |
![]() | data Image data buffer |
![]() | wdim Image word size (in bytes) |
![]() | wordKind Image word kind |
![]() | sign Image word sign |
![]() | vectMode Data buffer vectors are interlaced or non interlaced |
![]() | user User defined strings array |
![]() | nuser Number of user strings |
![]() | imageFormat format of image source file |
![]() | info Optional additional information |
![]() | readHeader (const char *name) throw(ImageNotFound, InvalidHeader, UnknownImageType) open inrimage file and read header |
Base class for inrimages
class UnknownImageType: public Exception
class InvalidHeader: public Exception
class InvalidData: public Exception
class UnableToCreateFile: public Exception
class UnableToWriteHeader: public Exception
class UnableToWriteData: public Exception
class NotEnoughMemory: public Exception
class InvalidSize: public Exception
class InvalidVoxelSize: public Exception
class InvalidVectorialMode: public Exception
unsigned int ydim
unsigned int zdim
unsigned int vdim
float vx
float vy
float vz
void* data
unsigned int wdim
WORD_KIND wordKind
SIGN sign
VECTORIAL_MODE vectMode
char** user
unsigned int nuser
IMAGE_FORMAT imageFormat
ImageInformation* info
unsigned int getX() const
unsigned int getY() const
unsigned int getZ() const
void setX(const unsigned int x)
void setY(const unsigned int y)
void setZ(const unsigned int z)
void setVdim(const unsigned int v)
unsigned int getVdim(void) const
unsigned int getWdim(void) const
float getVX() const
float getVY() const
float getVZ() const
void* getData() const
unsigned int getWordSize() const
WORD_KIND getWordKind() const
SIGN getWordSign() const
VECTORIAL_MODE getVectorialMode() const
IMAGE_FORMAT getFileFormat(void) const
void setFileFormat(IMAGE_FORMAT f)
Constructors
BaseInrimage(const char *name, bool headerOnly = false, VECTORIAL_MODE vm = VM_INTERLACED, VECTORIAL_MODE filevm = VM_INTERLACED) throw(ImageNotFound, UnknownImageType, InvalidHeader, InvalidData)
UnknownImageType unknown image file format
InvalidData invalid inriamge header read
InvalidData invalid inriamge data read
headerOnly - whether to read header or full image
vm - interlaced or non-interlaced mode for vectorial image
filevm - if VM_NON_INTERLACED, data is considered as non-interlaced
BaseInrimage(unsigned int xdim, unsigned int ydim, unsigned int zdim, unsigned int vdim = 1, unsigned int wdim = 1, WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED, float vx = 1.0, float vy = 1.0, float vz = 1.0) throw(InvalidSize, NotEnoughMemory, InvalidVoxelSize)
NotEnoughMemory unable to allocate memory to store image
InvalidVoxelSize voxels size should be > 0.0
ydim - image number of rows
zdim - image number of planes
vdim - image vectorial dimension
wdim - image word size in bytes
wordKind - image word kind
sign - image word sign
vx - distance between voxels in the X direction
vy - distance between voxels in the Y direction
vz - distance between voxels in the Z direction
BaseInrimage(unsigned int xdim, unsigned int ydim, unsigned int zdim, void *data, unsigned int vdim = 1, unsigned int wdim = 1, WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED, float vx = 1.0, float vy = 1.0, float vz = 1.0) throw(InvalidSize, InvalidVoxelSize)
InvalidVoxelSize voxels size should be > 0.0
ydim - image number of rows
zdim - image number of planes
data - image data buffer
vdim - image vectorial dimension
wdim - image word size in bytes
wordKind - image word kind
sign - image word sign
vx - distance between voxels in the X direction
vy - distance between voxels in the Y direction
vz - distance between voxels in the Z direction
explicit BaseInrimage(const BaseInrimage& img) throw(InvalidSize, InvalidVectorialMode, InvalidVoxelSize, NotEnoughMemory)
InvalidVectorialMode attempt to set a vector mode to a scalar image or opposite
InvalidVoxelSize voxels size should be > 0.0
NotEnoughMemory unable to allocate memory to store image Destructors
void write(const char *name) const throw(UnableToCreateFile, UnableToWriteHeader, UnableToWriteData)
UnableToWriteHeader write error encountered while writting header
UnableToWriteData write error encountered while writting data BaseInrimage& operator=(const BaseInrimage& img) throw(InvalidSize, InvalidVectorialMode, InvalidVoxelSize, NotEnoughMemory)
InvalidVectorialMode attempt to set a vector mode to a scalar image or opposite
InvalidVoxelSize voxels size should be > 0.0
NotEnoughMemory unable to allocate memory to store image virtual void allocate(void) throw(NotEnoughMemory)
virtual void free(void)
void setVoxelSize(float vx, float vy, float vz) throw(InvalidVoxelSize)
vy - Y voxel size
vz - Z voxel size
InvalidVoxelSize - invalid voxel size virtual void* setData(void *data)
virtual void setVectorialMode(VECTORIAL_MODE vm) throw(InvalidVectorialMode)
virtual void setInterlacedData(void)
virtual void setNonInterlacedData(void)
void setUserParams(unsigned int n, char **params)
params - strings array virtual void resize(unsigned int xdim, unsigned int ydim, unsigned int zdim, unsigned int vdim = 1, unsigned int wdim = 1, WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED) throw(InvalidSize, NotEnoughMemory)
NotEnoughMemory unable to allocate memory to store image
ydim - image number of rows
zdim - image number of planes
vdim - image vectorial dimension
wdim - image word size in bytes
wordKind - image word kind
sign - image word sign
virtual void setWords(WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED) throw(NotEnoughMemory)
image - word type
static BaseInrimage* _image2BaseInrimage(const _image& img) throw(BaseInrimage::InvalidSize, BaseInrimage::InvalidVoxelSize, BaseInrimage::InvalidVectorialMode)
InvalidVoxelSize voxels size should be > 0.0
InvalidVectorialMode attempt to set a vector mode to a scalar image or opposite
static _image* BaseInrimage2_image(const BaseInrimage& bimg)
bool userField(const char *name, char *val, unsigned int n) const
val - returned field value (buffer must have been previously allocated)
n - value buffer length
bool updateUserField(const char *name, const char *val) const
val - value to give to field
void addUserField(const char *name, const char *val)
val - value to give to field bool removeUserField(const char *name)
template
fmax - maximum value of image
tmin - minimum value of image
tmax - maximum value of image
offset - offset to add to every value.
img - image to put result in void getBounds(double &min, double &max) const
max - returned max value _image* readHeader(const char *name) throw(ImageNotFound, InvalidHeader, UnknownImageType)
InvalidHeader invalid inrimage header encountered
UnknownImageType unknown file format
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de