MeVisLabToolboxReference
|
SoView2DExtension for detailed voxel viewing. More...
#include <SoView2DVoxelView.h>
Public Member Functions | |
SoView2DVoxelView (void) | |
Creates a detail viewer for voxels. | |
virtual void | draw (View2DSliceList *dsl, View2DSlice *dslice, int slice) |
Virtual method called by the SoView2D node. | |
Static Public Member Functions | |
static void | initClass (void) |
Initialization function of this class. | |
Public Attributes | |
Parameter fields. | |
SoSFBool | drawVoxelValues |
If enabled the voxel value is drawn in the center of each voxel; default is TRUE. | |
SoSFString | defaultFitString |
String which should fit into a voxel to be shown, that means if it does not fit no voxel values are shown to avoid unreadable text overlays on inappropriate zoom values; default is "123". | |
SoSFBool | drawCenterDots |
If enabled a pixel is drawn in the center of each voxel; default is false. | |
SoSFBool | drawCornerDots |
If enabled dots are drawn in all corners of each voxel; default is false. | |
SoSFBool | useCommas |
If enabled then all spaces in multicomponent voxel values are replaced by commas for better readability; default is TRUE. | |
SoSFBool | outLineVoxels |
If enabled then on voxel the border pixels are drawn; default is FALSE. | |
SoSFBool | useLut |
If enabled a connected look up table will be used to draw everything in the "looked up" values of the voxel value; if disabled a connected LUT will be ignored. | |
SoSFFloat | defaultAlpha |
Transparency from [0,1] used if no LUT is used; default is 0.5 (half transparent). | |
SoSFFloat | fontSize |
Size of font for voxel value; default is 10, minimum is 6, maximum is 250. | |
SoSFInt32 | numCoordinateComponents |
The number of coordinate components to be shown; default is 0. | |
SoSFInt32 | numRowComponents |
The number of coordinate components to be shown in one row; 0 means automatic row size, which uses root of component numbers in case of matrices; default is 0. | |
SoSFInt32 | numPrecisionDigits |
The maximum number of digits after "." in floating point numbers; default is 1. | |
SoSFMLBase | inputLut |
Optional node input for an optional lookup table node which controls color mapping of drawn stuff. | |
Protected Member Functions | |
virtual void | _drawCellInformation (View2DSliceList *, View2DSlice *, int, bool, int, const MLTypeInfos &, MLDataType, MLTypeData *, int, GLfloat[4], float, float, View2DFont &, float) |
User defined function to draw additional stuff in derived classes. | |
void | _getGLColor (double dblVoxVal, GLfloat rgba[4]) |
Set correct color value in rgba dependent on the current settings and the voxel value dblVoxVal . | |
float | _drawVoxelValue (bool drawTexts, int numRowComps, MLDataType dType, MLTypeData *vBuf1, int numDTComponents, GLfloat rgba[4], float xPos, float yPos, View2DFont &font, float fSize) |
If drawTexts is true, the default string fits into a voxel then draw the voxel value from voxel data buffer vBuf1 (if non NULL) of type dType with numDTComponents components with the color rgba at the vertical device position (xPos, yPos). | |
float | _drawStringVoxelValue (bool drawTexts, MLDataType dType, MLTypeData *vBuf1, int numDTComponents, GLfloat rgba[4], float xPos, float yPos, View2DFont &font, float fSize) |
Still incomplete and unused. | |
void | _drawCoordinateComponents (bool drawTexts, int numComps, XVImageSize &pos, GLfloat rgba[4], float xPos, float yPos, View2DFont &font, float fSize) |
If drawTexts is true then draw numComps coordinate components of position pos with the color rgba at the vertical device position (xPos, yPos). | |
void | _updateLutData (SoSFMLImage &inImg) |
Update the look up table according to the image data. | |
Protected Attributes | |
ml::LUTData< MLfloat > | _lutData |
Data table for voxel value look up. |
SoView2DExtension for detailed voxel viewing.
Definition at line 41 of file SoView2DVoxelView.h.
SoView2DVoxelView::SoView2DVoxelView | ( | void | ) |
Creates a detail viewer for voxels.
virtual void SoView2DVoxelView::_drawCellInformation | ( | View2DSliceList * | , |
View2DSlice * | , | ||
int | , | ||
bool | , | ||
int | , | ||
const MLTypeInfos & | , | ||
MLDataType | , | ||
MLTypeData * | , | ||
int | , | ||
GLfloat | [4], | ||
float | , | ||
float | , | ||
View2DFont & | , | ||
float | |||
) | [inline, protected, virtual] |
User defined function to draw additional stuff in derived classes.
dsl | pointer to View2DSliceList passed to the internally overloaded View2DExtension::draw() method. |
dSlice | pointer to View2DSlice passed to the internally overloaded View2DExtension::draw() method. |
slice | slice number passed to the internally overloaded View2DExtension::draw() method. |
drawTexts | is true if text shall be drawn because it seems to fit into the default string width. |
numRowComps | The number of coordinate components to be shown in one row; 0 means automatic row size, which uses root of component numbers in case of matrices. |
dType | is the data type id of the voxel. |
v1Buf | Pointer to the voxel data. |
numDTComps | Number of components of the voxel. |
font | Font to be used for text drawing. |
fSize | Size of font to be used for text drawing. |
Definition at line 138 of file SoView2DVoxelView.h.
void SoView2DVoxelView::_drawCoordinateComponents | ( | bool | drawTexts, |
int | numComps, | ||
XVImageSize & | pos, | ||
GLfloat | rgba[4], | ||
float | xPos, | ||
float | yPos, | ||
View2DFont & | font, | ||
float | fSize | ||
) | [protected] |
If drawTexts
is true then draw numComps
coordinate components of position pos
with the color rgba
at the vertical device position (xPos, yPos).
numComps
must be a value from [0,...,6]. Font and font size are given by font
and fSize
.
float SoView2DVoxelView::_drawStringVoxelValue | ( | bool | drawTexts, |
MLDataType | dType, | ||
MLTypeData * | vBuf1, | ||
int | numDTComponents, | ||
GLfloat | rgba[4], | ||
float | xPos, | ||
float | yPos, | ||
View2DFont & | font, | ||
float | fSize | ||
) | [protected] |
Still incomplete and unused.
If drawTexts
is true, the default string fits into a voxel then draw the voxel value from voxel data buffer vBuf1
(if non NULL) of type dType
with numDTComponents
components with the color rgba
at the vertical device position (xPos, yPos) as string. Font and font size are given by
font
and fSize
. The return value is the optimal position for drawings of the coordinate position.
float SoView2DVoxelView::_drawVoxelValue | ( | bool | drawTexts, |
int | numRowComps, | ||
MLDataType | dType, | ||
MLTypeData * | vBuf1, | ||
int | numDTComponents, | ||
GLfloat | rgba[4], | ||
float | xPos, | ||
float | yPos, | ||
View2DFont & | font, | ||
float | fSize | ||
) | [protected] |
If drawTexts
is true, the default string fits into a voxel then draw the voxel value from voxel data buffer vBuf1
(if non NULL) of type dType
with numDTComponents
components with the color rgba
at the vertical device position (xPos, yPos).
Font and font size are given by font
and fSize
. The return value is the optimal position for drawings of the coordinate position.
void SoView2DVoxelView::_getGLColor | ( | double | dblVoxVal, |
GLfloat | rgba[4] | ||
) | [protected] |
Set correct color value in rgba
dependent on the current settings and the voxel value dblVoxVal
.
void SoView2DVoxelView::_updateLutData | ( | SoSFMLImage & | inImg | ) | [protected] |
Update the look up table according to the image data.
On available LUT true is returned and shift and scale can be used to transform voxel values to non clamped LutData indices. If no LUT is available then false is returned and shift and scale are left unchanged.
virtual void SoView2DVoxelView::draw | ( | View2DSliceList * | dsl, |
View2DSlice * | dslice, | ||
int | slice | ||
) | [virtual] |
Virtual method called by the SoView2D
node.
It is called for each slices drawn in each viewer. dsl
is the View2DSliceList
, the list containing all information of all slices handled by the viewer. dslice
is the slice currently drawn and slice
the the number of the currently drawn slice.
Reimplemented from SoView2DExtension.
static void SoView2DVoxelView::initClass | ( | void | ) | [static] |
Initialization function of this class.
It implements the registration of this class in the runtime type system of open Inventor and other user stuff e.g. activation of other Inventor classes (events, actions, elements) needed in this class.
Reimplemented from SoView2DExtension.
ml::LUTData<MLfloat> SoView2DVoxelView::_lutData [protected] |
Data table for voxel value look up.
Definition at line 154 of file SoView2DVoxelView.h.
SoSFFloat SoView2DVoxelView::defaultAlpha |
Transparency from [0,1] used if no LUT is used; default is 0.5 (half transparent).
Definition at line 95 of file SoView2DVoxelView.h.
SoSFString SoView2DVoxelView::defaultFitString |
String which should fit into a voxel to be shown, that means if it does not fit no voxel values are shown to avoid unreadable text overlays on inappropriate zoom values; default is "123".
Definition at line 74 of file SoView2DVoxelView.h.
SoSFBool SoView2DVoxelView::drawCenterDots |
If enabled a pixel is drawn in the center of each voxel; default is false.
Definition at line 77 of file SoView2DVoxelView.h.
SoSFBool SoView2DVoxelView::drawCornerDots |
If enabled dots are drawn in all corners of each voxel; default is false.
Definition at line 80 of file SoView2DVoxelView.h.
SoSFBool SoView2DVoxelView::drawVoxelValues |
If enabled the voxel value is drawn in the center of each voxel; default is TRUE.
Definition at line 69 of file SoView2DVoxelView.h.
SoSFFloat SoView2DVoxelView::fontSize |
Size of font for voxel value; default is 10, minimum is 6, maximum is 250.
Definition at line 98 of file SoView2DVoxelView.h.
Optional node input for an optional lookup table node which controls color mapping of drawn stuff.
Its usage is enabled by useLut
.
Definition at line 115 of file SoView2DVoxelView.h.
The number of coordinate components to be shown; default is 0.
Definition at line 101 of file SoView2DVoxelView.h.
SoSFInt32 SoView2DVoxelView::numPrecisionDigits |
The maximum number of digits after "." in floating point numbers; default is 1.
Values smaller 0 are considered the maximum sensible digit number for the floating point types; values larger than the maximum sensible number will lead to at most the maximum sensible number of digits.
Definition at line 111 of file SoView2DVoxelView.h.
SoSFInt32 SoView2DVoxelView::numRowComponents |
The number of coordinate components to be shown in one row; 0 means automatic row size, which uses root of component numbers in case of matrices; default is 0.
Definition at line 105 of file SoView2DVoxelView.h.
SoSFBool SoView2DVoxelView::outLineVoxels |
If enabled then on voxel the border pixels are drawn; default is FALSE.
Definition at line 87 of file SoView2DVoxelView.h.
SoSFBool SoView2DVoxelView::useCommas |
If enabled then all spaces in multicomponent voxel values are replaced by commas for better readability; default is TRUE.
Definition at line 84 of file SoView2DVoxelView.h.
SoSFBool SoView2DVoxelView::useLut |
If enabled a connected look up table will be used to draw everything in the "looked up" values of the voxel value; if disabled a connected LUT will be ignored.
be ignored; default is TRUE.
Definition at line 92 of file SoView2DVoxelView.h.