27 #ifndef INTERACTIVE_VIEWER_H
28 #define INTERACTIVE_VIEWER_H
32 #include "Component.h"
37 #include <QPushButton>
38 #include <QWidgetAction>
43 #include <vtkSmartPointer.h>
51 class vtkEventQtSlotConnect;
56 class SliderSpinBoxWidget;
57 class GeometricObject;
58 class InterfaceGeometry;
59 class InterfaceBitMap;
140 Q_PROPERTY (
HighlightMode highlightMode READ getHighlightMode WRITE setHighlightMode )
141 Q_PROPERTY ( QColor backgroundColor READ getBackgroundColor WRITE setBackgroundColor )
142 Q_PROPERTY (
bool gradientBackground READ getGradientBackground WRITE setGradientBackground )
143 Q_PROPERTY (
bool linesAsTubes READ getLinesAsTubes WRITE setLinesAsTubes )
144 Q_PROPERTY (
bool backfaceCulling READ getBackfaceCulling WRITE setBackfaceCulling )
145 Q_PROPERTY (
double pointSize READ getPointSize WRITE setPointSize )
208 QString getName()
const;
213 virtual unsigned int numberOfViewedComponent();
218 virtual void refresh (
Viewer *whoIsAsking = NULL );
221 virtual QWidget * getWidget ( QWidget * parent );
224 virtual QObject * getPropertyObject();
227 virtual QMenu * getMenu();
230 virtual QToolBar * getToolBar();
238 void refreshRenderer();
244 void setActiveCamera ( QString cameraName );
249 vtkSmartPointer<vtkCamera> getCamera ( QString cameraName =
"default" );
252 void screenshot ( QString );
265 virtual void setGradientBackground (
bool );
268 bool getGradientBackground()
const;
271 virtual void setBackgroundColor ( QColor );
274 QColor getBackgroundColor()
const;
278 void setBackfaceCulling (
bool );
282 bool getBackfaceCulling()
const;
292 void setLinesAsTubes (
bool tubes );
296 void keyPressEvent ( QKeyEvent* e );
299 bool getLinesAsTubes()
const;
308 void setPointSize (
double size );
311 double getPointSize()
const;
321 return rendererWidget;
329 void setColorScale (
bool );
334 bool getColorScale()
const;
341 void setColorScaleMinMax (
double m,
double M );
346 void setColorScaleTitle ( QString t );
349 void initPicking ( PickingMode );
352 void getBoundsOfSelected (
double *bound );
355 void getBounds (
double *bound );
358 void setSideFrameVisible(
bool);
365 void sliderChanged (
int );
368 void xAngleChanged (
double angle );
371 void yAngleChanged (
double angle );
374 void zAngleChanged (
double angle );
377 void toggleCopyright (
bool );
390 static QMap<QString, InteractiveViewer*>
viewers;
393 static QString defaultNames[5];
420 void toggleInterpolation();
426 void updateSelectionDisplay (
Component * );
429 QMultiMap<Component*, vtkSmartPointer<vtkProp> >
actorMap;
432 void addActor (
Component *, vtkSmartPointer<vtkProp> );
473 void updateActions();
563 void initWhatsThis();
566 void startWhatsThisSection (
const QString & title =
"" );
569 void endWhatsThisSection();
572 void addWhatsThisItem (
const QString & key,
const QString &
description );
578 void renderingActorsChanged();
581 void highlightModeChanged ( QAction *selectedAction );
583 void cameraOrientationChanged ( QAction *selectedAction );
585 void viewControlModeChanged ( QAction* );
587 void backgroundColor();
589 void toggleAxes (
bool );
591 void toggleOrientationDecorations (
bool );
593 void pickingModeChanged ( QAction* );
601 void setLabel (
bool);
InteractiveViewer * myInteractiveViewer
Definition: InteractiveViewer.h:74
QMap< QString, vtkSmartPointerCamera > cameraMap
all the available camera
Definition: InteractiveViewer.h:441
InteractiveViewerFrame * frame
the InteractiveViewer frame
Definition: InteractiveViewer.h:455
QMenu * viewerMenu
the QMenu for the InteractiveViewer
Definition: InteractiveViewer.h:464
QFrame * sideFrame
the right side frame (this is where the slider and screenshot buttons are shown)
Definition: InteractiveViewer.h:458
SliderSpinBoxWidget * sliceSlider
Slider used to control the slice index in a InteractiveViewer.
Definition: InteractiveViewer.h:452
QAction * cameraOrientationRightDownAction
to change the axes view mode
Definition: InteractiveViewer.h:496
const char * description
Definition: applications/cepgenerator/main.cpp:37
ControlMode
list of possible user interaction control mode
Definition: RendererWidget.h:147
vtkSmartPointer< vtkEventQtSlotConnect > connector
Definition: InteractiveViewer.h:548
QToolBar * viewerToolBar
the QToolBar for the InteractiveViewer
Definition: InteractiveViewer.h:467
InteractiveViewer is used to view 3D objects and slices (anything that provides either a InterfaceBit...
Definition: InteractiveViewer.h:137
CameraOrientation
describes the initial position and orientation of the default camera.
Definition: RendererWidget.h:137
QAction * toggleOrientationDecorationsAction
button allows one to display orientation decoration in SLICE_VIEWER mode
Definition: InteractiveViewer.h:507
QAction * controlModeTrackballAction
to change the camera control mode
Definition: InteractiveViewer.h:492
Viewer is an abstract viewer.
Definition: Viewer.h:55
RendererWidget * getRendererWidget()
return interactiveViewer RendererWidget
Definition: InteractiveViewer.h:320
QAction * pickCellAction
Definition: InteractiveViewer.h:523
string name
Definition: select.cpp:111
QAction * highlightOffAction
Definition: InteractiveViewer.h:489
QAction * toggleAxesAction
button allows one to display the Axes in the InteractiveViewer
Definition: InteractiveViewer.h:504
the selected Components are in default mode, the non-selected Components are shaded ...
Definition: InteractiveViewer.h:171
Definition: Action.cpp:40
bool pickingEffectUpdated
was the picking effect updated (it has to be updated with the first picking for a given button down s...
Definition: InteractiveViewer.h:546
pick a point in the VTK representation of an Geometry
Definition: InteractiveViewer.h:158
vtkSmartPointer< vtkCamera > vtkSmartPointerCamera
Definition: InteractiveViewer.h:60
bool oddWhatsThis
are we currently in a odd table line
Definition: InteractiveViewer.h:560
static QMap< QString, InteractiveViewer * > viewers
the map containing all the InteractiveViewer instances
Definition: InteractiveViewer.h:390
both selected and non-selected Components are in default mode
Definition: InteractiveViewer.h:170
QAction * screenshotAction
Screenshot.
Definition: InteractiveViewer.h:476
ViewerType myType
type of InteractiveViewer (display slice or geometry)
Definition: InteractiveViewer.h:414
QAction * cameraOrientationRightUpAction
Definition: InteractiveViewer.h:498
pick a pixel on a Slice
Definition: InteractiveViewer.h:157
QMenu * renderingMenu
Rendering.
Definition: InteractiveViewer.h:479
std::vector< Component * > pickedComponent
list of Component that are currently picked, correctly displayed in the InteractiveViewer, but for speed optimization that are not yet selected in the explorer.
Definition: InteractiveViewer.h:537
QAction * controlModeJoystickAction
Definition: InteractiveViewer.h:493
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:299
#define CAMITK_API
Definition: CamiTKAPI.h:49
QAction * cameraOrientationLeftUpAction
Definition: InteractiveViewer.h:497
PickingMode
Different kind of picking must be available: pixel in slice, a point, a cell, ... ...
Definition: InteractiveViewer.h:156
QAction * toggleBackfaceCullingAction
back face culling
Definition: InteractiveViewer.h:519
QAction * toggleCopyrightAction
button to remove the copyright
Definition: InteractiveViewer.h:510
QAction * wireframeAction
Definition: InteractiveViewer.h:481
unsigned int displayedTopLevelComponents
number of top-level component that are currently displayed
Definition: InteractiveViewer.h:438
QMultiMap< Component *, vtkSmartPointer< vtkProp > > actorMap
the map containing all the actors in the InteractiveViewer
Definition: InteractiveViewer.h:429
pick cells that are inside a rectangular area in the VTK representation of an Geometry ...
Definition: InteractiveViewer.h:160
QAction * highlightSelectionAction
display mode
Definition: InteractiveViewer.h:487
QAction * toggleLabelAction
button allows one to display the labels of the object3D
Definition: InteractiveViewer.h:513
QAction * surfaceAction
Definition: InteractiveViewer.h:480
void keyPressEvent(QKeyEvent *)
Handle keyboard events in the scene frame, just send everything to InteractiveViewer! ...
Definition: InteractiveViewer.cpp:2142
QAction * highlightSelectionOnlyAction
Definition: InteractiveViewer.h:488
bool linesAsTubes
Are lines currently displayed as tubes (the actors have to add a vtkTubeFilter between the source and...
Definition: InteractiveViewer.h:417
bool pickingEffectIsSelecting
picking effect while mouse button is kept pressed is selecting (depends on the selection state of the...
Definition: InteractiveViewer.h:543
StructureProperties::GeometricType type
Definition: ansys2pml.cpp:40
HighlightMode highlightMode
keep the value of the hightlight mode
Definition: InteractiveViewer.h:423
QAction * pointsAction
Definition: InteractiveViewer.h:482
QAction * pickPointAction
action of the picking menu
Definition: InteractiveViewer.h:522
QAction * colorAction
Definition: InteractiveViewer.h:483
PickingMode pickingMode
Current picking mode, NO_PICKING be default.
Definition: InteractiveViewer.h:540
QAction * backgroundColorAction
background color
Definition: InteractiveViewer.h:501
pick points that are inside a rectangular area in the VTK representation of an Geometry ...
Definition: InteractiveViewer.h:161
QAction * pickPointRegionAction
Definition: InteractiveViewer.h:525
QAction * toggleLinesAsTubesAction
button allows one to display the lines as tubes (the lines are to be in vtkPolyData) ...
Definition: InteractiveViewer.h:516
QAction * glyphAction
Definition: InteractiveViewer.h:484
HighlightMode
describes the current mode of display.
Definition: InteractiveViewer.h:169
InteractiveViewerFrame(QWidget *parent, InteractiveViewer *s3D)
default constructor
Definition: InteractiveViewer.h:68
InteractiveViewerFrame is just a QFrame that delegates all key events to its InteractiveViewer.
Definition: InteractiveViewer.h:65
pick a cell in the VTK representation of an Geometry
Definition: InteractiveViewer.h:159
QAction * pickCellRegionAction
Definition: InteractiveViewer.h:524