In file inrimage/TclInrimageBackground.h:

class TclInrimageBackground : public InrimageBackground, public BasicInrimageBackground, public Scalable, public TclObject, public Owner<MinGLScale>, public Owner<MaxGLScale>

The background of a slicecamera that is linked with an InrimageView

Inheritance:


Public Methods

void setHandle (Tk_PhotoHandle _handle)
set TK photo handle
Tk_PhotoHandle getHandle (void) const
returns image TK handle
virtual const unsigned char* getRedColorMap () const
get the array of 255 char corresponding to the red colormap
virtual const unsigned char* getGreenColorMap () const
get the array of 255 char corresponding to the green colormap
virtual const unsigned char* getBlueColorMap () const
get the array of 255 char corresponding to the blue colormap
virtual VoxelCoordinate* coordinates (unsigned int i, unsigned int j) const
Converts a canvas coordinate (i, j) in the corresponding image voxel (x, y, z)
virtual void screen (VoxelCoordinate *vc, int& i, int& j) const
Converts a voxel (x, y, z) to its screen coordinate (i, j)
virtual CartesianCoordinate* cartesianCoordinates (unsigned int i, unsigned int j) const
Converts a canvas coordinate (i, j) to a cartesian point
virtual void screen (CartesianCoordinate *vc, int& i, int& j) const
Converts a cartesian point to its screen coordinate (i, j)
virtual void setVisibleArea (void)
set visible area to whole image
virtual double getMin (const TclScale *) const
return the image minimum intensity value
virtual double getMax (const TclScale *) const
return the image minimum intensity value
virtual double getStep (const TclScale *scale) const
get required scale step for this scalable
virtual double getMinIntensity () const
return the image minimum intensity value
virtual double getMaxIntensity () const
return the image maximum intensity value
void addMinGLScale (MinGLScale *min)
add a minimum grey-level scale to the background
void addMaxGLScale (MaxGLScale *max)
add a maximum grey-level scale to the background
MinGLScale* getMinScale () const
return the min scale associated with the camera background
MaxGLScale* getMaxScale () const
return the max scale associated with the camera background
virtual void setVisibleArea (unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2)
set visible area to given bounds (truncate to image size if needed)
unsigned int getRef (void) const
raise ambigous getRef() function call
static const char* getTCLObjectName (void)
returns object id by command line arguments
virtual TclString objectName (void) const
get object string identifier
virtual void scaleValue (const TclScale *scale, double val)
scale value changed
virtual void visibleAreaChanged (void)
resize viewer to visible region and redraw
void imageVoxelSizeChanged (void)
resize image voxels
virtual void imageGLChanged (void)
resize GL window and redraw
void imageTypeChanged (void)
image type changed
virtual void inrimageChanged (void)
image type changed
Inrimage* getInrimage (void) const
return handled inrimage
void setMinThreshold (double val) throw(Voxel::InvalidValue)
set min voxel value to val
void setMaxThreshold (double val) throw(Voxel::InvalidValue)
set max voxel value to val
void setGlThresholds (double min, double max) throw(Voxel::InvalidValue)
set min and max voxel value to min and max
void setGlThresholds (const TclString& min, const TclString& max) throw(Voxel::InvalidValue)
set min and max voxel value to min and max
virtual void dying (const ObjectPointer<MinGLScale>& obj)
min grey level scale owner callback
virtual void dying (const ObjectPointer<MaxGLScale>& obj)
max grey level scale owner callback
virtual const unsigned int* getVisibleArea (void) const
return visible area
virtual const double* getScaleVector ()
return scale in the 3 axis between image and world coordinates
virtual const double* getVoxelSize ()
return voxel size
virtual void redraw ()
redraw camera image
virtual void refreshCamera (void)
reset pointer to camera
GLTRANSFO getGLTransfo (void) const
returns grey-level transformation mode
void setGLTransfo (GLTRANSFO t, const unsigned char *red=0, const unsigned char *green=0, const unsigned char *blue=0)
set grey-level transformation mode
virtual float getVX () const
return the scale in the x direction
virtual float getVY () const
return the scale in the y direction
virtual float getVZ () const
return the scale in the z direction
virtual unsigned int getX () const
return the number of slices in the X direction
virtual unsigned int getY () const
return the number of slices in the Y direction
virtual unsigned int getZ () const
return the number of slices in the Z direction
virtual TclString getLabel (int &x, int &y)
return the label coresponding to pixel (x,y)
virtual void getWorldCoordinates (const int x, const int y, double &px, double &py, double &pz ) const
return the position in world coordinates of a pixel located at (x,y)
virtual void getImageCoordinates (const int x, const int y, unsigned int &vx, unsigned int &vy, unsigned int &vz ) const
return the position in image coordinates of a pixel located at (x,y)
virtual void getPixelPositionFromImageCoordinates (const unsigned int vx, const unsigned int vy, const unsigned int vz, int &x, int&y) const
Given a point in image (voxel) coordinates returns the position in screen coordinates
virtual void getPixelPositionFromWorldCoordinates (const double px, const double py, const double pz, int &x, int&y) const
Given a point in world coordinates returns the position in screen coordinates
bool getIVS (void) const
returns IgnoreVoxelSize flag
void setIVS (const bool val)
Changes IgnoreVoxelSize flag. Cause recompute method to be called.
static int list (TclModule *m, int argc, char **argv)
new TCL command callback
static int create (TclModule *m, int argc, char **argv)
new TCL command callback
int destroyCmd (int argc, char **argv)
-destroy option
int scalemodeCmd (int argc, char **argv)
-scalemode option
int ignoreVoxelSizeCmd (int argc, char **argv)
-ignoreVoxelSize option
int greyLevelCmd (int argc, char **argv)
-greyLevel option
int interpolationCmd (int argc, char **argv)
-interpolation greyLevel option

Protected Fields

Tk_PhotoHandle handle
TK photo image associated handle
Tk_PhotoImageBlock* block
TK photo image associated data slice
TclString TKimageID
TK photo image ID
Voxel* glmin
min and max GL values for inrimage
InrimageView* inrv
owner inrimage view object
SliceCamera::SLICE_ORIENTATION blockGeom
geometry the TK phot block was allocated for
unsigned int visible [6]
image visible area
double scaleVector [3]
the 3 scale vector in the X,Y,Z direction depending on ignoreVoxelSize
double voxelSize [3]
the 3 voxel Size in the X,Y,Z direction

Protected Methods

void init (bool useMinScale, MinGLScale *minScale, bool useMaxScale, MaxGLScale *maxScale, const char *color)
create all Tcl widgets associated with this background
virtual void glBounds (void)
compute inrimage grey levels bounds
virtual void voxelRatio (void)
compute image voxel/screen pixel ratio and allocates required memory
virtual void realloc (void)
allocates TK photo image block

Protected

constructor
TclInrimageBackground (TclModule *m, const std::type_info& type, InrimageView *inrv, SliceCamera *cam, MinGLScale *minScale = 0, MaxGLScale *maxScale = 0)
a image background that is created by an inherited class
TclInrimageBackground (TclModule *m, InrimageView *inrv, SliceCamera *cam, bool useMinGLScale = true, MinGLScale *minScale = 0, bool useMaxGLScale = true, MaxGLScale *maxScale = 0, const char *color = "#E8E0D2")
builds a Tcl object corresponding to photo data block attached to an inrimage in a given slice camera
destructors
virtual ~TclInrimageBackground ()
destructor: free buffers

Inherited from InrimageBackground:

Public

constructors

InrimageBackground(SliceCamera *cam)
Dummy constructor since no inrimage is specified

Inherited from BasicInrimageBackground:

Public Classes

enum GLTRANSFO
enum IMAGE_INTERPOLATION

Public Fields

static unsigned char PETColorMapRed[257]
static unsigned char PETColorMapGreen[257]
static unsigned char PETColorMapBlue[257]
static unsigned char AffineColorMap[257]
static unsigned char ThresholdColorMap[257]
static unsigned char ZeroColorMap[257]

Public Methods

double getRX(void) const
double getRY(void) const
double getRZ(void) const

Public

desstructor

Protected Fields

GLTRANSFO transfo
IMAGE_INTERPOLATION interpolation
bool ignoreVoxelSize
const unsigned char* redColorMap
const unsigned char* greenColorMap
const unsigned char* blueColorMap
unsigned int sx
unsigned int sy
unsigned int sz
double rx
double ry
double rz

Documentation

The background of a slicecamera that is linked with an InrimageView
constructor

TclInrimageBackground(TclModule *m, const std::type_info& type, InrimageView *inrv, SliceCamera *cam, MinGLScale *minScale = 0, MaxGLScale *maxScale = 0)
a image background that is created by an inherited class
Parameters:
m - module to create TCL object
type - the Tcl type of the object
inrv - an inrimage view attached to an Inrimage
cam - slice camera to display image in
minScale - a TclScale controlling the minimum windowing value
maxScale - a TclScale controlling the maximum windowing value

TclInrimageBackground(TclModule *m, InrimageView *inrv, SliceCamera *cam, bool useMinGLScale = true, MinGLScale *minScale = 0, bool useMaxGLScale = true, MaxGLScale *maxScale = 0, const char *color = "#E8E0D2")
builds a Tcl object corresponding to photo data block attached to an inrimage in a given slice camera
Parameters:
m - module to create TCL object
inrv - an inrimage view attached to an Inrimage
cam - slice camera to display image in
useMinScale - if a TclScale controlling the minimum grey-level windowing value should be created if minScale==0
minScale - a TclScale controlling the minimum windowing value
useMaxScale - if a TclScale controlling the maximum grey-level windowing value should be created if maxScale==0
maxScale - a TclScale controlling the maximum windowing value
color - color of the widget

destructors

virtual ~TclInrimageBackground()
destructor: free buffers

Tk_PhotoHandle handle
TK photo image associated handle

Tk_PhotoImageBlock* block
TK photo image associated data slice

TclString TKimageID
TK photo image ID

Voxel* glmin
min and max GL values for inrimage

InrimageView* inrv
owner inrimage view object

SliceCamera::SLICE_ORIENTATION blockGeom
geometry the TK phot block was allocated for

unsigned int visible[6]
image visible area

double scaleVector[3]
the 3 scale vector in the X,Y,Z direction depending on ignoreVoxelSize

double voxelSize[3]
the 3 voxel Size in the X,Y,Z direction

void init(bool useMinScale, MinGLScale *minScale, bool useMaxScale, MaxGLScale *maxScale, const char *color)
create all Tcl widgets associated with this background
Parameters:
useMinScale - if we should handle a min grey-level scale
minScale - the min scale that should be binded with the background
useMaxScale - if we should handle a max grey-level scale
Maxscale - the max scale that should be binded with the background
color - the color of the background when creating scale widgets

virtual void glBounds(void)
compute inrimage grey levels bounds

virtual void voxelRatio(void)
compute image voxel/screen pixel ratio and allocates required memory

virtual void realloc(void)
allocates TK photo image block

void setHandle(Tk_PhotoHandle _handle)
set TK photo handle. Can be done only once. (setHandle is indirectly called by constructor).

Tk_PhotoHandle getHandle(void) const
returns image TK handle

virtual const unsigned char* getRedColorMap() const
get the array of 255 char corresponding to the red colormap

virtual const unsigned char* getGreenColorMap() const
get the array of 255 char corresponding to the green colormap

virtual const unsigned char* getBlueColorMap() const
get the array of 255 char corresponding to the blue colormap

virtual VoxelCoordinate* coordinates(unsigned int i, unsigned int j) const
Converts a canvas coordinate (i, j) in the corresponding image voxel (x, y, z)
Returns:
a new VoxelCoordinate structure containing x, y, and z
Parameters:
i - mouse X coordinate
j - mouse Y coordinate

virtual void screen(VoxelCoordinate *vc, int& i, int& j) const
Converts a voxel (x, y, z) to its screen coordinate (i, j)
Parameters:
vc - voxel image coordinates
i - voxel screen X coordinate
j - voxel screen Y coordinate

virtual CartesianCoordinate* cartesianCoordinates(unsigned int i, unsigned int j) const
Converts a canvas coordinate (i, j) to a cartesian point
Returns:
a new CartesianCoordinate structure
Parameters:
i - mouse X coordinate
j - mouse Y coordinate

virtual void screen(CartesianCoordinate *vc, int& i, int& j) const
Converts a cartesian point to its screen coordinate (i, j)
Parameters:
cp - cartesian point
i - voxel screen X coordinate
j - voxel screen Y coordinate

virtual void setVisibleArea(void)
set visible area to whole image

virtual double getMin(const TclScale *) const
return the image minimum intensity value

virtual double getMax(const TclScale *) const
return the image minimum intensity value

virtual double getStep(const TclScale *scale) const
get required scale step for this scalable
Returns:
step value
Parameters:
scale - calling scale object

virtual double getMinIntensity() const
return the image minimum intensity value

virtual double getMaxIntensity() const
return the image maximum intensity value

void addMinGLScale(MinGLScale *min)
add a minimum grey-level scale to the background

void addMaxGLScale(MaxGLScale *max)
add a maximum grey-level scale to the background

MinGLScale* getMinScale() const
return the min scale associated with the camera background

MaxGLScale* getMaxScale() const
return the max scale associated with the camera background

virtual void setVisibleArea(unsigned int x1, unsigned int y1, unsigned int z1, unsigned int x2, unsigned int y2, unsigned int z2)
set visible area to given bounds (truncate to image size if needed)
Parameters:
x1 - visible area X first coordinate
y1 - visible area Y first coordinate
z1 - visible area Z first coordinate
x2 - visible area X second coordinate
y2 - visible area Y second coordinate
z2 - visible area Z second coordinate

unsigned int getRef(void) const
raise ambigous getRef() function call

static const char* getTCLObjectName(void)
returns object id by command line arguments

virtual TclString objectName(void) const
get object string identifier
Returns:
object name

virtual void scaleValue(const TclScale *scale, double val)
scale value changed
Parameters:
scale - calling scale object
val - new scale value

virtual void visibleAreaChanged(void)
resize viewer to visible region and redraw

void imageVoxelSizeChanged(void)
resize image voxels

virtual void imageGLChanged(void)
resize GL window and redraw

void imageTypeChanged(void)
image type changed

virtual void inrimageChanged(void)
image type changed

Inrimage* getInrimage(void) const
return handled inrimage

void setMinThreshold(double val) throw(Voxel::InvalidValue)
set min voxel value to val

void setMaxThreshold(double val) throw(Voxel::InvalidValue)
set max voxel value to val

void setGlThresholds(double min, double max) throw(Voxel::InvalidValue)
set min and max voxel value to min and max

void setGlThresholds(const TclString& min, const TclString& max) throw(Voxel::InvalidValue)
set min and max voxel value to min and max

virtual void dying(const ObjectPointer<MinGLScale>& obj)
min grey level scale owner callback

virtual void dying(const ObjectPointer<MaxGLScale>& obj)
max grey level scale owner callback

virtual const unsigned int* getVisibleArea(void) const
return visible area

virtual const double* getScaleVector()
return scale in the 3 axis between image and world coordinates

virtual const double* getVoxelSize()
return voxel size

virtual void redraw()
redraw camera image

virtual void refreshCamera(void)
reset pointer to camera

GLTRANSFO getGLTransfo(void) const
returns grey-level transformation mode

void setGLTransfo(GLTRANSFO t, const unsigned char *red=0, const unsigned char *green=0, const unsigned char *blue=0)
set grey-level transformation mode
Parameters:
t - new transformation mode

virtual float getVX() const
return the scale in the x direction

virtual float getVY() const
return the scale in the y direction

virtual float getVZ() const
return the scale in the z direction

virtual unsigned int getX() const
return the number of slices in the X direction

virtual unsigned int getY() const
return the number of slices in the Y direction

virtual unsigned int getZ() const
return the number of slices in the Z direction

virtual TclString getLabel(int &x, int &y)
return the label coresponding to pixel (x,y)

virtual void getWorldCoordinates(const int x, const int y, double &px, double &py, double &pz ) const
return the position in world coordinates of a pixel located at (x,y)

virtual void getImageCoordinates(const int x, const int y, unsigned int &vx, unsigned int &vy, unsigned int &vz ) const
return the position in image coordinates of a pixel located at (x,y)

virtual void getPixelPositionFromImageCoordinates(const unsigned int vx, const unsigned int vy, const unsigned int vz, int &x, int&y) const
Given a point in image (voxel) coordinates returns the position in screen coordinates

virtual void getPixelPositionFromWorldCoordinates(const double px, const double py, const double pz, int &x, int&y) const
Given a point in world coordinates returns the position in screen coordinates

bool getIVS(void) const
returns IgnoreVoxelSize flag

void setIVS(const bool val)
Changes IgnoreVoxelSize flag. Cause recompute method to be called.

static int list(TclModule *m, int argc, char **argv)
new TCL command callback

static int create(TclModule *m, int argc, char **argv)
new TCL command callback

int destroyCmd(int argc, char **argv)
-destroy option

int scalemodeCmd(int argc, char **argv)
-scalemode option

int ignoreVoxelSizeCmd(int argc, char **argv)
-ignoreVoxelSize option

int greyLevelCmd(int argc, char **argv)
-greyLevel option

int interpolationCmd(int argc, char **argv)
-interpolation greyLevel option


Direct child classes:
TclOverlayBackground

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