Inrimages
![]() | operator= (const Inrimage& img) throw(Inrimage::InvalidSize, Inrimage::InvalidVectorialMode, Inrimage::InvalidVoxelSize, Inrimage::NotEnoughMemory) Make *this a replica of img |
![]() | allocate (unsigned int xdim, unsigned int ydim, unsigned int zdim, WORD_TYPE wt, unsigned int vdim = 1, VECTORIAL_MODE vm = VM_INTERLACED, float vx = 1.0, float vy = 1.0, float vz = 1.0) const throw(Inrimage::InvalidSize, Inrimage::UnknownType, Inrimage::NotEnoughMemory, InvalidVoxelSize) Creates an inrimage from its size and its type |
![]() | allocate (const Inrimage& img) const throw(Inrimage::InvalidSize, Inrimage::InvalidVectorialMode, Inrimage::InvalidVoxelSize, Inrimage::NotEnoughMemory) Created an inrimage identical to img |
![]() | 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(Inrimage::InvalidSize, Inrimage::NotEnoughMemory) Changes image size |
![]() | ncols (void) const returns number of columns |
![]() | nrows (void) const returns number of rows |
![]() | getName (void) const get inrimage file name |
![]() | setName (const TclString& _name) set inrimage file name |
![]() | getType (void) const returns inrimage type |
![]() | setType (WORD_TYPE type, unsigned int vdim = 1, VECTORIAL_MODE vm = VM_INTERLACED, bool resize = true) set inrimage type |
![]() | getArray (void) const returns pointer a 3D buffer for a scalar image or interleaved vectorial image |
![]() | getVarray (void) const returns a 4D buffer for a vectorial non-interleaved image |
![]() | sizeofWords (void) const returns size of image words (each vector component size) |
![]() | sizeofVoxels (void) const returns size of each voxel (a vector is one voxel) |
![]() | write (const char *name) throw(Inrimage::UnableToCreateFile, Inrimage::UnableToWriteHeader, Inrimage::UnableToWriteData) Writes inrimage to file whose path is given as argument |
![]() | write (const char *name, CompressType ct) throw(UnableToCreateFile, UnableToWriteHeader, UnableToWriteData, InvalidCompressType) Writes inrimage to file whose path is given as argument |
![]() | allocate (void) throw(Inrimage::NotEnoughMemory) Allocates and fills with zero image data buffer |
![]() | free (void) frees image data buffer |
![]() | inside (const int x, const int y, const int z) Tests if a voxel position is within the bounds of the image |
![]() | setData (void *data) throw(NotEnoughMemory) Set a new data buffer |
![]() | setVectorialMode (VECTORIAL_MODE vm) throw(Inrimage::InvalidVectorialMode, Inrimage::NotEnoughMemory) Changes image vectorial mode |
![]() | getGeometry (void) const returns image geometry |
![]() | setGeometry (GEOMETRY g) set image geometry |
![]() | getInterpolator () const set interpolator object |
![]() | getExtrapolator () const set extrapolator object |
![]() | setInterpolator (Interpolator* i) set interpolator object |
![]() | setExtrapolator (Extrapolator* e) set extrapolator object |
![]() | newConverter (void) const creates an image coordinates converter for this image geometry |
![]() | getRealVoxel (double x, double y, double z) const Return image voxel at (x,y,z), using interpolation or extrapolation as appropriate |
![]() | getRealVoxel (double x, double y, double z, Voxel& v) const Stores voxel (x, y, z) value in v, using interpolation or extrapolation as appropriate |
![]() | getVoxel (unsigned int x, unsigned int y, unsigned int z) const returns a Voxel representing given image voxel |
![]() | getVoxel (unsigned int x, unsigned int y, unsigned int z, Voxel& v) const stores voxel (x, y, z) value in v |
![]() | setVoxel (unsigned int x, unsigned int y, unsigned int z, const Voxel& v) set given image voxel with transmitted voxel value |
![]() | checkVoxel (unsigned int x, unsigned int y, unsigned int z) const Returns a Voxel representing given image voxel |
![]() | line (int x1, int y1, int x2, int y2, unsigned int z, const Voxel& v) draw a 2D discrete line in given image plane |
![]() | setWords (WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED) throw(Inrimage::NotEnoughMemory) Changes image word type |
![]() | in (unsigned int row, unsigned int col, unsigned int plane) indicates wether voxel lies in image bounds |
![]() | sameSize (Inrimage const& inr) const indicates wether inr has same size than this |
![]() | crop (unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2) throw(Inrimage::InvalidArguments) crops region between (x1, y1, z1) and (x2, y2, z2) in inrimage Crop expects x1 < x2, y1 < y2 and z1 < z2 |
![]() | isolateRegion (unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2) throw(Inrimage::InvalidArguments) put to 0 all voxels outside region between (x1, y1, z1) and (x2, y2, z2) in inrimage it expects x1 < x2, y1 < y2 and z1 < z2 |
![]() | zeroRegion (unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2) throw(Inrimage::InvalidArguments) put to 0 all voxels inside region between (x1, y1, z1) and (x2, y2, z2) in inrimage it expects x1 < x2, y1 < y2 and z1 < z2 |
![]() | getBounds (Voxel *min, Voxel *max, bool vectorNorm = true) const compute inrimage grey level bounds |
![]() | setBounds (Voxel *min, Voxel *max, int z = -1) Set inrimage grey level bounds (rescales GL window) |
![]() | vectorial (WORD_TYPE) returns true if type is WT_FLOAT_VECTOR, WT_DOUBLE_VECTOR, WT_RGB or WT_RGBA, false otherwise |
![]() | floating (WORD_TYPE) returns true if type is WT_FLOAT, WT_DOUBLE, WT_FLOAT_VECTOR or WT_DOUBLE_VECTOR, false otherwise |
![]() | splitVectors (void) const Split a vectorial inrimage in one inrimage per component |
![]() | setComponentsFrom (Inrimage **inrs) throw(Inrimage::InvalidSize, InvalidArguments) Set vectorial components from an array of scalar inrimages |
![]() | flip (SLICE_ORIENTATION geom) flip an inrimage in given direction |
![]() | switchGeometry (SLICE_ORIENTATION geom1, SLICE_ORIENTATION geom2) switch two inrimage dimensions |
![]() | mel (const Inrimage *inr, int xdest, int ydest, int zdest, int xorg, int yorg, int zorg, unsigned int dx, unsigned int dy, unsigned int dz) throw(Inrimage::InvalidArguments) mel given inrimage with this by substituing a box from this with a box from inr |
![]() | createHistogram () const creates and return the Histogram of this image |
![]() | noise (unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2, Noise kind, double mean, double dev) throw(Inrimage::InvalidArguments ) creates a noisy cube inside this inrimage |
![]() | convertCast (WORD_TYPE type) converts inrimage to any type |
![]() | convertScale (WORD_TYPE type) converts inrimage to any type, resizing grey-levels |
![]() | eval (char *func, int nmbr, Var_list *op) throw(Inrimage::InvalidArguments) Evaluates expression in function string |
![]() | createDirectionArray (int frequency = DEFAULT_SPHERE_FREQUENCY) Creates a vector array corresponding to the position of unit vector on a spherical dome of frequency "frequency" |
![]() | underSample (unsigned int sx = 2, unsigned int sy = 2, unsigned int sz = 1) Undersamples image by an integer coefficient |
![]() | overSample (unsigned int sx, unsigned int sy, unsigned int sz) throw(Inrimage::InvalidSize) Oversample an image |
![]() | resample (unsigned int sx, unsigned int sy, unsigned int sz) Resamples an image to given image size |
![]() | setRegion (int x1, int y1, int z1, int x2, int y2, int z2) set region in which operations are performed |
![]() | getRegion (int& x1, int& y1, int& z1, int& x2, int& y2, int& z2) get region in which operations are performed |
![]() | getWorkRegion (unsigned int& x1, unsigned int& y1, unsigned int& z1, unsigned int& x2, unsigned int& y2, unsigned int& z2) const get region [(x1,y1,z1),(x2,y2,z2)) in which operations are should be performed |
![]() | copyRegion (Inrimage const& img) copy region from another image |
![]() | regionIsWholeImage () const test if region is the whole image |
![]() | Exception classes
| ||||||||||||
![]() | Constructors
| ||||||||||||
![]() | Destructor
|
![]() | name image file name | ||||
![]() | type inrimage type | ||||
![]() | geom inrimage geometry | ||||
![]() | interpolator interpolator object used for image values at real coordinates inside the image.
| ||||
![]() | extrapolator extrapolator object used for image values at real coordinates outside the image. | ||||
![]() | region [6] region in which operations are performed, in world coordinates. not used by all operations. |
![]() | TclInrimage buffer convertion routine |
![]() | setType (void) throw(Inrimage::UnknownType) set initial image type |
![]() | index3D (void) throw(Inrimage::NotEnoughMemory) builds 3D index (array buffer, standard inrimage) |
![]() | index4D (void) throw(Inrimage::NotEnoughMemory) builds 4D index (varray buffer, non-interlaced vectorial inrimage) |
![]() | buildIndex () throw(Inrimage::NotEnoughMemory) builds 3D or 4D index depending on vectorial mode |
![]() | deleteArray (void) deletes array buffer |
![]() | queryGeometry (void) set image geometry field looking at inrimage header tags |
![]() | convertFromRGBToRGBABuffer (void) buffer convertion routine |
![]() | convertFromRGBAToRGBBuffer (void) buffer convertion routine |
Destructors
Inrimages
class InvalidArguments: public Exception
class InvalidCompressType: public Exception
class MissingCompressInfo: public Exception
WT_SIGNED_CHAR
WT_UNSIGNED_SHORT
WT_SIGNED_SHORT
WT_UNSIGNED_INT
WT_SIGNED_INT
WT_UNSIGNED_LONG
WT_SIGNED_LONG
WT_FLOAT
WT_DOUBLE
WT_RGB
WT_RGBA
SLICE_Y
CYLINDRICAL
SPHERICAL
Inrimage(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, UnknownType, 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
Inrimage(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, UnknownType, 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
Inrimage(unsigned int xdim, unsigned int ydim, unsigned int zdim, WORD_TYPE wt, unsigned int vdim = 1, VECTORIAL_MODE vm = VM_INTERLACED, float vx = 1.0, float vy = 1.0, float vz = 1.0) throw(InvalidSize, UnknownType, NotEnoughMemory, InvalidVoxelSize)
NotEnoughMemory unable to allocate image buffer
InvalidVoxelSize voxels size should be > 0.0
ydim - image number of rows
zdim - image number of planes
wt - inrimage word type
vdim - vectorial dimension (for WT_FLOAT_VECTOR and WT_DOUBLE_VECTOR only, ignored otherwise)
vectorial - mode (for WT_FLOAT_VECTOR and WT_DOUBLE_VECTOR only, ignored otherwise)
vx - distance between voxels in the X direction
vy - distance between voxels in the Y direction
vz - distance between voxels in the Z direction
Inrimage(unsigned int n, Inrimage **inrs, WORD_TYPE wt = WT_FLOAT_VECTOR, VECTORIAL_MODE vm = VM_INTERLACED, float vx = 1.0, float vy = 1.0, float vz = 1.0) throw(InvalidSize, InvalidArguments, NotEnoughMemory, InvalidVoxelSize)
NotEnoughMemory unable to allocate image buffer
InvalidVoxelSize voxels size should be > 0.0
inrs - inrimages array
wt - type (only WT_FLOAT_VECTOR and WT_DOUBLE_VECTOR)
vm - vectorial mode
vx - distance between voxels in the X direction
vy - distance between voxels in the Y direction
vz - distance between voxels in the Z direction
Inrimage(const Inrimage& img) throw(InvalidSize, InvalidVectorialMode, InvalidVoxelSize, NotEnoughMemory)
InvalidVectorialMode img has scalar vectorial mode for vectorial image or opposite
InvalidVoxelSize img has <= 0 voxel size
NotEnoughMemory unable to allocate image buffer
virtual Inrimage* allocate(unsigned int xdim, unsigned int ydim, unsigned int zdim, WORD_TYPE wt, unsigned int vdim = 1, VECTORIAL_MODE vm = VM_INTERLACED, float vx = 1.0, float vy = 1.0, float vz = 1.0) const throw(Inrimage::InvalidSize, Inrimage::UnknownType, Inrimage::NotEnoughMemory, InvalidVoxelSize)
NotEnoughMemory unable to allocate image buffer
InvalidVoxelSize voxels size should be > 0.0
ydim - image number of rows
zdim - image number of planes
wt - inrimage word type
vdim - vectorial dimension (for WT_FLOAT_VECTOR and WT_DOUBLE_VECTOR only, ignored otherwise)
vectorial - mode (for WT_FLOAT_VECTOR and WT_DOUBLE_VECTOR only, ignored otherwise)
vx - distance between voxels in the X direction
vy - distance between voxels in the Y direction
vz - distance between voxels in the Z direction
virtual Inrimage* allocate(const Inrimage& img) const throw(Inrimage::InvalidSize, Inrimage::InvalidVectorialMode, Inrimage::InvalidVoxelSize, Inrimage::NotEnoughMemory)
InvalidVectorialMode img has scalar vectorial mode for vectorial image or opposite
InvalidVoxelSize img has <= 0 voxel size
NotEnoughMemory unable to allocate image buffer 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(Inrimage::InvalidSize, Inrimage::NotEnoughMemory)
NotEnoughMemory unable to allocate image buffer
ydim - image number of rows
zdim - image number of planes
vdim - image vectorial dimension
wdim - image word size in bytes
unsigned int ncols(void) const
unsigned int nrows(void) const
const TclString& getName(void) const
void setName(const TclString& _name)
WORD_TYPE getType(void) const
void setType(WORD_TYPE type, unsigned int vdim = 1, VECTORIAL_MODE vm = VM_INTERLACED, bool resize = true)
vdim - vectorial dimension (for WT_FLOAT_VECTOR and WT_DOUBLE_VECTOR types only)
resize - whether image should be resized (and buffer reallocated to new image size) void*** getArray(void) const
void**** getVarray(void) const
unsigned int sizeofWords(void) const
unsigned int sizeofVoxels(void) const
void write(const char *name) throw(Inrimage::UnableToCreateFile, Inrimage::UnableToWriteHeader, Inrimage::UnableToWriteData)
UnableToWriteHeader write error encountered while writting header
UnableToWriteData write error encountered while writting data void write(const char *name, CompressType ct) throw(UnableToCreateFile, UnableToWriteHeader, UnableToWriteData, InvalidCompressType)
UnableToWriteHeader write error encountered while writting header
UnableToWriteData write error encountered while writting data
ct - number of bits to convert image to before writing.
virtual void allocate(void) throw(Inrimage::NotEnoughMemory)
virtual void free(void)
bool inside(const int x, const int y, const int z)
y - the y coordinate of the voxel position
z - the z coordinate of the voxel position
virtual void* setData(void *data) throw(NotEnoughMemory)
virtual void setVectorialMode(VECTORIAL_MODE vm) throw(Inrimage::InvalidVectorialMode, Inrimage::NotEnoughMemory)
NotEnoughMemory unable to allocate temporary buffer to swap vectors GEOMETRY getGeometry(void) const
void setGeometry(GEOMETRY g)
Interpolator const* getInterpolator() const
Extrapolator const* getExtrapolator() const
void setInterpolator(Interpolator* i)
void setExtrapolator(Extrapolator* e)
ImageGeometry* newConverter(void) const
Voxel* getRealVoxel(double x, double y, double z) const
y - Y voxel coordinate
z - Z voxel coordinate
Voxel& getRealVoxel(double x, double y, double z, Voxel& v) const
y - Y voxel coordinate
z - Z voxel coordinate
v - voxel to store value Voxel* getVoxel(unsigned int x, unsigned int y, unsigned int z) const
y - Y voxel coordinate
z - Z voxel coordinate Voxel& getVoxel(unsigned int x, unsigned int y, unsigned int z, Voxel& v) const
y - Y voxel coordinate
z - Z voxel coordinate
v - voxel to store value void setVoxel(unsigned int x, unsigned int y, unsigned int z, const Voxel& v)
y - Y voxel coordinate
z - Z voxel coordinate
v - voxel value Voxel* checkVoxel(unsigned int x, unsigned int y, unsigned int z) const
y - Y voxel coordinate
z - Z voxel coordinate void line(int x1, int y1, int x2, int y2, unsigned int z, const Voxel& v)
y1 - first pixel Y coordinate
x2 - last pixel X coordinate
y2 - last pixel Y coordinate
z - image plane
v - line voxels value virtual void setWords(WORD_KIND wordKind = WK_FIXED, SIGN sign = SGN_SIGNED) throw(Inrimage::NotEnoughMemory)
sign - image word sign
bool in(unsigned int row, unsigned int col, unsigned int plane)
col - voxel column (X)
plane - voxel plane (Z) bool sameSize(Inrimage const& inr) const
void crop(unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2) throw(Inrimage::InvalidArguments)
y1 - first crop box corner Y coordinate
z1 - first crop box corner Z coordinate
x2 - second crop box corner X coordinate (x1 should be < x2)
y2 - secont crop box corner Y coordinate (y1 should be < y2)
z2 - second crop box corner Z coordinate (z1 should be < z2)
void isolateRegion(unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2) throw(Inrimage::InvalidArguments)
y1 - first crop box corner Y coordinate
z1 - first crop box corner Z coordinate
x2 - second crop box corner X coordinate (x1 should be < x2)
y2 - secont crop box corner Y coordinate (y1 should be < y2)
z2 - second crop box corner Z coordinate (z1 should be < z2)
void zeroRegion(unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2) throw(Inrimage::InvalidArguments)
y1 - first crop box corner Y coordinate
z1 - first crop box corner Z coordinate
x2 - second crop box corner X coordinate (x1 should be < x2)
y2 - secont crop box corner Y coordinate (y1 should be < y2)
z2 - second crop box corner Z coordinate (z1 should be < z2)
void getBounds(Voxel *min, Voxel *max, bool vectorNorm = true) const
max - max GL voxel value (max should have been allocated with inrimage dynamic type)
vectorNorm - if true, this method returns min and max vector norm for vectorial inrimages, otherwise it returns min and max vector component void setBounds(Voxel *min, Voxel *max, int z = -1)
max - max GL value (max should have been allocated with inrimage dynamic type)
z - (if >= 0) slice number to modify static bool vectorial(WORD_TYPE)
static bool floating(WORD_TYPE)
Inrimage** splitVectors(void) const
void setComponentsFrom(Inrimage **inrs) throw(Inrimage::InvalidSize, InvalidArguments)
InvalidArguments one of the inrimages is vectorial void flip(SLICE_ORIENTATION geom)
void switchGeometry(SLICE_ORIENTATION geom1, SLICE_ORIENTATION geom2)
geom2 - second dimension to switch void mel(const Inrimage *inr, int xdest, int ydest, int zdest, int xorg, int yorg, int zorg, unsigned int dx, unsigned int dy, unsigned int dz) throw(Inrimage::InvalidArguments)
xdest - X coordinate of destination box
ydest - Y coordinate of destination box
zdest - Z coordinate of destination box
xorg - X coordinate of source box
yorg - Y coordinate of source box
zorg - Z coordinate of source box
dx - X size of box to mel
dy - Y size of box to mel
dz - Z size of box to mel
GenericHistogram* createHistogram() const
enum Noise
void noise(unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2, Noise kind, double mean, double dev) throw(Inrimage::InvalidArguments )
y1 - first noisy box corner Y coordinate
z1 - first noisy box corner Z coordinate
x2 - second noisy box corner X coordinate
y2 - second noisy box corner Y coordinate
z2 - second noisy box corner Z coordinate
kind - noise kind
mean - noise value (if fromImage == false)
dev - mean dev value
void convertCast(WORD_TYPE type)
void convertScale(WORD_TYPE type)
void eval(char *func, int nmbr, Var_list *op) throw(Inrimage::InvalidArguments)
alphabetic index hierarchy of classes this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling static Vec3
void underSample(unsigned int sx = 2, unsigned int sy = 2, unsigned int sz = 1)
sy - Y sampling step (1 or more)
sz - Z sampling step (1 or more) void overSample(unsigned int sx, unsigned int sy, unsigned int sz) throw(Inrimage::InvalidSize)
sy - new image Y dimension
sz - new image Z dimension
void resample(unsigned int sx, unsigned int sy, unsigned int sz)
sy - new image Y dimension
sz - new image Z dimension void setRegion(int x1, int y1, int z1, int x2, int y2, int z2)
y1 - lower box y coordinate
z1 - lower box z coordinate
x2 - higher box x coordinate
y2 - higher box y coordinate
z2 - higher box z coordinate void getRegion(int& x1, int& y1, int& z1, int& x2, int& y2, int& z2)
y1 - lower box y coordinate
z1 - lower box z coordinate
x2 - higher box x coordinate
y2 - higher box y coordinate
z2 - higher box z coordinate void getWorkRegion(unsigned int& x1, unsigned int& y1, unsigned int& z1, unsigned int& x2, unsigned int& y2, unsigned int& z2) const
y1 -
z1 -
x2 -
y2 -
z2 - the bounding box
void copyRegion(Inrimage const& img)
bool regionIsWholeImage() const
TclString name
WORD_TYPE type
GEOMETRY geom
Interpolator const* interpolator
void**** fourD
Extrapolator const* extrapolator
float region[6]
void setType(void) throw(Inrimage::UnknownType)
void index3D(void) throw(Inrimage::NotEnoughMemory)
void index4D(void) throw(Inrimage::NotEnoughMemory)
void buildIndex() throw(Inrimage::NotEnoughMemory)
void deleteArray(void)
void queryGeometry(void)
void convertFromRGBToRGBABuffer(void)
void convertFromRGBAToRGBBuffer(void)
friend class TclInrimage
contact: doc++@zib.de