MeVisLabToolboxReference
|
Annotation extension for the SoView2D. More...
#include <SoView2DAnnotation.h>
Classes | |
struct | Margins |
Stores top/bottom/left/right margins. More... | |
Public Types | |
enum | AlignPosition { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, BOTTOM_CENTER, CENTER_CENTER } |
Mode for alignment of text boxes on viewer. More... | |
Public Member Functions | |
SoView2DAnnotation () | |
Constructor. | |
~SoView2DAnnotation () | |
virtual void | draw (View2DSliceList *dsl, View2DSlice *dslice, int slice) |
draw annotations on slice | |
virtual bool | evalEvent (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) |
handle keyboard events | |
void | toggleAnnotation () |
toggle displayed information | |
void | toggleTechnicalInfo () |
void | parseString (View2DSliceList *list, View2DSlice *slice, const SbString &string, SbString &resultString, int limitToChars=-1) |
parses the given string and substitutes and | |
void | drawAnnotation (const char *string, float dx1, float dy1, float dx2, float dy2, View2DFont *font, int fontsize, AlignPosition pos, bool drawBox, float boxColor[4], float boxEdgeColor[4], int &outBoxWidth, int &outBoxHeight) |
draws an AnnotationBox at the given position | |
float | decimalFloor (float number, SbString &result, int ÷r) |
returns the closest decimal floor and copies a printable string into the buffer | |
void | drawVerticalRuler (View2DSliceList *dsl, View2DSlice *dslice, View2DFont *font, int marginRight, int dx1, int dy1, int dx2, int dy2) |
draws an annotated ruler | |
void | drawHorizontalRuler (View2DSliceList *dsl, View2DSlice *dslice, View2DFont *font, int marginBottom, int dx1, int dy1, int dx2, int dy2) |
virtual Margins | calculateTextMargins (int width, int height) |
calculates the margin of the text annotations (to be reimplemented by a derived class) | |
virtual Margins | calculateCenterTextMargins (int width, int height) |
margins for center text (horizontally) can be different | |
virtual int | calculateOrientationModelSize (int width, int height) |
calculates the size of the orientation model | |
SbMatrix | calculateOrientationModelRotationMatrix (View2DSlice *slice) |
calculates the rotation matrix for the orientation model | |
virtual void | drawOrientationCube (const SbMatrix &rotationMatrix, int posX, int posY, int modelSize) |
draws the annotation model for the given rotation matrix at the given position and size using the built in model | |
virtual void | drawOrientationModelUsingInventor (SoAction *action, const SbMatrix &rotationMatrix, int posX, int posY, int modelSize) |
draws the annotation model for the given rotation matrix at the given position and size using the inOrientationModel scene | |
virtual void | drawOrientationCubeLetter (char letter, int modelSize, bool shadowPass) |
draw the given letters. | |
virtual bool | implementsManagedInteraction () const |
also implements managed interactions | |
virtual bool | implementsManagedInteractionAndClassicEventHandling () const |
this node is a hybrid module providing managed interaction and classic event handling | |
virtual void | fieldChanged (SoSensor *sensor) |
handle changes to editingOn field | |
Static Public Member Functions | |
static void | initClass () |
inventor runtime type system | |
static void | getExtOrientation (int axis, SbMatrix &matrix, float *orWeights, char *negOrientation, char *posOrientation) |
Return extended orientation letters (up to three letters for oblique views) and weights. | |
static void | drawOrientation (const char *string, float posX, float posY, float fontSize, View2DFont *font, float relOffX, float relOffY, float *orWeights) |
Draw orientation letters. | |
static SbVec2f | getTargetSizeInScene (SoNode *scene, int width, int height) |
Get the minimum view port size of all SoView2Ds in the given scene, provided the scene would be displayed in a viewer with size windowX * windowY. | |
Public Attributes | |
SoSFString | annotationUserTopLeft |
SoSFString | annotationUserTopRight |
SoSFString | annotationUserBottomLeft |
SoSFString | annotationUserBottomRight |
SoSFString | annotationUserBottomCenter |
SoSFString | annotationCTTopLeft |
SoSFString | annotationCTTopRight |
SoSFString | annotationCTBottomLeft |
SoSFString | annotationCTBottomRight |
SoSFString | annotationCTBottomCenter |
SoSFString | annotationMRTopLeft |
SoSFString | annotationMRTopRight |
SoSFString | annotationMRBottomLeft |
SoSFString | annotationMRBottomRight |
SoSFString | annotationMRBottomCenter |
SoSFString | shortTopLeft |
SoSFString | shortTopRight |
SoSFString | shortBottomLeft |
SoSFString | shortBottomRight |
SoSFString | shortBottomCenter |
SoSFInt32 | minDetailFontSize |
SoSFInt32 | maxDetailFontSize |
SoSFInt32 | minShortFontSize |
SoSFInt32 | maxShortFontSize |
SoSFInt32 | userDetailFontSize |
SoSFInt32 | userShortFontSize |
SoSFEnum | annotationMode |
SoSFEnum | showAnnotation |
SoSFEnum | annotationFontSize |
SoSFBool | textShadow |
SoSFString | fontWidthDummyString |
SoSFInt32 | targetWidth |
SoSFInt32 | targetHeight |
SoSFInt32 | abreviateChars |
SoSFInt32 | abreviateShortChars |
SoSFEnum | showOrientation |
SoSFBool | drawNegativeOrientation |
SoSFBool | drawPositiveOrientation |
SoSFBool | verticalRuler |
SoSFBool | horizontalRuler |
SoSFInt32 | verticalRulerMarginRight |
SoSFInt32 | horizontalRulerMarginBottom |
SoSFBool | orientationModel |
SoSFEnum | orientationModelPosition |
SoSFFloat | orientationModelRelativeSize |
SoSFInt32 | orientationModelMinSize |
SoSFInt32 | orientationModelMaxSize |
SoSFColor | orientationModelColor |
SoSFBool | showTechnicalInfo |
SoSFString | input00 |
SoSFString | input01 |
SoSFString | input02 |
SoSFString | input03 |
SoSFString | input04 |
SoSFString | input05 |
SoSFString | input06 |
SoSFString | input07 |
SoSFString | input08 |
SoSFString | input09 |
SoSFDouble | numInput00 |
SoSFDouble | numInput01 |
SoSFDouble | numInput02 |
SoSFDouble | numInput03 |
SoSFDouble | numInput04 |
SoSFDouble | numInput05 |
SoSFDouble | numInput06 |
SoSFDouble | numInput07 |
SoSFDouble | numInput08 |
SoSFDouble | numInput09 |
SoSFBool | drawBackgroundBox |
SoSFColor | backgroundColor |
SoSFFloat | backgroundOpacity |
SoSFColor | backgroundEdgeColor |
SoSFFloat | backgroundEdgeOpacity |
SoSFNode | inOrientationModel |
SoSFBool | orientationAndScaleFromCamera |
field that enables getting the orientation matrix from the Inventor scene instead of the input image | |
Protected Member Functions | |
virtual SbString | restrict (const SbString &value, int maxLength) const |
restrict string to maximum length, appending "..." if string was truncated | |
virtual SbString | asString (int value) const |
return numeric value formatted as string derived classes might e.g. | |
virtual SbString | asString (double value, int precision) const |
virtual SbString | getDicomTagValueAsString (DCMTree::Const_TagPtr tagPtr, unsigned int index, unsigned int precision) const |
get the value of a dicom tag for display purposes; derived classes might e.g. |
Annotation extension for the SoView2D.
For a detailed description of the module and its fields, see the MeVisLab html documentation
Definition at line 80 of file SoView2DAnnotation.h.
Mode for alignment of text boxes on viewer.
Definition at line 87 of file SoView2DAnnotation.h.
SoView2DAnnotation::SoView2DAnnotation | ( | ) |
Constructor.
SoView2DAnnotation::~SoView2DAnnotation | ( | ) |
virtual SbString SoView2DAnnotation::asString | ( | int | value | ) | const [protected, virtual] |
return numeric value formatted as string derived classes might e.g.
override the formatting
virtual SbString SoView2DAnnotation::asString | ( | double | value, |
int | precision | ||
) | const [protected, virtual] |
virtual Margins SoView2DAnnotation::calculateCenterTextMargins | ( | int | width, |
int | height | ||
) | [virtual] |
margins for center text (horizontally) can be different
SbMatrix SoView2DAnnotation::calculateOrientationModelRotationMatrix | ( | View2DSlice * | slice | ) |
calculates the rotation matrix for the orientation model
virtual int SoView2DAnnotation::calculateOrientationModelSize | ( | int | width, |
int | height | ||
) | [virtual] |
calculates the size of the orientation model
virtual Margins SoView2DAnnotation::calculateTextMargins | ( | int | width, |
int | height | ||
) | [virtual] |
calculates the margin of the text annotations (to be reimplemented by a derived class)
float SoView2DAnnotation::decimalFloor | ( | float | number, |
SbString & | result, | ||
int & | divider | ||
) |
returns the closest decimal floor and copies a printable string into the buffer
virtual void SoView2DAnnotation::draw | ( | View2DSliceList * | dsl, |
View2DSlice * | dslice, | ||
int | slice | ||
) | [virtual] |
draw annotations on slice
Reimplemented from SoView2DExtension.
void SoView2DAnnotation::drawAnnotation | ( | const char * | string, |
float | dx1, | ||
float | dy1, | ||
float | dx2, | ||
float | dy2, | ||
View2DFont * | font, | ||
int | fontsize, | ||
AlignPosition | pos, | ||
bool | drawBox, | ||
float | boxColor[4], | ||
float | boxEdgeColor[4], | ||
int & | outBoxWidth, | ||
int & | outBoxHeight | ||
) |
draws an AnnotationBox at the given position
void SoView2DAnnotation::drawHorizontalRuler | ( | View2DSliceList * | dsl, |
View2DSlice * | dslice, | ||
View2DFont * | font, | ||
int | marginBottom, | ||
int | dx1, | ||
int | dy1, | ||
int | dx2, | ||
int | dy2 | ||
) |
static void SoView2DAnnotation::drawOrientation | ( | const char * | string, |
float | posX, | ||
float | posY, | ||
float | fontSize, | ||
View2DFont * | font, | ||
float | relOffX, | ||
float | relOffY, | ||
float * | orWeights | ||
) | [static] |
Draw orientation letters.
virtual void SoView2DAnnotation::drawOrientationCube | ( | const SbMatrix & | rotationMatrix, |
int | posX, | ||
int | posY, | ||
int | modelSize | ||
) | [virtual] |
draws the annotation model for the given rotation matrix at the given position and size using the built in model
virtual void SoView2DAnnotation::drawOrientationCubeLetter | ( | char | letter, |
int | modelSize, | ||
bool | shadowPass | ||
) | [virtual] |
draw the given letters.
The letter should be drawn at [0.,0.] and may draw from [-0.5,-0.5] to [0.5, 0.5] to fill the side of the model. (Rotation and translation are done in the outer code).
virtual void SoView2DAnnotation::drawOrientationModelUsingInventor | ( | SoAction * | action, |
const SbMatrix & | rotationMatrix, | ||
int | posX, | ||
int | posY, | ||
int | modelSize | ||
) | [virtual] |
draws the annotation model for the given rotation matrix at the given position and size using the inOrientationModel scene
void SoView2DAnnotation::drawVerticalRuler | ( | View2DSliceList * | dsl, |
View2DSlice * | dslice, | ||
View2DFont * | font, | ||
int | marginRight, | ||
int | dx1, | ||
int | dy1, | ||
int | dx2, | ||
int | dy2 | ||
) |
draws an annotated ruler
virtual bool SoView2DAnnotation::evalEvent | ( | SoView2D * | view2d, |
View2DSliceList * | slicelist, | ||
View2DEvent * | ec, | ||
View2DEventPhase | phase | ||
) | [virtual] |
handle keyboard events
Reimplemented from SoView2DExtension.
virtual void SoView2DAnnotation::fieldChanged | ( | SoSensor * | sensor | ) | [virtual] |
handle changes to editingOn field
Reimplemented from SoView2DExtension.
virtual SbString SoView2DAnnotation::getDicomTagValueAsString | ( | DCMTree::Const_TagPtr | tagPtr, |
unsigned int | index, | ||
unsigned int | precision | ||
) | const [protected, virtual] |
get the value of a dicom tag for display purposes; derived classes might e.g.
override the formatting
static void SoView2DAnnotation::getExtOrientation | ( | int | axis, |
SbMatrix & | matrix, | ||
float * | orWeights, | ||
char * | negOrientation, | ||
char * | posOrientation | ||
) | [static] |
Return extended orientation letters (up to three letters for oblique views) and weights.
static SbVec2f SoView2DAnnotation::getTargetSizeInScene | ( | SoNode * | scene, |
int | width, | ||
int | height | ||
) | [static] |
Get the minimum view port size of all SoView2Ds in the given scene, provided the scene would be displayed in a viewer with size windowX * windowY.
virtual bool SoView2DAnnotation::implementsManagedInteraction | ( | ) | const [inline, virtual] |
also implements managed interactions
Definition at line 289 of file SoView2DAnnotation.h.
virtual bool SoView2DAnnotation::implementsManagedInteractionAndClassicEventHandling | ( | ) | const [inline, virtual] |
this node is a hybrid module providing managed interaction and classic event handling
Reimplemented from SoView2DExtension.
Definition at line 293 of file SoView2DAnnotation.h.
static void SoView2DAnnotation::initClass | ( | ) | [static] |
inventor runtime type system
Reimplemented from SoView2DExtension.
void SoView2DAnnotation::parseString | ( | View2DSliceList * | list, |
View2DSlice * | slice, | ||
const SbString & | string, | ||
SbString & | resultString, | ||
int | limitToChars = -1 |
||
) |
parses the given string and substitutes and
virtual SbString SoView2DAnnotation::restrict | ( | const SbString & | value, |
int | maxLength | ||
) | const [protected, virtual] |
restrict string to maximum length, appending "..." if string was truncated
void SoView2DAnnotation::toggleAnnotation | ( | ) |
toggle displayed information
void SoView2DAnnotation::toggleTechnicalInfo | ( | ) |
SoSFInt32 SoView2DAnnotation::abreviateChars |
Definition at line 138 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::abreviateShortChars |
Definition at line 139 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationCTBottomCenter |
Definition at line 108 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationCTBottomLeft |
Definition at line 106 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationCTBottomRight |
Definition at line 107 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationCTTopLeft |
Definition at line 104 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationCTTopRight |
Definition at line 105 of file SoView2DAnnotation.h.
Definition at line 131 of file SoView2DAnnotation.h.
SoSFEnum SoView2DAnnotation::annotationMode |
Definition at line 129 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationMRBottomCenter |
Definition at line 114 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationMRBottomLeft |
Definition at line 112 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationMRBottomRight |
Definition at line 113 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationMRTopLeft |
Definition at line 110 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationMRTopRight |
Definition at line 111 of file SoView2DAnnotation.h.
Definition at line 102 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationUserBottomLeft |
Definition at line 100 of file SoView2DAnnotation.h.
Definition at line 101 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationUserTopLeft |
Definition at line 98 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::annotationUserTopRight |
Definition at line 99 of file SoView2DAnnotation.h.
SoSFColor SoView2DAnnotation::backgroundColor |
Definition at line 183 of file SoView2DAnnotation.h.
SoSFColor SoView2DAnnotation::backgroundEdgeColor |
Definition at line 185 of file SoView2DAnnotation.h.
Definition at line 186 of file SoView2DAnnotation.h.
SoSFFloat SoView2DAnnotation::backgroundOpacity |
Definition at line 184 of file SoView2DAnnotation.h.
Definition at line 182 of file SoView2DAnnotation.h.
Definition at line 142 of file SoView2DAnnotation.h.
Definition at line 143 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::fontWidthDummyString |
Definition at line 134 of file SoView2DAnnotation.h.
SoSFBool SoView2DAnnotation::horizontalRuler |
Definition at line 146 of file SoView2DAnnotation.h.
Definition at line 148 of file SoView2DAnnotation.h.
Definition at line 188 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input00 |
Definition at line 159 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input01 |
Definition at line 160 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input02 |
Definition at line 161 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input03 |
Definition at line 162 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input04 |
Definition at line 163 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input05 |
Definition at line 164 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input06 |
Definition at line 165 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input07 |
Definition at line 166 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input08 |
Definition at line 167 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::input09 |
Definition at line 168 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::maxDetailFontSize |
Definition at line 123 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::maxShortFontSize |
Definition at line 125 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::minDetailFontSize |
Definition at line 122 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::minShortFontSize |
Definition at line 124 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput00 |
Definition at line 170 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput01 |
Definition at line 171 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput02 |
Definition at line 172 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput03 |
Definition at line 173 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput04 |
Definition at line 174 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput05 |
Definition at line 175 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput06 |
Definition at line 176 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput07 |
Definition at line 177 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput08 |
Definition at line 178 of file SoView2DAnnotation.h.
SoSFDouble SoView2DAnnotation::numInput09 |
Definition at line 179 of file SoView2DAnnotation.h.
field that enables getting the orientation matrix from the Inventor scene instead of the input image
Definition at line 192 of file SoView2DAnnotation.h.
SoSFBool SoView2DAnnotation::orientationModel |
Definition at line 150 of file SoView2DAnnotation.h.
Definition at line 155 of file SoView2DAnnotation.h.
Definition at line 154 of file SoView2DAnnotation.h.
Definition at line 153 of file SoView2DAnnotation.h.
Definition at line 151 of file SoView2DAnnotation.h.
Definition at line 152 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::shortBottomCenter |
Definition at line 120 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::shortBottomLeft |
Definition at line 118 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::shortBottomRight |
Definition at line 119 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::shortTopLeft |
Definition at line 116 of file SoView2DAnnotation.h.
SoSFString SoView2DAnnotation::shortTopRight |
Definition at line 117 of file SoView2DAnnotation.h.
SoSFEnum SoView2DAnnotation::showAnnotation |
Definition at line 130 of file SoView2DAnnotation.h.
SoSFEnum SoView2DAnnotation::showOrientation |
Definition at line 141 of file SoView2DAnnotation.h.
Definition at line 157 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::targetHeight |
Definition at line 136 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::targetWidth |
Definition at line 135 of file SoView2DAnnotation.h.
SoSFBool SoView2DAnnotation::textShadow |
Definition at line 132 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::userDetailFontSize |
Definition at line 126 of file SoView2DAnnotation.h.
SoSFInt32 SoView2DAnnotation::userShortFontSize |
Definition at line 127 of file SoView2DAnnotation.h.
SoSFBool SoView2DAnnotation::verticalRuler |
Definition at line 145 of file SoView2DAnnotation.h.
Definition at line 147 of file SoView2DAnnotation.h.