Computer Assited Medical Intervention Tool Kit  version 5.0
InteractiveSliceViewer Class Reference

Interactive single slice viewer. More...

#include <InteractiveSliceViewer.h>

+ Inheritance diagram for InteractiveSliceViewer:
+ Collaboration diagram for InteractiveSliceViewer:

Public Member Functions

Q_INVOKABLE InteractiveSliceViewer (QString)
 constructor More...
 
virtual ~InteractiveSliceViewer () override=default
 destructor More...
 
- Public Member Functions inherited from camitk::InteractiveViewer
virtual void setBackgroundColor (QColor)
 set background color More...
 
virtual void setGradientBackground (bool)
 set gradient background on/off More...
 
Q_INVOKABLE InteractiveViewer (QString &name, camitk::InteractiveViewer::ViewerType type)
 Construtor. More...
 
virtual ~InteractiveViewer () override
 Destructor. More...
 
QString getName () const
 get the scene name More...
 
void refresh (Viewer *whoIsAsking=nullptr) override
 
QWidget * getWidget () override
 get the InteractiveViewer widget (QTreeWidget). More...
 
QObject * getPropertyObject () override
 get the InteractiveViewer propertyObject (only non-null for GEOMETRY_VIEWER) More...
 
QMenu * getMenu () override
 get the explorer menu More...
 
QToolBar * getToolBar () override
 get the viewer toolbar More...
 
void setColorScale (bool)
 
bool getColorScale () const
 get the current value of the color scale property. More...
 
void setColorScaleMinMax (double m, double M)
 set the min and max values. More...
 
void setColorScaleTitle (QString t)
 set the color scale title. More...
 
void initPicking (PickingMode)
 Init the picker with a given picking mode. More...
 
void getBoundsOfSelected (double *bound)
 Compute the bounding box of the selected elements [xmin,xmax, ymin,ymax, zmin,zmax]. More...
 
void getBounds (double *bound)
 Compute the bounding box of all displayed Component. More...
 
void setSideFrameVisible (bool)
 set the slice viewer side bar+screenshot button visibility More...
 
void refreshRenderer ()
 just refresh the renderer More...
 
void resetCamera ()
 Reset scene camera. More...
 
void setActiveCamera (QString cameraName)
 Set the active virtual camera. More...
 
vtkSmartPointer< vtkCamera > getCamera (QString cameraName="default")
 get a camera by its name, creates one if it does not exist already. More...
 
void screenshot (QString)
 call this method to take a screenshot using the given filename (the extension must be a supported format extension, see class RendererWindow) More...
 
void keyPressEvent (QKeyEvent *e)
 Handle keyboard events in the scene, let to the parent widget if not processed here. This method is a friend of class InteractiveViewerFrame. More...
 
virtual void setHighlightMode ()
 Set the current highlighting mode from the current value of the property. More...
 
RendererWidgetgetRendererWidget ()
 return interactiveViewer RendererWidget More...
 
- Public Member Functions inherited from camitk::Viewer
QStringList getComponents ()
 get the list of Component class manages by this viewer (default is set to "Component", i.e. More...
 
QString getDescription () const
 get the name of the viewer More...
 
QDockWidget * getDockWidget ()
 Get the QDockWidget* where this viewer is currently docked (or nullptr if it is not docked anywhere or if the viewer is of type EMBEDDED) More...
 
QLayout * getEmbedder ()
 Get the QLayout* where this viewer is currently embedded (or nullptr if it is not embedded anywhere or if the viewer is of type DOCKED) More...
 
virtual QPixmap getIcon ()
 get the viewer icon More...
 
QString getName () const
 get the name of the viewer More...
 
bool getToolBarVisibility ()
 get the current value of the toolbar visibility More...
 
ViewerType getType ()
 get the viewer layout More...
 
 Q_ENUM (ViewerType) Viewer(QString name
 default constructor More...
 
bool setDockWidget (QDockWidget *)
 If the viewer type is DOCKED, dock the widget inside the given dock widget (do nothing if the type is EMBEDDED or if the viewer has already been docked before) Note that once set, the dock widget cannot be modified. More...
 
bool setEmbedder (QLayout *)
 If the viewer type is EMBEDDED, embed the viewer widget in the given layout (do nothing if the type is DOCKED) Note that you can call this method any time you want to move the viewer's widget to another layout (but there is only one embedder at a time) More...
 
void setToolBarVisibility (bool)
 set the visibility of the toolbar in the main window (true by default). More...
 
void setType (ViewerType)
 set the viewer layout (the type can be changed dynamically to fit the developer's purpose) More...
 
void setVisible (bool)
 set the visibility of the viewer (show or hide its widget) More...
 
virtual ~Viewer () override
 default destructor More...
 

Additional Inherited Members

- Public Types inherited from camitk::InteractiveViewer
enum  HighlightMode { OFF, SELECTION, SELECTION_ONLY }
 
enum  PickingMode {
  PIXEL_PICKING, POINT_PICKING, CELL_PICKING, AREA_CELL_PICKING,
  AREA_POINT_PICKING, NO_PICKING
}
 
enum  ViewerType { SLICE_VIEWER, GEOMETRY_VIEWER }
 
- Public Types inherited from camitk::Viewer
enum  ViewerType { EMBEDDED, DOCKED }
 
- Public Slots inherited from camitk::InteractiveViewer
void sliderChanged (int)
 Slot called when the InteractiveViewer slider has been changed. More...
 
void xAngleChanged (double angle)
 Slot called when the InteractiveViewer x angle update has been changed. More...
 
void yAngleChanged (double angle)
 Slot called when the InteractiveViewer y angle update has been changed. More...
 
void zAngleChanged (double angle)
 Slot called when the InteractiveViewer z angle update has been changed. More...
 
void toggleLogo (bool)
 show/hide the logo at the bottom right corner More...
 
void screenshot ()
 call this method to take a screenshot in various format and write the resulting image to a file More...
 
void setBackfaceCulling (bool)
 
void setScreenshotAction (bool)
 visibility of the screenshot in slice viewers More...
 
void setLinesAsTubes (bool tubes)
 Update the visualization of lines (for all the InterfaceGeometry of the scene). More...
 
- Signals inherited from camitk::Viewer
void selectionChanged ()
 this signal is emitted when the current selection was changed by the viewer More...
 
- Public Attributes inherited from camitk::Viewer
ViewerType type = EMBEDDED)
 this viewer's layout More...
 
- Protected Slots inherited from camitk::InteractiveViewer
void renderingActorsChanged ()
 
void highlightModeChanged (QAction *selectedAction)
 
void cameraOrientationChanged (QAction *selectedAction)
 
void viewControlModeChanged (QAction *)
 
void backgroundColor ()
 
void toggleAxes (bool)
 
void toggleOrientationDecorations (bool)
 
void pickingModeChanged (QAction *)
 
void picked ()
 get the picker and populate the picked component with the picked stuff More...
 
void rightClick ()
 
void setLabel (bool)
 if true currently selected Components label will have their label on (shown) More...
 
void setGlyph (bool)
 
- Protected Member Functions inherited from camitk::InteractiveViewer
void init ()
 used by both constructors More...
 
void initSettings ()
 initialize the property object and state using the user settings (user preferences system files .config/.ini) More...
 
void toggleInterpolation ()
 for InterfaceBitMap, toggle the interpolation mode (intern method, not a property because it can only be modified by the keyboard interaction) More...
 
void resetLUT ()
 for InterfaceBitMap, reset the lut that was changed by the image interactor (window and level) More...
 
void updateSelectionDisplay (Component *)
 Update the display of the given Component, according to its selection state and the current HighlightMode. More...
 
void addActor (Component *, vtkSmartPointer< vtkProp >)
 add the given actor of the given Component to the renderer and insert it in the map More...
 
void removeAllActors (Component *)
 remove all the given Component actors from the renderer and delete comp from the map More...
 
void initActions ()
 init all the actions (called only once in the getWidget() method) More...
 
void updateActions ()
 update the viewer menu depending on the selection,... More...
 
void initWhatsThis ()
 initialize the what's this html string More...
 
void startWhatsThisSection (const QString &title="")
 start a table (section) in the what's this message More...
 
void endWhatsThisSection ()
 end a table (section) in the what's this message More...
 
void addWhatsThisItem (const QString &key, const QString &description)
 add an item (row) in the the what's this message (to describe a shortcut) More...
 
void createProperties ()
 Create and handle the CamiTK properties of this viewer. More...
 
bool eventFilter (QObject *object, QEvent *event) override
 Event filter of this class instance to watch its properties instances. More...
 
- Protected Member Functions inherited from camitk::Viewer
void clearSelection ()
 clear the selection More...
 
void selectionChanged (Component *comp)
 the selection has changed to be just one comp More...
 
void selectionChanged (ComponentList &compSet)
 The selection has changed to the given ComponentList. More...
 
void setComponents (QStringList)
 set the list of component class names managed by this viewer More...
 
void setDescription (QString)
 set the viewer's description More...
 
void setIcon (QPixmap icon)
 set the default icon for the viewer extension More...
 
- Protected Attributes inherited from camitk::InteractiveViewer
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. More...
 
PickingMode pickingMode
 Current picking mode, NO_PICKING be default. More...
 
bool isPicking
 Indicates that this viewer is picking. More...
 
bool isChangingSlice
 Indicates that this viewer is changing the slice by the slice slider. More...
 
bool pickingEffectIsSelecting
 picking effect while mouse button is kept pressed is selecting (depends on the selection state of the first component picked) More...
 
bool pickingEffectUpdated
 was the picking effect updated (it has to be updated with the first picking for a given button down session) More...
 
vtkSmartPointer< vtkEventQtSlotConnect > connector
 
ViewerType myType
 type of InteractiveViewer (display slice or geometry) More...
 
QMultiMap< Component *, vtkSmartPointer< vtkProp > > actorMap
 the map containing all the actors in the InteractiveViewer More...
 
unsigned int displayedTopLevelComponents
 number of top-level component that are currently displayed More...
 
QMap< QString, vtkSmartPointerCameracameraMap
 all the available camera More...
 
RendererWidgetrendererWidget
 
SliderSpinBoxWidgetsliceSlider
 Slider used to control the slice index in a InteractiveViewer. More...
 
InteractiveViewerFrameframe
 the InteractiveViewer frame More...
 
QFrame * sideFrame
 the right side frame (this is where the slider and screenshot buttons are shown) More...
 
QToolBar * screenshotActionMenu
 the screenshot action is inside this menu (in the slice viewer side bar) More...
 
QMenu * viewerMenu
 the QMenu for the InteractiveViewer More...
 
QToolBar * viewerToolbar
 the QToolBar for the InteractiveViewer More...
 
QComboBox * scalarDataComboBox
 the ComboBox for mesh scalar data More...
 
MeshDataFilterModelscalarDataModel
 
QAction * screenshotAction
 Screenshot. More...
 
QMenu * renderingMenu
 Rendering. More...
 
QAction * surfaceAction
 
QAction * wireframeAction
 
QAction * pointsAction
 
QAction * colorAction
 
QAction * glyphAction
 
QWidgetAction * scalarDataColorAction
 
QAction * highlightSelectionAction
 display mode More...
 
QAction * highlightSelectionOnlyAction
 
QAction * highlightOffAction
 
QAction * controlModeTrackballAction
 to change the camera control mode More...
 
QAction * controlModeJoystickAction
 
QAction * cameraOrientationRightDownAction
 to change the axes view mode More...
 
QAction * cameraOrientationLeftUpAction
 
QAction * cameraOrientationRightUpAction
 
QAction * backgroundColorAction
 background color More...
 
QAction * toggleAxesAction
 button allows one to display the Axes in the InteractiveViewer More...
 
QAction * toggleOrientationDecorationsAction
 button allows one to display orientation decoration in SLICE_VIEWER mode More...
 
QAction * toggleLogoAction
 button to remove the copyright More...
 
QAction * toggleLabelAction
 button allows one to display the labels of the object3D More...
 
QAction * toggleLinesAsTubesAction
 button allows one to display the lines as tubes (the lines are to be in vtkPolyData) More...
 
QAction * toggleBackfaceCullingAction
 back face culling More...
 
QAction * toggleScreenshotAction
 visibility of the screenshot action in the side toolbar of slice viewer More...
 
QAction * pickPointAction
 action of the picking menu More...
 
QAction * pickCellAction
 
QAction * pickCellRegionAction
 
QAction * pickPointRegionAction
 
QString whatsThis
 
bool oddWhatsThis
 are we currently in a odd table line More...
 
PropertyObjectpropertyObject
 The property object that holds the properties of this viewer. More...
 
PropertyhighlightModeProperty
 The property that stands for the type of highlight mode of the 3D viewer. More...
 
PropertybackgroundColorProperty
 The property that stands for the background color of the viewer. More...
 
PropertybackgroundGradientColorProperty
 Property that tells whether the viewer use a gradient background color or not. More...
 
PropertylinesAsTubesProperty
 Property that tells whether the viewer uses lines as tubes or not. More...
 
PropertybackfaceCullingProperty
 Property that tells whether the viewer uses the backface culling option or not. More...
 
PropertyscreenshotActionProperty
 Property that tells whether the screenshot action is visible or not. More...
 
PropertypointSizeProperty
 Property which defines the point size of each point in the 3D viewer. More...
 

Detailed Description

Interactive single slice viewer.

InteractiveSliceViewer is a the InteractiveViewer subclass dedicated to manage SingleImageComponent (a slice view of a medical image data). It blocks 3D movement and only display a 2D slice

It manages the camitk::InterfaceBitMap facet of components.

All the logic is done by InteractiveViewer.

If this viewer extension is loaded, there are four default instance of this viewer that can be accessed directly by Application::getViewer("Axial Viewer"), Application::getViewer("Coronal Viewer"), Application::getViewer("Sagittal Viewer") and Application::getViewer("Arbitrary Viewer").

See also
camitk::SingleImageComponent
camitk::InterfaceBitMap
camitk::Viewer

Constructor & Destructor Documentation

◆ InteractiveSliceViewer()

InteractiveSliceViewer::InteractiveSliceViewer ( QString  name)

constructor

References camitk::BACK_DOWN, camitk::InteractiveViewer::getRendererWidget(), camitk::LEFT_BACK, camitk::Viewer::name, camitk::RIGHT_DOWN, camitk::Viewer::setComponents(), camitk::Viewer::setDescription(), and camitk::InteractiveViewer::toggleOrientationDecorations().

+ Here is the call graph for this function:

◆ ~InteractiveSliceViewer()

virtual InteractiveSliceViewer::~InteractiveSliceViewer ( )
overridevirtualdefault

destructor


The documentation for this class was generated from the following files: