Computer Assited Medical Intervention Tool Kit  version 4.1
InteractiveViewer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 
27 #ifndef INTERACTIVE_VIEWER_H
28 #define INTERACTIVE_VIEWER_H
29 
30 // -- Core stuff
31 #include "CamiTKAPI.h"
32 #include "Component.h"
33 #include "Viewer.h"
34 #include "RendererWidget.h"
35 
36 //-- QT stuff
37 #include <QFrame>
38 #include <QPushButton>
39 #include <QWidgetAction>
40 #include <QComboBox>
41 class QToolBar;
42 
43 //-- vtk stuff
44 #include <vtkType.h>
45 #include <vtkSmartPointer.h>
46 
47 //-- vtk stuff classes
48 class vtkActor;
49 class vtkPicker;
50 class vtkProp;
51 class vtkObject;
52 class vtkCamera;
53 class vtkEventQtSlotConnect;
54 
55 namespace camitk {
56 // -- Core stuff classes
57 class SliderSpinBoxWidget;
58 class GeometricObject;
59 class InterfaceGeometry;
60 class InterfaceBitMap;
61 class InteractiveViewer;
62 class MeshDataFilterModel;
63 class PropertyObject;
64 class Property;
65 
66 using vtkSmartPointerCamera = vtkSmartPointer<vtkCamera>;
67 
69 class InteractiveViewerFrame : public QFrame {
70 public:
72  InteractiveViewerFrame(QWidget* parent, InteractiveViewer* s3D) : QFrame(parent), myInteractiveViewer(s3D) {}
73 
75  void keyPressEvent(QKeyEvent*) override;
76 
77 protected:
79 };
80 
140 class CAMITK_API InteractiveViewer : public Viewer {
141  Q_OBJECT
142  Q_ENUMS(HighlightMode RendererWidget::ControlMode RendererWidget::CameraOrientation) // so that it can be used in property editor
143 
144 public:
146  enum ViewerType {
147  SLICE_VIEWER,
148  GEOMETRY_VIEWER
149  };
150 
153  enum PickingMode {
154  PIXEL_PICKING,
155  POINT_PICKING,
156  CELL_PICKING,
157  AREA_CELL_PICKING,
158  AREA_POINT_PICKING,
159  NO_PICKING
160  };
161 
167  OFF,
168  SELECTION,
169  SELECTION_ONLY
170  };
171 
175 
181  static InteractiveViewer* getNewViewer(QString, ViewerType type);
182 
184  static InteractiveViewer* getViewer(QString);
185 
187  static InteractiveViewer* get3DViewer();
188 
190  static InteractiveViewer* getAxialViewer();
191 
193  static InteractiveViewer* getCoronalViewer();
194 
196  static InteractiveViewer* getSagittalViewer();
197 
199  static InteractiveViewer* getArbitraryViewer();
200 
202  ~InteractiveViewer() override;
203 
205  QString getName() const;
207 
210  unsigned int numberOfViewedComponent() override;
213 
215  void refresh(Viewer* whoIsAsking = nullptr) override;
216 
218  QWidget* getWidget(QWidget* parent) override;
219 
221  QObject* getPropertyObject() override;
222 
224  QMenu* getMenu() override;
225 
227  QToolBar* getToolBar() override;
229 
232 
235  void refreshRenderer();
236 
238  void resetCamera();
239 
241  void setActiveCamera(QString cameraName);
242 
246  vtkSmartPointer<vtkCamera> getCamera(QString cameraName = "default");
247 
249  void screenshot(QString);
250 
251 public slots:
253  void screenshot();
255 
256 public:
258  virtual void setGradientBackground(bool);
259 
261  virtual void setBackgroundColor(QColor);
262 
265 public slots:
268  void setBackfaceCulling(bool);
269 
271  void setScreenshotAction(bool);
272 
273 public:
275  // bool getBackfaceCulling() const;
276 
277 public slots:
285  void setLinesAsTubes(bool tubes);
286 
287 public:
289  void keyPressEvent(QKeyEvent* e);
290 
292  virtual void setHighlightMode(InteractiveViewer::HighlightMode);
293 
295  inline RendererWidget* getRendererWidget() {
296  return rendererWidget;
297  }
298 
299 
301 
304  void setColorScale(bool);
307 
309  bool getColorScale() const;
310 
316  void setColorScaleMinMax(double m, double M);
317 
321  void setColorScaleTitle(QString t);
322 
324  void initPicking(PickingMode);
325 
327  void getBoundsOfSelected(double* bound);
328 
330  void getBounds(double* bound);
331 
333  void setSideFrameVisible(bool);
335 
336 public slots:
337 
340  void sliderChanged(int);
341 
343  void xAngleChanged(double angle);
344 
346  void yAngleChanged(double angle);
347 
349  void zAngleChanged(double angle);
350 
352  void toggleCopyright(bool);
353 
354 protected:
357 
362  InteractiveViewer(QString& name, ViewerType type);
363 
365  static QMap<QString, InteractiveViewer*> viewers;
366 
368  static QString defaultNames[5];
369 
371 
372 
383 
386  void initSettings();
387 
389  ViewerType myType;
390 
392  void toggleInterpolation();
393 
395  void updateSelectionDisplay(Component*);
396 
398  QMultiMap<Component*, vtkSmartPointer<vtkProp> > actorMap;
399 
401  void addActor(Component*, vtkSmartPointer<vtkProp>);
402 
404  void removeAllActors(Component*);
405 
407  unsigned int displayedTopLevelComponents;
408 
410  QMap<QString, vtkSmartPointerCamera> cameraMap;
412 
415  RendererWidget* rendererWidget;
418 
421  SliderSpinBoxWidget* sliceSlider;
422 
424  InteractiveViewerFrame* frame;
425 
427  QFrame* sideFrame;
428 
430  QToolBar* screenshotActionMenu;
431 
433  friend void InteractiveViewerFrame::keyPressEvent(QKeyEvent* e);
434 
436  QMenu* viewerMenu;
437 
439  QToolBar* viewerToolBar;
440 
442  QComboBox* scalarDataComboBox;
443 
444  MeshDataFilterModel* scalarDataModel;
445 
447  void initActions();
448 
450  void updateActions();
451 
453  QAction* screenshotAction;
454 
456  QMenu* renderingMenu;
457  QAction* surfaceAction;
458  QAction* wireframeAction;
459  QAction* pointsAction;
460  QAction* colorAction;
461  QAction* glyphAction;
462  QWidgetAction* scalarDataColorAction;
463 
465  QAction* highlightSelectionAction;
466  QAction* highlightSelectionOnlyAction;
467  QAction* highlightOffAction;
468 
470  QAction* controlModeTrackballAction;
471  QAction* controlModeJoystickAction;
472 
474  QAction* cameraOrientationRightDownAction;
475  QAction* cameraOrientationLeftUpAction;
476  QAction* cameraOrientationRightUpAction;
477 
479  QAction* backgroundColorAction;
480 
482  QAction* toggleAxesAction;
483 
485  QAction* toggleOrientationDecorationsAction;
486 
488  QAction* toggleCopyrightAction;
489 
491  QAction* toggleLabelAction;
492 
494  QAction* toggleLinesAsTubesAction;
495 
497  QAction* toggleBackfaceCullingAction;
498 
500  QAction* toggleScreenshotAction;
501 
503  QAction* pickPointAction;
504  QAction* pickCellAction;
505  QAction* pickCellRegionAction;
506  QAction* pickPointRegionAction;
507 
509 
512 
517  std::vector <Component*> pickedComponent;
518 
520  PickingMode pickingMode;
521 
523  bool isPicking;
524 
526  bool isChangingSlice;
527 
529  bool pickingEffectIsSelecting;
530 
532  bool pickingEffectUpdated;
533 
534  vtkSmartPointer<vtkEventQtSlotConnect> connector;
535 
537 
540  QString whatsThis;
543 
545  bool oddWhatsThis;
546 
548  void initWhatsThis();
549 
551  void startWhatsThisSection(const QString& title = "");
552 
554  void endWhatsThisSection();
555 
557  void addWhatsThisItem(const QString& key, const QString& description);
559 
563 
567  PropertyObject* propertyObject;
568 
572  Property* highlightModeProperty;
573 
577  Property* backgroundColorProperty;
578 
582  Property* backgroundGradientColorProperty;
583 
587  Property* linesAsTubesProperty;
588 
592  Property* backfaceCullingProperty;
593 
597  Property* screenshotActionProperty;
598 
602  Property* pointSizeProperty;
603 
607  void createProperties();
608 
615  bool eventFilter(QObject* object, QEvent* event) override;
616 
618 
619 protected slots:
623  void renderingActorsChanged();
625 
626  void highlightModeChanged(QAction* selectedAction);
627 
628  void cameraOrientationChanged(QAction* selectedAction);
629 
630  void viewControlModeChanged(QAction*);
631 
632  void backgroundColor();
633 
634  void toggleAxes(bool);
635 
636  void toggleOrientationDecorations(bool);
637 
638  void pickingModeChanged(QAction*);
639 
641  void picked();
642 
643  void rightClick();
644 
646  void setLabel(bool);
647 
648  void setGlyph(bool);
649 
651 
652 
653 
654 };
655 
656 }
657 
659 
660 #endif
661 
662 //**************************************************************************
camitk::SliderSpinBoxWidget::addSingleStep
void addSingleStep()
add 1 to the value
Definition: SliderSpinBoxWidget.cpp:158
camitk::InteractiveViewer::cameraOrientationRightDownAction
QAction * cameraOrientationRightDownAction
to change the axes view mode
Definition: InteractiveViewer.h:473
camitk::setBackfaceCulling
void setBackfaceCulling(bool)
camitk::Component::getRepresentation
Representation getRepresentation() const
return the type of representation concretely implemented by this Component in the InteractiveViewer.
Definition: sdk/libraries/core/component/Component.cpp:318
camitk::MeshComponent::SCALARS
1D (scalar value)
Definition: MeshComponent.h:58
camitk::InteractiveViewer::actorMap
QMultiMap< Component *, vtkSmartPointer< vtkProp > > actorMap
the map containing all the actors in the InteractiveViewer
Definition: InteractiveViewer.h:397
camitk::InterfaceGeometry::Shaded
the object is shaded
Definition: InterfaceGeometry.h:76
camitk::InteractiveViewer::backgroundColor
void backgroundColor()
Definition: InteractiveViewer.cpp:2035
camitk::InteractiveViewer::screenshotAction
QAction * screenshotAction
Screenshot.
Definition: InteractiveViewer.h:452
camitk::InteractiveViewer::setLinesAsTubes
void setLinesAsTubes(bool tubes)
get the backface current culling mode.
Definition: InteractiveViewer.cpp:2090
camitk::InteractiveViewer::setBackgroundColor
virtual void setBackgroundColor(QColor)
set background color
Definition: InteractiveViewer.cpp:1612
camitk::InteractiveViewer::addWhatsThisItem
void addWhatsThisItem(const QString &key, const QString &description)
add an item (row) in the the what's this message (to describe a shortcut)
Definition: InteractiveViewer.cpp:1049
camitk::Component::getPixelActor
vtkSmartPointer< vtkImageData > vtkSmartPointer< vtkImageActor > getPixelActor
Definition: sdk/libraries/core/component/Component.h:684
camitk::InteractiveViewerFrame::myInteractiveViewer
InteractiveViewer * myInteractiveViewer
Definition: InteractiveViewer.h:77
camitk::InteractiveViewer::viewControlModeChanged
void viewControlModeChanged(QAction *)
Definition: InteractiveViewer.cpp:2025
camitk::InteractiveViewer::oddWhatsThis
bool oddWhatsThis
are we currently in a odd table line
Definition: InteractiveViewer.h:544
camitk::InteractiveViewer::removeAllActors
void removeAllActors(Component *)
remove all the given Component actors from the renderer and delete comp from the map
Definition: InteractiveViewer.cpp:694
camitk::setGradientBackground
void setGradientBackground(bool)
set the gradient background
camitk::InteractiveViewer::isPicking
bool isPicking
Indicates that this viewer is picking.
Definition: InteractiveViewer.h:522
camitk::SliderSpinBoxWidget::addPageStep
void addPageStep()
add a larger number of natural steps to the value, for information exact number of added step is min(...
Definition: SliderSpinBoxWidget.cpp:179
camitk::InterfaceBitMap::get2DImageActor
virtual vtkSmartPointer< vtkImageActor > get2DImageActor() const =0
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D viewers.
camitk::InteractiveViewer::getNewViewer
static InteractiveViewer * getNewViewer(QString, ViewerType type)
Use this method to create a new custom instance of this class.
Definition: InteractiveViewer.cpp:109
MeshDataModel.h
camitk::InteractiveViewer::colorAction
QAction * colorAction
Definition: InteractiveViewer.h:459
camitk::InteractiveViewer::renderingMenu
QMenu * renderingMenu
Rendering.
Definition: InteractiveViewer.h:455
camitk::InteractiveViewer::pickCellAction
QAction * pickCellAction
Definition: InteractiveViewer.h:503
camitk::LEFT_BACK
Definition: RendererWidget.h:167
camitk::InteractiveViewer::getWidget
QWidget * getWidget(QWidget *parent) override
get the InteractiveViewer widget (QTreeWidget).
Definition: InteractiveViewer.cpp:367
camitk::InterfaceGeometry::Normal
the object is normally displayed
Definition: InterfaceGeometry.h:74
camitk::InteractiveViewer::toggleCopyrightAction
QAction * toggleCopyrightAction
button to remove the copyright
Definition: InteractiveViewer.h:487
camitk::InteractiveViewer::setColorScaleTitle
void setColorScaleTitle(QString t)
set the color scale title.
Definition: InteractiveViewer.cpp:1817
CamiTKAPI.h
camitk::Application::getSettings
static QSettings & getSettings()
Get the Core wide settings.
Definition: Application.cpp:300
camitk::Component::isSelected
virtual bool isSelected() const
Check if this data component is selected.
Definition: sdk/libraries/core/component/Component.h:832
camitk::Property::setEnumTypeName
void setEnumTypeName(QString)
if the property's type is an enum, set the name of the registered Qt Enum.
Definition: Property.cpp:107
camitk::InteractiveViewer::getArbitraryViewer
static InteractiveViewer * getArbitraryViewer()
get the arbitrary default InteractiveViewer (provided for convenience, equivalent to getViewer("arbit...
Definition: InteractiveViewer.cpp:197
camitk::SliderSpinBoxWidget::setValue
void setValue(int value)
set the value (force)
Definition: SliderSpinBoxWidget.cpp:89
camitk::InteractiveViewer::highlightModeProperty
Property * highlightModeProperty
The property that stands for the type of highlight mode of the 3D viewer.
Definition: InteractiveViewer.h:571
camitk::Application::getAllComponents
static const ComponentList & getAllComponents()
get the current application wide list of all Components.
Definition: Application.cpp:889
a
#define a
camitk::setActiveCamera
void setActiveCamera(vtkCamera *cam)
set active camera
camitk::Action::getQAction
QAction * getQAction()
Get the corresponding QAction.
Definition: Action.cpp:182
camitk::Component::getSlice
int getSlice() const override
see Component.cpp
Definition: sdk/libraries/core/component/Component.cpp:528
camitk::InteractiveViewer::get3DViewer
static InteractiveViewer * get3DViewer()
get the 3D viewer default InteractiveViewer (provided for convenience, equivalent to getViewer("3DVie...
Definition: InteractiveViewer.cpp:181
camitk::screenshot
void screenshot(QString filename)
save the screenshot in a file
camitk::InteractiveViewer::setSideFrameVisible
void setSideFrameVisible(bool)
set the slice viewer side bar+screenshot button visibility
Definition: InteractiveViewer.cpp:1666
camitk::InteractiveViewer::displayedTopLevelComponents
unsigned int displayedTopLevelComponents
number of top-level component that are currently displayed
Definition: InteractiveViewer.h:406
CAMITK_INFO
#define CAMITK_INFO(MSG)
Log for info verbosity (the second most verbose one) The msg will appear only if the user asked for I...
Definition: Log.h:256
camitk::InterfaceFrame::getFrameAxisActor
virtual vtkSmartPointer< vtkAxesActor > getFrameAxisActor()=0
Gives the 3D representation of the frame (based on xyz arrows)
camitk::JOYSTICK
the mouse is used a joystick
Definition: RendererWidget.h:174
camitk::InteractiveViewer::getAxialViewer
static InteractiveViewer * getAxialViewer()
get the axial default InteractiveViewer (provided for convenience, equivalent to getViewer("axialView...
Definition: InteractiveViewer.cpp:185
camitk::InteractiveViewer::toggleOrientationDecorations
void toggleOrientationDecorations(bool)
Definition: InteractiveViewer.cpp:2052
camitk::Component::getActor
vtkSmartPointer< vtkPointSet > vtkSmartPointer< vtkAlgorithmOutput > getActor
Definition: sdk/libraries/core/component/Component.h:552
camitk::InteractiveViewer::toggleLinesAsTubesAction
QAction * toggleLinesAsTubesAction
button allows one to display the lines as tubes (the lines are to be in vtkPolyData)
Definition: InteractiveViewer.h:493
camitk::InteractiveViewer::setColorScaleMinMax
void setColorScaleMinMax(double m, double M)
set the min and max values.
Definition: InteractiveViewer.cpp:1812
camitk::InterfaceGeometry::Surface
the surface is visible
Definition: InterfaceGeometry.h:66
camitk::InteractiveViewer::getToolBar
QToolBar * getToolBar() override
get the viewer toolbar
Definition: InteractiveViewer.cpp:783
camitk::Component::getProp
vtkSmartPointer< vtkPointSet > vtkSmartPointer< vtkAlgorithmOutput > const RenderingModes vtkSmartPointer< vtkProp > getProp(const QString &param)
Return the vtkProp (actors, volumes and annotations) corresponding to the given name.
Definition: sdk/libraries/core/component/Component.h:556
PropertyObject.h
camitk::RendererWidget
RendererWidget(QWidget *parent=nullptr, ControlMode mode=RendererWidget::TRACKBALL)
constructors.
camitk::InteractiveViewer::screenshot
void screenshot()
call this method to take a screenshot in various format and write the resulting image to a file
Definition: InteractiveViewer.cpp:1769
camitk::InteractiveViewer::getColorScale
bool getColorScale() const
get the current value of the color scale property.
Definition: InteractiveViewer.cpp:1802
camitk::BACK_DOWN
< World axes are seen so that x points to the left, y points backward. For Medical Images Coronal Vie...
Definition: RendererWidget.h:168
camitk::InteractiveViewer::setScreenshotAction
void setScreenshotAction(bool)
visibility of the screenshot in slice viewers
Definition: InteractiveViewer.cpp:2100
camitk::toggleOrientationDecorations
void toggleOrientationDecorations(bool)
display orientation decorations
camitk::InteractiveViewer::setHighlightMode
virtual void setHighlightMode(InteractiveViewer::HighlightMode)
Set the current highlighting mode.
Definition: InteractiveViewer.cpp:1962
camitk::pointSize
pointSize
default point size
Definition: RendererWidget.cpp:501
camitk::InteractiveViewer::getRendererWidget
RendererWidget * getRendererWidget()
return interactiveViewer RendererWidget
Definition: InteractiveViewer.h:294
camitk::InteractiveViewer::highlightSelectionAction
QAction * highlightSelectionAction
display mode
Definition: InteractiveViewer.h:464
Action.h
camitk::TRACKBALL_2D
same as TRACKBALL but does not allow rotation using left button (but zoom and displacement parallel t...
Definition: RendererWidget.h:176
camitk::Component::getRenderingModes
const const RenderingModes InterfaceGeometry::RenderingModes getRenderingModes() const override
see Component.cpp
Definition: sdk/libraries/core/component/Component.cpp:416
camitk::backfaceCulling
backfaceCulling
Is back face culling on?
Definition: RendererWidget.cpp:497
camitk::ControlMode
ControlMode
Definition: RendererWidget.h:173
camitk::getScreenshotFormatInfo
static const ScreenshotFormatInfo * getScreenshotFormatInfo(unsigned int)
return the information concerning the supporting format using an index corresponding to the enum (che...
camitk::InteractiveViewer::CELL_PICKING
pick a cell in the VTK representation of an Geometry
Definition: InteractiveViewer.h:155
camitk::InteractiveViewer::pickingMode
PickingMode pickingMode
Current picking mode, NO_PICKING be default.
Definition: InteractiveViewer.h:519
camitk::InteractiveViewer::zAngleChanged
void zAngleChanged(double angle)
Slot called when the InteractiveViewer z angle update has been changed.
Definition: InteractiveViewer.cpp:1594
camitk::InteractiveViewer::keyPressEvent
void keyPressEvent(QKeyEvent *e)
Handle keyboard events in the scene, let to the parent widget if not processed here....
Definition: InteractiveViewer.cpp:1067
camitk::rightButtonPressed
void rightButtonPressed()
send when the mouse right button is clicked
camitk::InterfaceBitMap::getNumberOfSlices
virtual int getNumberOfSlices() const =0
Return the number of slices in the image data set.
camitk::InteractiveViewer::viewerMenu
QMenu * viewerMenu
the QMenu for the InteractiveViewer
Definition: InteractiveViewer.h:435
camitk::InteractiveViewer::yAngleChanged
void yAngleChanged(double angle)
Slot called when the InteractiveViewer y angle update has been changed.
Definition: InteractiveViewer.cpp:1581
camitk::InteractiveViewer::sliderChanged
void sliderChanged(int)
Slot called when the InteractiveViewer slider has been changed.
Definition: InteractiveViewer.cpp:1547
camitk::InteractiveViewer
InteractiveViewer is used to view 3D objects and slices (anything that provides either a InterfaceBit...
Definition: InteractiveViewer.h:139
camitk::Application::getSelectedComponents
static const ComponentList & getSelectedComponents()
get the currently selected Components.
Definition: Application.cpp:894
camitk::InteractiveViewer::updateSelectionDisplay
void updateSelectionDisplay(Component *)
Update the display of the given Component, according to its selection state and the current Highlight...
Definition: InteractiveViewer.cpp:1688
camitk::InteractiveViewerFrame::keyPressEvent
void keyPressEvent(QKeyEvent *) override
Handle keyboard events in the scene frame, just send everything to InteractiveViewer!
Definition: InteractiveViewer.cpp:2404
camitk::setColorScale
void setColorScale(bool)
display the color scale in the viewport, use setColorScaleMinMax to change the displayed values
camitk::toggleCopyright
void toggleCopyright(bool)
toggle copyright text
camitk::Property
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:312
camitk::InteractiveViewer::cameraOrientationChanged
void cameraOrientationChanged(QAction *selectedAction)
Definition: InteractiveViewer.cpp:2000
camitk::InteractiveViewerFrame
InteractiveViewerFrame is just a QFrame that delegates all key events to its InteractiveViewer.
Definition: InteractiveViewer.h:68
camitk::InteractiveViewer::PIXEL_PICKING
pick a pixel on a Slice
Definition: InteractiveViewer.h:153
camitk::InteractiveViewerFrame::InteractiveViewerFrame
InteractiveViewerFrame(QWidget *parent, InteractiveViewer *s3D)
default constructor
Definition: InteractiveViewer.h:71
camitk::Property::getName
const QString & getName() const
get the name of the property
Definition: Property.cpp:71
camitk::InteractiveViewer::glyphAction
QAction * glyphAction
Definition: InteractiveViewer.h:460
Log.h
camitk::InterfaceGeometry::Hidden
the object is hidden
Definition: InterfaceGeometry.h:75
camitk::InteractiveViewer::SELECTION_ONLY
the selected Components are in default mode, the non-selected are hidden
Definition: InteractiveViewer.h:168
camitk::InteractiveViewer::highlightSelectionOnlyAction
QAction * highlightSelectionOnlyAction
Definition: InteractiveViewer.h:465
camitk::ScreenshotFormatInfo::extension
QString extension
file extension (suffix)
Definition: RendererWidget.h:210
camitk::Component::get3DImageActor
vtkSmartPointer< vtkImageData > get3DImageActor
Definition: sdk/libraries/core/component/Component.h:680
MeshComponent.h
camitk::InteractiveViewer::toggleInterpolation
void toggleInterpolation()
for InterfaceBitMap, toggle the interpolation mode (intern method, not a property because it can only...
Definition: InteractiveViewer.cpp:1673
camitk::resetCamera
void resetCamera()
reset the camera to the default position, default FOV.
camitk::InteractiveViewer::backgroundColorProperty
Property * backgroundColorProperty
The property that stands for the background color of the viewer.
Definition: InteractiveViewer.h:576
camitk::controlMode
controlMode
current control mode
Definition: RendererWidget.cpp:520
camitk::InteractiveViewer::~InteractiveViewer
~InteractiveViewer() override
Destructor.
Definition: InteractiveViewer.cpp:261
camitk::ScreenshotFormatInfo::description
QString description
file format description
Definition: RendererWidget.h:212
camitk::InteractiveViewer::viewerToolBar
QToolBar * viewerToolBar
the QToolBar for the InteractiveViewer
Definition: InteractiveViewer.h:438
RendererWidget.h
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:228
camitk::toggleAxes
void toggleAxes(bool)
display the axes
camitk::MeshComponent::CELLS
data are attached to cells
Definition: MeshComponent.h:67
camitk::InteractiveViewer::backgroundColorAction
QAction * backgroundColorAction
background color
Definition: InteractiveViewer.h:478
camitk::InteractiveViewer::isChangingSlice
bool isChangingSlice
Indicates that this viewer is changing the slice by the slice slider.
Definition: InteractiveViewer.h:525
camitk::InteractiveViewer::setGradientBackground
virtual void setGradientBackground(bool)
set gradient background on/off
Definition: InteractiveViewer.cpp:1607
camitk::InteractiveViewer::startWhatsThisSection
void startWhatsThisSection(const QString &title="")
start a table (section) in the what's this message
Definition: InteractiveViewer.cpp:1036
camitk::Application::showStatusBarMessage
static void showStatusBarMessage(QString msg, int timeout=0)
Set a message to the status bar.
Definition: Application.cpp:322
camitk::Property::setAttribute
void setAttribute(const QString &attribute, const QVariant &value)
Set a given property for this attribute.
Definition: Property.cpp:182
camitk::SliderSpinBoxWidget::setRange
void setRange(int min, int max)
set the range
Definition: SliderSpinBoxWidget.cpp:97
camitk::Component::getVisibility
virtual bool getVisibility(Viewer *) const
get the visibility of a viewer
Definition: sdk/libraries/core/component/Component.cpp:287
Component::getName
const std::string getName() const
get the name of the component
Definition: modeling/libraries/pml/Component.h:146
camitk::InteractiveViewer::defaultNames
static QString defaultNames[5]
the QString array containing all InteractiveViewer instance default names
Definition: InteractiveViewer.h:367
camitk::MeshComponent::POINTS
data are attached to point
Definition: MeshComponent.h:66
camitk::InterfaceBitMap::pixelPicked
virtual void pixelPicked(double, double, double)=0
Return 2D Axes at the proper slice origin.
camitk::InteractiveViewer::refresh
void refresh(Viewer *whoIsAsking=nullptr) override
Refresh the display.
Definition: InteractiveViewer.cpp:526
camitk::InteractiveViewer::controlModeTrackballAction
QAction * controlModeTrackballAction
to change the camera control mode
Definition: InteractiveViewer.h:469
camitk::InteractiveViewer::frame
InteractiveViewerFrame * frame
the InteractiveViewer frame
Definition: InteractiveViewer.h:423
camitk::InteractiveViewer::refreshRenderer
void refreshRenderer()
just refresh the renderer
Definition: InteractiveViewer.cpp:689
camitk::LEFT_UP
World axes are seen so that x points to the left, y points upward.
Definition: RendererWidget.h:165
camitk::RIGHT_DOWN
World axes are seen so that x points to the right, y points downward.
Definition: RendererWidget.h:164
camitk::InteractiveViewer::scalarDataModel
MeshDataFilterModel * scalarDataModel
Definition: InteractiveViewer.h:443
camitk::SliderSpinBoxWidget::subSingleStep
void subSingleStep()
substract 1 to the value
Definition: SliderSpinBoxWidget.cpp:168
description
const char * description
Definition: applications/cepgenerator/main.cpp:37
camitk::InteractiveViewer::NO_PICKING
no picking possible
Definition: InteractiveViewer.h:158
camitk::InteractiveViewer::initWhatsThis
void initWhatsThis()
initialize the what's this html string
Definition: InteractiveViewer.cpp:1031
camitk::InteractiveViewer::sideFrame
QFrame * sideFrame
the right side frame (this is where the slider and screenshot buttons are shown)
Definition: InteractiveViewer.h:426
camitk::InteractiveViewer::resetCamera
void resetCamera()
Reset scene camera.
Definition: InteractiveViewer.cpp:1479
camitk::InteractiveViewer::initPicking
void initPicking(PickingMode)
Init the picker with a given picking mode.
Definition: InteractiveViewer.cpp:1721
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:848
camitk::RIGHT_UP
World axes are seen so that x points to the right, y points upward.
Definition: RendererWidget.h:166
camitk::InteractiveViewer::viewers
static QMap< QString, InteractiveViewer * > viewers
the map containing all the InteractiveViewer instances
Definition: InteractiveViewer.h:364
camitk::InteractiveViewer::toggleAxesAction
QAction * toggleAxesAction
button allows one to display the Axes in the InteractiveViewer
Definition: InteractiveViewer.h:481
camitk::InterfaceFrame::getFrameVisibility
virtual bool getFrameVisibility(Viewer *viewer) const =0
Get the Component Frame visibility for a given viewer.
camitk::InteractiveViewer::getMenu
QMenu * getMenu() override
get the explorer menu
Definition: InteractiveViewer.cpp:712
camitk::InteractiveViewer::setActiveCamera
void setActiveCamera(QString cameraName)
Set the active virtual camera.
Definition: InteractiveViewer.cpp:1526
camitk::InteractiveViewer::picked
void picked()
get the picker and populate the picked component with the picked stuff
Definition: InteractiveViewer.cpp:2124
camitk::InteractiveViewer::HighlightMode
HighlightMode
Definition: InteractiveViewer.h:165
camitk::InteractiveViewer::cameraOrientationRightUpAction
QAction * cameraOrientationRightUpAction
Definition: InteractiveViewer.h:475
camitk::InteractiveViewer::propertyObject
PropertyObject * propertyObject
The property object that holds the properties of this viewer.
Definition: InteractiveViewer.h:566
camitk::InteractiveViewer::OFF
both selected and non-selected Components are in default mode
Definition: InteractiveViewer.h:166
camitk::TRACKBALL
the mouse is used as a trackball (default)
Definition: RendererWidget.h:175
camitk::InteractiveViewer::POINT_PICKING
pick a point in the VTK representation of an Geometry
Definition: InteractiveViewer.h:154
camitk::setBackgroundColor
setBackgroundColor(0.0, 0.0, 0.0)
camitk::InteractiveViewer::pickPointAction
QAction * pickPointAction
action of the picking menu
Definition: InteractiveViewer.h:502
camitk::InteractiveViewer::whatsThis
QString whatsThis
Definition: InteractiveViewer.h:541
camitk::InteractiveViewer::sliceSlider
SliderSpinBoxWidget * sliceSlider
Slider used to control the slice index in a InteractiveViewer.
Definition: InteractiveViewer.h:420
camitk::getColorScale
bool getColorScale() const
get the color display state
camitk::InteractiveViewer::wireframeAction
QAction * wireframeAction
Definition: InteractiveViewer.h:457
SliderSpinBoxWidget.h
camitk::cameraOrientation
cameraOrientation
state of the initial camera orientation
Definition: RendererWidget.cpp:521
camitk::ComponentList
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:88
camitk::InteractiveViewer::getSagittalViewer
static InteractiveViewer * getSagittalViewer()
get the sagittal default InteractiveViewer (provided for convenience, equivalent to getViewer("sagitt...
Definition: InteractiveViewer.cpp:193
camitk::keyPressEvent
void keyPressEvent(QKeyEvent *e) override
key events (do nothing but pass on e to the parent widget), please do not add any shortcut management...
camitk::InteractiveViewer::getBoundsOfSelected
void getBoundsOfSelected(double *bound)
Compute the bounding box of the selected elements [xmin,xmax, ymin,ymax, zmin,zmax].
Definition: InteractiveViewer.cpp:1622
camitk::InteractiveViewer::SELECTION
the selected Components are in default mode, the non-selected Components are shaded
Definition: InteractiveViewer.h:167
camitk::Viewer::selectionChanged
void selectionChanged()
this signal is emitted when the current selection was changed by the viewer
camitk::InteractiveViewer::pickCellRegionAction
QAction * pickCellRegionAction
Definition: InteractiveViewer.h:504
camitk::InterfaceGeometry::Points
the points are visible
Definition: InterfaceGeometry.h:68
camitk::InteractiveViewer::eventFilter
bool eventFilter(QObject *object, QEvent *event) override
Event filter of this class instance to watch its properties instances.
Definition: InteractiveViewer.cpp:2340
camitk::Q_ENUMS
Q_ENUMS(ControlMode CameraOrientation)
RendererWidget implements all support methods to use camiTK with Qt interface.
camitk::InteractiveViewer::setColorScale
void setColorScale(bool)
Definition: InteractiveViewer.cpp:1807
camitk::InteractiveViewer::controlModeJoystickAction
QAction * controlModeJoystickAction
Definition: InteractiveViewer.h:470
camitk::Component::getBounds
void getBounds(double *bounds) override
compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax], see Component....
Definition: sdk/libraries/core/component/Component.cpp:461
camitk::Component::cellPicked
void cellPicked(vtkIdType, bool)
an inherited class can redefine this method something specific.
Definition: sdk/libraries/core/component/Component.h:617
camitk::NOT_SUPPORTED
Definition: RendererWidget.h:201
camitk::InteractiveViewer::pickingModeChanged
void pickingModeChanged(QAction *)
Definition: InteractiveViewer.cpp:2108
camitk::InteractiveViewer::createProperties
void createProperties()
Create and handle the CamiTK properties of this viewer.
Definition: InteractiveViewer.cpp:2295
camitk::Application::isAlive
static bool isAlive(Component *)
does this Component still exists?
Definition: Application.cpp:828
camitk::setColorScaleMinMax
void setColorScaleMinMax(double m, double M)
set the min and max values.
camitk::Application::getAction
static Action * getAction(QString)
get a registered action given its name
Definition: Application.cpp:762
camitk::InteractiveViewer::addActor
void addActor(Component *, vtkSmartPointer< vtkProp >)
add the given actor of the given Component to the renderer and insert it in the map
Definition: InteractiveViewer.cpp:704
camitk::Application::getName
static QString getName()
get the application name
Definition: Application.cpp:201
camitk::vtkSmartPointerCamera
vtkSmartPointer< vtkCamera > vtkSmartPointerCamera
Definition: InteractiveViewer.h:65
camitk::setColorScaleTitle
void setColorScaleTitle(QString t)
set the color scale title.
camitk::InteractiveViewer::backfaceCullingProperty
Property * backfaceCullingProperty
Property that tells whether the viewer uses the backface culling option or not.
Definition: InteractiveViewer.h:591
camitk::MeshDataFilterModel
CamiTK intern class to help automatically sort or show specific data.
Definition: MeshDataModel.h:129
camitk::InteractiveViewer::initActions
void initActions()
init all the actions (called only once in the getWidget() method)
Definition: InteractiveViewer.cpp:823
Component
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:47
camitk::InteractiveViewer::getName
QString getName() const
get the scene name
Definition: InteractiveViewer.cpp:516
camitk::Viewer
Viewer is an abstract viewer.
Definition: Viewer.h:54
camitk::InteractiveViewer::pointSizeProperty
Property * pointSizeProperty
Property which defines the point size of each point in the 3D viewer.
Definition: InteractiveViewer.h:601
camitk::InteractiveViewer::cameraMap
QMap< QString, vtkSmartPointerCamera > cameraMap
all the available camera
Definition: InteractiveViewer.h:409
camitk::Component::GEOMETRY
this Component can be displayed as a GEOMETRY
Definition: sdk/libraries/core/component/Component.h:307
camitk::Component::getNumberOfProp
unsigned int getNumberOfProp() const
return the number of additional prop
Definition: sdk/libraries/core/component/Component.h:566
camitk::Component::pointPicked
void pointPicked(vtkIdType, bool)
an inherited class can redefine this method something specific.
Definition: sdk/libraries/core/component/Component.h:612
camitk::InterfaceGeometry::setLinesAsTubes
virtual void setLinesAsTubes(bool)=0
set the lines as tubes (works only for vtkDataSet representation that contains lines)
camitk::InteractiveViewer::updateActions
void updateActions()
update the viewer menu depending on the selection,...
Definition: InteractiveViewer.cpp:1823
camitk::InteractiveViewer::scalarDataComboBox
QComboBox * scalarDataComboBox
the ComboBox for mesh scalar data
Definition: InteractiveViewer.h:441
InteractiveViewer.h
camitk::InteractiveViewer::rendererWidget
RendererWidget * rendererWidget
Definition: InteractiveViewer.h:416
camitk::InteractiveViewer::toggleBackfaceCullingAction
QAction * toggleBackfaceCullingAction
back face culling
Definition: InteractiveViewer.h:496
camitk::InteractiveViewer::PickingMode
PickingMode
Definition: InteractiveViewer.h:152
camitk::InteractiveViewer::pickingEffectIsSelecting
bool pickingEffectIsSelecting
picking effect while mouse button is kept pressed is selecting (depends on the selection state of the...
Definition: InteractiveViewer.h:528
camitk::InteractiveViewer::endWhatsThisSection
void endWhatsThisSection()
end a table (section) in the what's this message
Definition: InteractiveViewer.cpp:1043
camitk::InteractiveViewer::cameraOrientationLeftUpAction
QAction * cameraOrientationLeftUpAction
Definition: InteractiveViewer.h:474
camitk::InterfaceBitMap::getPickPlaneActor
virtual vtkSmartPointer< vtkActor > getPickPlaneActor() const =0
Return the vtkActor used to pick pixels in the slices.
camitk::InteractiveViewer::InteractiveViewer
InteractiveViewer(QString &name, ViewerType type)
Construtor.
Definition: InteractiveViewer.cpp:202
camitk::InteractiveViewer::xAngleChanged
void xAngleChanged(double angle)
Slot called when the InteractiveViewer x angle update has been changed.
Definition: InteractiveViewer.cpp:1568
Viewer.h
camitk::InteractiveViewer::setLabel
void setLabel(bool)
if true currently selected Components label will have their label on (shown)
Definition: InteractiveViewer.cpp:2066
camitk::InterfaceGeometry::Wireframe
the wireframe is visible
Definition: InterfaceGeometry.h:67
camitk::InteractiveViewer::screenshotActionMenu
QToolBar * screenshotActionMenu
the screenshot action is inside this menu (in the slice viewer side bar)
Definition: InteractiveViewer.h:429
camitk::InteractiveViewer::pointsAction
QAction * pointsAction
Definition: InteractiveViewer.h:458
camitk::InteractiveViewer::pickPointRegionAction
QAction * pickPointRegionAction
Definition: InteractiveViewer.h:505
camitk::CameraOrientation
CameraOrientation
Definition: RendererWidget.h:163
camitk::InterfaceGeometry::None
no rendering mode, the InterfaceGeometry is not visible
Definition: InterfaceGeometry.h:65
camitk::InteractiveViewer::highlightModeChanged
void highlightModeChanged(QAction *selectedAction)
Definition: InteractiveViewer.cpp:1977
camitk::InteractiveViewer::backgroundGradientColorProperty
Property * backgroundGradientColorProperty
Property that tells whether the viewer use a gradient background color or not.
Definition: InteractiveViewer.h:581
camitk::Application::getTopLevelComponents
static const ComponentList & getTopLevelComponents()
get the current application wide list of instantiated top-level Components.
Definition: Application.cpp:884
camitk::InteractiveViewer::getCoronalViewer
static InteractiveViewer * getCoronalViewer()
get the coronal default InteractiveViewer (provided for convenience, equivalent to getViewer("coronal...
Definition: InteractiveViewer.cpp:189
camitk::Component::SLICE
this Component can be displayed as a SLICE
Definition: sdk/libraries/core/component/Component.h:308
camitk::Viewer::clearSelection
void clearSelection()
clear the selection
Definition: Viewer.cpp:73
camitk::InteractiveViewer::setGlyph
void setGlyph(bool)
Definition: InteractiveViewer.cpp:2078
camitk::SliderSpinBoxWidget::subPageStep
void subPageStep()
substract a larger number of natural steps to the value, for information exact number of added step i...
Definition: SliderSpinBoxWidget.cpp:189
camitk::InteractiveViewer::getViewer
static InteractiveViewer * getViewer(QString)
get a viewer by its name (return NULL if no instance has the given name, use getNewViewer to create o...
Definition: InteractiveViewer.cpp:118
camitk::InteractiveViewer::toggleOrientationDecorationsAction
QAction * toggleOrientationDecorationsAction
button allows one to display orientation decoration in SLICE_VIEWER mode
Definition: InteractiveViewer.h:484
camitk::refresh
void refresh()
refresh the display
camitk::InteractiveViewer::toggleLabelAction
QAction * toggleLabelAction
button allows one to display the labels of the object3D
Definition: InteractiveViewer.h:490
camitk::InteractiveViewer::toggleCopyright
void toggleCopyright(bool)
show/hide the copyright in 3D
Definition: InteractiveViewer.cpp:2060
camitk::InteractiveViewer::AREA_CELL_PICKING
pick cells that are inside a rectangular area in the VTK representation of an Geometry
Definition: InteractiveViewer.h:156
camitk::InteractiveViewer::getBounds
void getBounds(double *bound)
Compute the bounding box of all displayed Component.
Definition: InteractiveViewer.cpp:1617
camitk::PropertyObject::addProperty
virtual bool addProperty(Property *)
Tag a new CamiTK property to this object.
Definition: PropertyObject.cpp:75
camitk::InteractiveViewer::renderingActorsChanged
void renderingActorsChanged()
Definition: InteractiveViewer.cpp:1938
camitk::InteractiveViewer::screenshotActionProperty
Property * screenshotActionProperty
Property that tells whether the screenshot action is visible or not.
Definition: InteractiveViewer.h:596
camitk::InteractiveViewer::connector
vtkSmartPointer< vtkEventQtSlotConnect > connector
Definition: InteractiveViewer.h:533
camitk::InteractiveViewer::scalarDataColorAction
QWidgetAction * scalarDataColorAction
Definition: InteractiveViewer.h:461
camitk::InteractiveViewer::rightClick
void rightClick()
Definition: InteractiveViewer.cpp:2283
camitk::InteractiveViewer::toggleScreenshotAction
QAction * toggleScreenshotAction
visibility of the screenshot action in the side toolbar of slice viewer
Definition: InteractiveViewer.h:499
camitk::InteractiveViewer::AREA_POINT_PICKING
pick points that are inside a rectangular area in the VTK representation of an Geometry
Definition: InteractiveViewer.h:157
camitk::InteractiveViewer::getCamera
vtkSmartPointer< vtkCamera > getCamera(QString cameraName="default")
get a camera by its name, creates one if it does not exist already.
Definition: InteractiveViewer.cpp:1533
camitk::InteractiveViewer::toggleAxes
void toggleAxes(bool)
Definition: InteractiveViewer.cpp:2045
camitk::PropertyObject
This class describes a property object.
Definition: PropertyObject.h:92
camitk::InteractiveViewer::setBackfaceCulling
void setBackfaceCulling(bool)
set the backface culling mode (default is true).
Definition: InteractiveViewer.cpp:2095
camitk::InteractiveViewer::linesAsTubesProperty
Property * linesAsTubesProperty
Property that tells whether the viewer uses lines as tubes or not.
Definition: InteractiveViewer.h:586
camitk::InteractiveViewer::highlightOffAction
QAction * highlightOffAction
Definition: InteractiveViewer.h:466
camitk::InterfaceGeometry::setEnhancedModes
virtual void setEnhancedModes(const EnhancedModes)=0
set the enhanced mode
camitk::InteractiveViewer::surfaceAction
QAction * surfaceAction
Definition: InteractiveViewer.h:456
camitk::SliderSpinBoxWidget
A utility class to have QSpinBox and QSlider synchronized. see for example InteractiveViewer (when it...
Definition: SliderSpinBoxWidget.h:63
camitk::InteractiveViewer::numberOfViewedComponent
unsigned int numberOfViewedComponent() override
Definition: InteractiveViewer.cpp:521
camitk::Component
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:297
CAMITK_API
#define CAMITK_API
Definition: CamiTKAPI.h:48
camitk::InteractiveViewer::initSettings
void initSettings()
initialize the property object and state using the user settings (user preferences system files ....
Definition: InteractiveViewer.cpp:275
camitk
Definition: Action.cpp:36
camitk::InteractiveViewer::myType
ViewerType myType
type of InteractiveViewer (display slice or geometry)
Definition: InteractiveViewer.h:388
camitk::InteractiveViewer::getPropertyObject
QObject * getPropertyObject() override
get the InteractiveViewer propertyObject (only non-null for GEOMETRY_VIEWER)
Definition: InteractiveViewer.cpp:506
camitk::InteractiveViewer::pickingEffectUpdated
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:531