OGS
|
Widget containing the 3d VTK scene view.
Definition at line 28 of file VisualizationWidget.h.
#include <VisualizationWidget.h>
Public Slots | |
void | updateView () |
Updates the the 3d view. | |
void | showAll (int x, int y, int z) |
Shows the entire scene on the views. x,y,z are in {-1, 0, 1} and specify from which direction the scene is displayed. | |
void | updateViewOnLoad () |
Updates the view only or additionally shows the entire scene. | |
void | screenshot (QString filename, int magnification) |
Saves a magnified image of the current render window to a file. | |
vtkRenderer * | renderer () const |
Returns the vtk renderer. | |
void | setCursorShape (Qt::CursorShape shape) |
Sets the widgets cursor shape. | |
Public Member Functions | |
VisualizationWidget (QWidget *parent=nullptr) | |
Constructor. | |
~VisualizationWidget () override | |
Destructor. | |
VtkCustomInteractorStyle * | interactorStyle () const |
Returns the VtkCustomInteractorStyle. | |
VtkPickCallback * | vtkPickCallback () const |
Returns the VtkPickCallback. | |
void | setShowAllOnLoad (bool show) |
See updateViewOnLoad(). | |
Protected Slots | |
void | on_showAllPushButton_pressed () |
Resets the camera to view the entire scene. | |
Protected Member Functions | |
void | on_rotateXPosPushButton_pressed () |
Reset camera to view entire scene from +x perspective. | |
void | on_rotateXNegPushButton_pressed () |
Reset camera to view entire scene from -x perspective. | |
void | on_rotateYPosPushButton_pressed () |
Reset camera to view entire scene from +y perspective. | |
void | on_rotateYNegPushButton_pressed () |
Reset camera to view entire scene from -y perspective. | |
void | on_rotateZPosPushButton_pressed () |
Reset camera to view entire scene from +z perspective. | |
void | on_rotateZNegPushButton_pressed () |
Reset camera to view entire scene from -z perspective. | |
void | on_zoomToolButton_toggled (bool checked) |
Toggles rectangular zooming mode. | |
void | on_highlightToolButton_toggled (bool checked) |
Toggles the display of bounding boxes around. | |
void | on_orthogonalProjectionToolButton_toggled (bool checked) |
Toggles the orthogonal projection. | |
void | on_screenshotPushButton_pressed () |
Saves a screenshot. | |
Private Attributes | |
vtkRenderer * | _vtkRender {nullptr} |
vtkOrientationMarkerWidget * | _markerWidget {nullptr} |
VtkCustomInteractorStyle * | _interactorStyle {nullptr} |
VtkPickCallback * | _vtkPickCallback {nullptr} |
bool | _isShowAllOnLoad |
|
explicit |
Constructor.
Definition at line 48 of file VisualizationWidget.cpp.
References _interactorStyle, _isShowAllOnLoad, _markerWidget, _vtkPickCallback, _vtkRender, VtkCustomInteractorStyle::New(), VtkPickCallback::New(), setCursorShape(), and updateView().
|
override |
Destructor.
Definition at line 93 of file VisualizationWidget.cpp.
References _interactorStyle, _markerWidget, and _vtkPickCallback.
VtkCustomInteractorStyle * VisualizationWidget::interactorStyle | ( | ) | const |
Returns the VtkCustomInteractorStyle.
Definition at line 100 of file VisualizationWidget.cpp.
References _interactorStyle.
Referenced by on_zoomToolButton_toggled().
|
protected |
Toggles the display of bounding boxes around.
Definition at line 170 of file VisualizationWidget.cpp.
References _interactorStyle, and VtkCustomInteractorStyle::setHighlightActor().
|
protected |
Toggles the orthogonal projection.
Definition at line 175 of file VisualizationWidget.cpp.
References _vtkRender, and updateView().
|
inlineprotected |
Reset camera to view entire scene from -x perspective.
Definition at line 78 of file VisualizationWidget.h.
References showAll().
|
inlineprotected |
Reset camera to view entire scene from +x perspective.
Definition at line 75 of file VisualizationWidget.h.
References showAll().
|
inlineprotected |
Reset camera to view entire scene from -y perspective.
Definition at line 84 of file VisualizationWidget.h.
References showAll().
|
inlineprotected |
Reset camera to view entire scene from +y perspective.
Definition at line 81 of file VisualizationWidget.h.
References showAll().
|
inlineprotected |
Reset camera to view entire scene from -z perspective.
Definition at line 90 of file VisualizationWidget.h.
References showAll().
|
inlineprotected |
Reset camera to view entire scene from +z perspective.
Definition at line 87 of file VisualizationWidget.h.
References showAll().
|
protected |
Saves a screenshot.
Definition at line 182 of file VisualizationWidget.cpp.
References screenshot().
|
inlineprotectedslot |
Resets the camera to view the entire scene.
Definition at line 72 of file VisualizationWidget.h.
References showAll().
|
protected |
Toggles rectangular zooming mode.
Definition at line 148 of file VisualizationWidget.cpp.
References _interactorStyle, and interactorStyle().
|
inlineslot |
Returns the vtk renderer.
Definition at line 64 of file VisualizationWidget.h.
References _vtkRender.
|
slot |
Saves a magnified image of the current render window to a file.
Definition at line 204 of file VisualizationWidget.cpp.
References updateView().
Referenced by on_screenshotPushButton_pressed().
|
slot |
Sets the widgets cursor shape.
Definition at line 224 of file VisualizationWidget.cpp.
Referenced by VisualizationWidget().
|
inline |
See updateViewOnLoad().
Definition at line 47 of file VisualizationWidget.h.
References _isShowAllOnLoad.
Referenced by VisPrefsDialog::on_loadShowAllCheckBox_stateChanged().
|
slot |
Shows the entire scene on the views. x,y,z are in {-1, 0, 1} and specify from which direction the scene is displayed.
Definition at line 115 of file VisualizationWidget.cpp.
References _vtkRender, and updateView().
Referenced by on_rotateXNegPushButton_pressed(), on_rotateXPosPushButton_pressed(), on_rotateYNegPushButton_pressed(), on_rotateYPosPushButton_pressed(), on_rotateZNegPushButton_pressed(), on_rotateZPosPushButton_pressed(), on_showAllPushButton_pressed(), and updateViewOnLoad().
|
slot |
Updates the the 3d view.
Definition at line 110 of file VisualizationWidget.cpp.
Referenced by VisualizationWidget(), on_orthogonalProjectionToolButton_toggled(), screenshot(), showAll(), and updateViewOnLoad().
|
slot |
Updates the view only or additionally shows the entire scene.
Definition at line 136 of file VisualizationWidget.cpp.
References _isShowAllOnLoad, showAll(), and updateView().
VtkPickCallback * VisualizationWidget::vtkPickCallback | ( | ) | const |
Returns the VtkPickCallback.
Definition at line 105 of file VisualizationWidget.cpp.
References _vtkPickCallback.
|
private |
Definition at line 107 of file VisualizationWidget.h.
Referenced by VisualizationWidget(), ~VisualizationWidget(), interactorStyle(), on_highlightToolButton_toggled(), and on_zoomToolButton_toggled().
|
private |
Definition at line 109 of file VisualizationWidget.h.
Referenced by VisualizationWidget(), setShowAllOnLoad(), and updateViewOnLoad().
|
private |
Definition at line 106 of file VisualizationWidget.h.
Referenced by VisualizationWidget(), and ~VisualizationWidget().
|
private |
Definition at line 108 of file VisualizationWidget.h.
Referenced by VisualizationWidget(), ~VisualizationWidget(), and vtkPickCallback().
|
private |
Definition at line 105 of file VisualizationWidget.h.
Referenced by VisualizationWidget(), on_orthogonalProjectionToolButton_toggled(), renderer(), and showAll().