Volume Medical Manipulation Toolkit 2.0
Public Member Functions | Public Attributes | Static Public Attributes
Interactions Class Reference

This class contains all methods related with user interactions. More...

#include <vmtkInteractions.h>

Collaboration diagram for Interactions:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Interactions (DCMDataType *data)
 Constructor.
 ~Interactions ()
 Destructor.
void RefreshCanvas (GLint canvasType)
 Refresh/Update OpenGL contexts.
void getMesh (Mesh **m)
void MouseMove (wxMouseEvent &e, wxGLCanvas *canvas, int canvasType)
 Handle all Mouse Move events depending of canvas type.
void MouseDown (wxMouseEvent &e, wxGLCanvas *canvas, int canvasType)
 Handle all Mouse Down events depending of canvas type.
void MouseUp (wxMouseEvent &e, wxGLCanvas *canvas, int canvasType)
 Handle all Mouse Up events depending of canvas type.
void MouseWheelMoved (wxMouseEvent &e, wxGLCanvas *canvas, int canvasType)
 Handle all mouse wheel events depending of canvas type.
void KeyPressed (wxKeyEvent &event, wxGLCanvas *canvas, int canvasType)
 Handle all key pressed events depending of canvas type.
void KeyReleased (wxKeyEvent &event, wxGLCanvas *canvas, int canvasType)
 Handle all key released events depending of canvas type.
void TreeClick (wxTreeEvent &event)
 Handle all events associated with wxTreeCtrl.
bool isMouseDrag ()
 Verify is the mouse is dragging.
bool isShifted ()
 Verify is the SHIFT key is pressed.
bool isCtrled ()
 Verify is the CTRL key is pressed.
bool isBoundingBoxChecked ()
void ShowGridViewport ()
 Show the current paint selection 2D buffer.
Matrix16 getRotationMatrix ()
GLfloat getScale ()
GLfloat getTranslation (int axis)
float getDisplaceOffset ()
float getVoxelSizeInMM ()
void resetTransformations ()
 Initialization of default values.
void setFrontVolumeSide ()
void setBackVolumeSide ()
void setRightVolumeSide ()
void setLeftVolumeSide ()
void setBottomVolumeSide ()
void setTopVolumeSide ()
void setModelViewMatrix (GLint canvasType, GLfloat *modelview)
 Update the current OpenGL ModelView Matrix depending of canvas type.
void setInverseModelViewMatrix (GLint canvasType, GLfloat *inverse_modelview)
void setProjectionMatrix (GLint canvasType, GLfloat *projection)
 Update the current OpenGL Projection Matrix depending of canvas type.
void setViewport (GLint canvasType, GLint *viewport)
 Update the OpenGL view port depending of canvas type.
void setDepthBuffer3D (float *depthBuffer3D)
void setDepthBufferAxial (float *depthBufferAxial)
void setDepthBufferSagittal (float *depthBufferSagittal)
void setDepthBufferCoronal (float *depthBufferCoronal)
void setScrollBar (int plane, wxScrollBar *scrollBar)
void setStaticText (int plane, wxTextCtrl *staticTextCurrent, wxTextCtrl *staticTextTotal)
void SetStaticTextCursor3DPosInfo (wxStaticText *label)
void SetStaticTextCursor3DDataValue (wxStaticText *label)
void SetStaticTextProbeRadius (wxStaticText *label)
void SetStaticTextLensRadius (wxStaticText *label)
void SetStaticTextLensZoom (wxStaticText *label)
void setMeasurementsGrid (wxGrid *grid)
void setProgressBar (wxGauge *gauge)
 Initialize progress bar.
void setCanvas (GLint canvasType, wxGLCanvas *canvas)
void setMouseDrag (bool flag)
void setShifted (bool flag)
void setCtrled (bool flag)
void setBoundingBox (bool flag)
void setBoundingBox ()
void setDepthOfSlicing (float dist)
 Set the maximum depth for make curvilinear cropping.
void setBrushSize (int size)
void setSlicingPlanePosition (int plane, int slice)
 Handle the slicing of 2D Axial, Coronal, Sagittal planes.
void setPlanePosition (int plane, int slice)
 Handle the slicing of 2D Axial, Coronal, Sagittal planes.
void setBrushSizeTextCtrl (wxTextCtrl *textCtrl)
 Handle the brush size measurements.
void setNoiseThreshold (UINT32 value)
 Set the threshold for erase noise.
void setCurvilinearReformattingDepthTextCtrl (wxTextCtrl *textCtrl)
 Handle the wxTextCtrl object for measurements.
void incrementScale (float scale)
 Handle the zoom scale of 3D Volume.
void addPOR ()
 Handle the addition of Point Of Reference to Control Volume.
void addPOI ()
 Handle the addition of Point Of Interes to Control Volume.
void addLINE ()
 Handle the addition of a line to Control Volume.
void setFrameTF1D (VMTKframeTF1D *frameTF1D)
 Set Pointer to Transfer Function Editor Windows.
VMTKframeTF1DgetFrameTF1D ()
 Get Pointer to Transfer Function Editor Windows.
void setFrameQueryTools (VMTKframeQueryTools *frameQT)
 Set Pointer to Query Tools Windows.
VMTKframeQueryToolsgetFrameQT ()
 Get Pointer to Query Tools Window.
void setInteractionMode (InteractionMode mode)
 Set Interaction Mode type.
InteractionMode getInteractionMode ()
 Get Interaction Mode type.
void setQueryToolType (QueryToolType queryToolType)
 Set Interaction Query Tool Type.
QueryToolType getQueryToolType ()
 Get Interaction Query Tool type.
void removeTreePoint ()
void paintVoxel (float *point3D)
void LoadInteractionVolume (DCMDataType *VolumeData)
 Load volume array on which interactions are carried out.
void ResetInteractionsBuffers ()
 Renewal 2D array on which (x,y) windows coordinate are carried out.
void RestoreVolumeData (DCMDataType *dataType)
 Restore original Volume Data to GPU.
void FeedbackPaintedSamples (DataType volumeDataType, int x, int y)
 Visual feedback for MEASURING interactions.
bool MakeMeshFromPaintedSamples (DataType volumeDataType, size_t width, size_t height, unsigned char *interGrid)
 Make mesh from painted samples.
void ProcessCropping ()
 Process cropping.
bool CurvilinearSlicing (DataType volumeDataType)
 Curvilinear slicing.
void SetSlicingDepth (DataType dtype, float *depth, unsigned char mode)
 Cropping volume in depth.
void ClearInteractionPaintingBuffer (DCMDataType *VolumeData)
 Clear interaction buffer.
void printModelviewMatrix ()
void printInverseModelviewMatrix ()
void printProjectionMatrix ()
void printViewport ()
void printDepthBuffer (int width, int height)
wxGLVolumeRendergetCanvas3D ()
Transfer1DgetCanvasTF ()
void setCursor3D (bool state)
void setUseProbe (bool state)
void setSelectionGeometryVisible (bool state)
void setLensMode (bool state)
void setLensComposition (bool state)
Point3D getCursor3DPosition ()
void VoxelizationOfSphere (int tag)
void setProbeRadius (float probeRadius)
void setLensRadius (float lensRadius)
void setLensFocalZoom (float lensZoom)
void setFlipPlaneSide1 (bool state)
void setTFMixing (bool state)
void setTFSelection (bool state)
bool isKeyPressedP () const
 Verify is key M was pressed.
void setKeyPressedP (bool keyP)
bool isKeyPressedM () const
 Verify is key M was pressed.
void setKeyPressedM (bool keyM)
bool isKeyPressedE () const
 Verify is key E was pressed.
void setKeyPressedE (bool keyE)
bool isKeyPressedZ () const
 Verify is key E was pressed.
void setKeyPressedZ (bool keyZ)

Public Attributes

float slice_tag

Static Public Attributes

static struct GLSLIntParams intParams
static struct GLSLFloatParams floatParams
static struct GLSLRenderVars renderVars
static struct GLSLLens lensVars
static struct GLSLProbe probeVars

Detailed Description

This class contains all methods related with user interactions.

Note:
Real-Time Volume Rendering
Author:
$Wu Shin-Ting$

Constructor & Destructor Documentation

Interactions::Interactions ( DCMDataType data) [read]

Constructor.

Instantiate an <Interactions> objects.

Interactions::~Interactions ( )

Destructor.

Delete <Interactions> objetct.

Here is the caller graph for this function:


Member Function Documentation

void Interactions::ClearInteractionPaintingBuffer ( DCMDataType VolumeData)

Clear interaction buffer.

Reset all buffer for new cropping process.

interaction Grid and mesh should be cleared!!!!!

restore the original volume data

restore the original volume data saved in VolumeArray

restore the original volume data

Here is the call graph for this function:

Here is the caller graph for this function:

bool Interactions::CurvilinearSlicing ( DataType  volumeDataType)

Curvilinear slicing.

restore original volume data

After slicing the control volume, reload to GPU

Here is the call graph for this function:

Here is the caller graph for this function:

void Interactions::FeedbackPaintedSamples ( DataType  volumeDataType,
int  x,
int  y 
)

Visual feedback for MEASURING interactions.

Visual feedback for PAINTING interactions.

Visual feedback for PAINTING interactions

Load voxel position in volume array

Update voxel values

Reload Data to GPU

Here is the call graph for this function:

void Interactions::LoadInteractionVolume ( DCMDataType VolumeData)

Load volume array on which interactions are carried out.

remove old memory block

save volume array size

allocate and load memory block

Here is the caller graph for this function:

bool Interactions::MakeMeshFromPaintedSamples ( DataType  volumeDataType,
size_t  width,
size_t  height,
unsigned char *  interGrid 
)

Make mesh from painted samples.

From sampled select in 2D, convert to a mesh.

Estimate spacing between samples

Convert multiply-connected region to a simply-connected one

From this 2D Samples to 3D Samples

Getting the 3D position of single samples

Update voxel values

restore the original volume data

restore the original volume data

For measuring the amount of time spent in this step

Here is the call graph for this function:

Here is the caller graph for this function:

void Interactions::MouseMove ( wxMouseEvent &  e,
wxGLCanvas *  canvas,
int  canvasType 
)

Handle all Mouse Move events depending of canvas type.

re-evaluate only for valid points

Here is the call graph for this function:

void Interactions::ResetInteractionsBuffers ( )

Renewal 2D array on which (x,y) windows coordinate are carried out.

Allocate interaction data memory

Initialize the memory block

2D array on which world coordinate (x,y,z) are carried out

Here is the caller graph for this function:

void Interactions::RestoreVolumeData ( DCMDataType dataType)

Restore original Volume Data to GPU.

Restore Volume Data.

restore the original volume data

restore the original volume data saved in VolumeArray

Here is the call graph for this function:

Here is the caller graph for this function:

void Interactions::setDepthOfSlicing ( float  depth)

Set the maximum depth for make curvilinear cropping.

Cropping volume in depth: in sampling mode (0); in painting mode (1); in offset mode (2); just copy array (3) In sampling mode the displayed samples are the vertices of the current mesh

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Files Functions