UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-12-17)
|
#include </home/soft/ustk/ustk-web-script/ustk-code/tutorial/ustk/virtualNeedle/usVirtualNeedle.h>
Public Slots | |
void | updateNeedlePosition (vpHomogeneousMatrix transform) |
Public Member Functions | |
usVirtualNeedle (QWidget *parent=NULL, Qt::WindowFlags f=Qt::WindowFlags()) | |
virtual | ~usVirtualNeedle () |
void | keyPressEvent (QKeyEvent *event) |
vtkPoints * | getMeshPoints () |
void | setMeshInScene (vtkPolyData *mesh) |
void | paintEvent (QPaintEvent *event) |
void | render () |
Class used to render a virtual needle movable in a 3D environment.
Definition at line 102 of file usVirtualNeedle.h.
usVirtualNeedle::usVirtualNeedle | ( | QWidget * | parent = NULL , |
Qt::WindowFlags | f = Qt::WindowFlags() |
||
) |
Constructor.
Definition at line 45 of file usVirtualNeedle.cpp.
|
inlinevirtual |
Definition at line 108 of file usVirtualNeedle.h.
vtkPoints * usVirtualNeedle::getMeshPoints | ( | ) |
Point set of the mesh getter. To update a point position: call GetPoint(int ptIndex), update the coordinates, and then call SetPoint(ptIndex,yourPoint) followed by Modified() to update vtk object.
Definition at line 219 of file usVirtualNeedle.cpp.
void usVirtualNeedle::keyPressEvent | ( | QKeyEvent * | event | ) |
Qt key press event catcher, used to move the virtual needle in the scene.
event | QKeyEvent. |
Definition at line 106 of file usVirtualNeedle.cpp.
References updateNeedlePosition().
void usVirtualNeedle::paintEvent | ( | QPaintEvent * | event | ) |
Qt paint event overload if needed to update Qt widget
event | QPaintEvent. |
Definition at line 100 of file usVirtualNeedle.cpp.
References usViewerWidget::paintEvent().
void usVirtualNeedle::render | ( | ) |
To render the scene, after some updates done on objects.
Definition at line 224 of file usVirtualNeedle.cpp.
void usVirtualNeedle::setMeshInScene | ( | vtkPolyData * | mesh | ) |
Setter for the mesh to introcuce in the scene.
mesh | The mesh, under vtkPolydataFormat. |
Definition at line 167 of file usVirtualNeedle.cpp.
|
slot |
Slot to call every time you want to update the virtual needle positon.
transform | The homogeneous matrix of the needle movement since last call (can be considered as a "delta" movement). |
Definition at line 185 of file usVirtualNeedle.cpp.
References usVTKConverter::convert().
Referenced by keyPressEvent().