27 #ifndef INTERACTIVE_VIEWER_H 28 #define INTERACTIVE_VIEWER_H 32 #include "Component.h" 38 #include <QPushButton> 39 #include <QWidgetAction> 44 #include <vtkSmartPointer.h> 52 class vtkEventQtSlotConnect;
56 class SliderSpinBoxWidget;
57 class GeometricObject;
58 class InterfaceGeometry;
59 class InterfaceBitMap;
60 class InteractiveViewer;
61 class MeshDataFilterModel;
204 QString getName()
const;
209 virtual unsigned int numberOfViewedComponent();
214 virtual void refresh (
Viewer *whoIsAsking = NULL );
217 virtual QWidget * getWidget ( QWidget * parent );
220 virtual QObject * getPropertyObject();
223 virtual QMenu * getMenu();
226 virtual QToolBar * getToolBar();
234 void refreshRenderer();
240 void setActiveCamera ( QString cameraName );
245 vtkSmartPointer<vtkCamera> getCamera ( QString cameraName =
"default" );
248 void screenshot ( QString );
257 virtual void setGradientBackground (
bool );
260 virtual void setBackgroundColor ( QColor );
267 void setBackfaceCulling (
bool );
281 void setLinesAsTubes (
bool tubes );
292 return rendererWidget;
300 void setColorScale (
bool );
305 bool getColorScale()
const;
312 void setColorScaleMinMax (
double m,
double M );
317 void setColorScaleTitle ( QString t );
323 void getBoundsOfSelected (
double *bound );
326 void getBounds (
double *bound );
329 void setSideFrameVisible(
bool);
336 void sliderChanged (
int );
339 void xAngleChanged (
double angle );
342 void yAngleChanged (
double angle );
345 void zAngleChanged (
double angle );
348 void toggleCopyright (
bool );
361 static QMap<QString, InteractiveViewer*>
viewers;
364 static QString defaultNames[5];
388 void toggleInterpolation();
391 void updateSelectionDisplay (
Component * );
394 QMultiMap<Component*, vtkSmartPointer<vtkProp> >
actorMap;
397 void addActor (
Component *, vtkSmartPointer<vtkProp> );
443 void updateActions();
535 void initWhatsThis();
538 void startWhatsThisSection (
const QString & title =
"" );
541 void endWhatsThisSection();
544 void addWhatsThisItem (
const QString & key,
const QString &
description );
589 void createProperties();
597 bool eventFilter(QObject *
object, QEvent *event);
605 void renderingActorsChanged();
608 void highlightModeChanged ( QAction *selectedAction );
610 void cameraOrientationChanged ( QAction *selectedAction );
612 void viewControlModeChanged ( QAction* );
614 void backgroundColor();
616 void toggleAxes (
bool );
618 void toggleOrientationDecorations (
bool );
620 void pickingModeChanged ( QAction* );
628 void setLabel (
bool);
InteractiveViewer * myInteractiveViewer
Definition: InteractiveViewer.h:77
QMap< QString, vtkSmartPointerCamera > cameraMap
all the available camera
Definition: InteractiveViewer.h:406
InteractiveViewerFrame * frame
the InteractiveViewer frame
Definition: InteractiveViewer.h:420
QMenu * viewerMenu
the QMenu for the InteractiveViewer
Definition: InteractiveViewer.h:429
QFrame * sideFrame
the right side frame (this is where the slider and screenshot buttons are shown)
Definition: InteractiveViewer.h:423
SliderSpinBoxWidget * sliceSlider
Slider used to control the slice index in a InteractiveViewer.
Definition: InteractiveViewer.h:417
Definition: MeshDataModel.h:122
PropertyObject * propertyObject
The property object that holds the properties of this viewer.
Definition: InteractiveViewer.h:554
QAction * cameraOrientationRightDownAction
to change the axes view mode
Definition: InteractiveViewer.h:467
const char * description
Definition: applications/cepgenerator/main.cpp:37
vtkSmartPointer< vtkEventQtSlotConnect > connector
Definition: InteractiveViewer.h:521
pick a pixel on a Slice
Definition: InteractiveViewer.h:153
QToolBar * viewerToolBar
the QToolBar for the InteractiveViewer
Definition: InteractiveViewer.h:432
InteractiveViewer is used to view 3D objects and slices (anything that provides either a InterfaceBit...
Definition: InteractiveViewer.h:139
QAction * toggleOrientationDecorationsAction
button allows one to display orientation decoration in SLICE_VIEWER mode
Definition: InteractiveViewer.h:478
QAction * controlModeTrackballAction
to change the camera control mode
Definition: InteractiveViewer.h:463
Viewer is an abstract viewer.
Definition: Viewer.h:55
RendererWidget * getRendererWidget()
return interactiveViewer RendererWidget
Definition: InteractiveViewer.h:291
PickingMode
Different kind of picking must be available: pixel in slice, a point, a cell, ... ...
Definition: InteractiveViewer.h:152
QAction * pickCellAction
Definition: InteractiveViewer.h:494
QAction * highlightOffAction
Definition: InteractiveViewer.h:460
QAction * toggleAxesAction
button allows one to display the Axes in the InteractiveViewer
Definition: InteractiveViewer.h:475
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:519
vtkSmartPointer< vtkCamera > vtkSmartPointerCamera
Definition: InteractiveViewer.h:63
QComboBox * scalarDataComboBox
the ComboBox for mesh scalar data
Definition: InteractiveViewer.h:435
bool oddWhatsThis
are we currently in a odd table line
Definition: InteractiveViewer.h:532
static QMap< QString, InteractiveViewer * > viewers
the map containing all the InteractiveViewer instances
Definition: InteractiveViewer.h:361
bool isPicking
Indicate that this viewer is picking.
Definition: InteractiveViewer.h:513
pick cells that are inside a rectangular area in the VTK representation of an Geometry ...
Definition: InteractiveViewer.h:156
QAction * screenshotAction
Screenshot.
Definition: InteractiveViewer.h:446
ViewerType myType
type of InteractiveViewer (display slice or geometry)
Definition: InteractiveViewer.h:385
QAction * cameraOrientationRightUpAction
Definition: InteractiveViewer.h:469
QMenu * renderingMenu
Rendering.
Definition: InteractiveViewer.h:449
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:507
Property * backgroundGradientColorProperty
Property that tells whether the viewer use a gradient background color or not.
Definition: InteractiveViewer.h:569
QAction * controlModeJoystickAction
Definition: InteractiveViewer.h:464
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:299
pick a cell in the VTK representation of an Geometry
Definition: InteractiveViewer.h:155
#define CAMITK_API
Definition: CamiTKAPI.h:49
This class describes a property object.
Definition: PropertyObject.h:50
QAction * cameraOrientationLeftUpAction
Definition: InteractiveViewer.h:468
QAction * toggleBackfaceCullingAction
back face culling
Definition: InteractiveViewer.h:490
Property * backgroundColorProperty
The property that stands for the background color of the viewer.
Definition: InteractiveViewer.h:564
QAction * toggleCopyrightAction
button to remove the copyright
Definition: InteractiveViewer.h:481
pick a point in the VTK representation of an Geometry
Definition: InteractiveViewer.h:154
QAction * wireframeAction
Definition: InteractiveViewer.h:451
unsigned int displayedTopLevelComponents
number of top-level component that are currently displayed
Definition: InteractiveViewer.h:403
QMultiMap< Component *, vtkSmartPointer< vtkProp > > actorMap
the map containing all the actors in the InteractiveViewer
Definition: InteractiveViewer.h:394
QAction * highlightSelectionAction
display mode
Definition: InteractiveViewer.h:458
QAction * toggleLabelAction
button allows one to display the labels of the object3D
Definition: InteractiveViewer.h:484
QAction * surfaceAction
Definition: InteractiveViewer.h:450
void keyPressEvent(QKeyEvent *)
Handle keyboard events in the scene frame, just send everything to InteractiveViewer! ...
Definition: InteractiveViewer.cpp:2205
Property * linesAsTubesProperty
Property that tells whether the viewer uses lines as tubes or not.
Definition: InteractiveViewer.h:574
QAction * highlightSelectionOnlyAction
Definition: InteractiveViewer.h:459
bool pickingEffectIsSelecting
picking effect while mouse button is kept pressed is selecting (depends on the selection state of the...
Definition: InteractiveViewer.h:516
Property * backfaceCullingProperty
Property that tells whether the viewer uses the backface culling option or not.
Definition: InteractiveViewer.h:579
QAction * pointsAction
Definition: InteractiveViewer.h:452
QAction * pickPointAction
action of the picking menu
Definition: InteractiveViewer.h:493
QAction * colorAction
Definition: InteractiveViewer.h:453
PickingMode pickingMode
Current picking mode, NO_PICKING be default.
Definition: InteractiveViewer.h:510
QAction * backgroundColorAction
background color
Definition: InteractiveViewer.h:472
QWidgetAction * scalarDataColorAction
Definition: InteractiveViewer.h:455
Property * pointSizeProperty
Property which defines the point size of each point in the 3D viewer.
Definition: InteractiveViewer.h:584
the selected Components are in default mode, the non-selected Components are shaded ...
Definition: InteractiveViewer.h:167
pick points that are inside a rectangular area in the VTK representation of an Geometry ...
Definition: InteractiveViewer.h:157
both selected and non-selected Components are in default mode
Definition: InteractiveViewer.h:166
HighlightMode
describes the current mode of display.
Definition: InteractiveViewer.h:165
QAction * pickPointRegionAction
Definition: InteractiveViewer.h:496
QAction * toggleLinesAsTubesAction
button allows one to display the lines as tubes (the lines are to be in vtkPolyData) ...
Definition: InteractiveViewer.h:487
QAction * glyphAction
Definition: InteractiveViewer.h:454
InteractiveViewerFrame(QWidget *parent, InteractiveViewer *s3D)
default constructor
Definition: InteractiveViewer.h:71
InteractiveViewerFrame is just a QFrame that delegates all key events to its InteractiveViewer.
Definition: InteractiveViewer.h:68
Property * highlightModeProperty
The property that stands for the type of highlight mode of the 3D viewer.
Definition: InteractiveViewer.h:559
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:260
QAction * pickCellRegionAction
Definition: InteractiveViewer.h:495
MeshDataFilterModel * scalarDataModel
Definition: InteractiveViewer.h:437