NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Protected Member Functions | List of all members
niftk::BaseView Class Reference

Base view component for plugins listening to visibility change events, focus changed events and so on. More...

Inheritance diagram for niftk::BaseView:
Inheritance graph
[legend]
Collaboration diagram for niftk::BaseView:
Collaboration graph
[legend]

Public Types

typedef QmitkAbstractView SuperClass
 

Public Member Functions

 BaseView ()
 
virtual ~BaseView ()
 
virtual void onVisibilityChanged (const mitk::DataNode *node) override
 Called when the visibility of a node in the data storage changed. More...
 
virtual void OnFocusChanged ()
 Called when the window focus changes, and tracks the current mitk::BaseRenderer*. More...
 
virtual bool IsExclusiveFunctionality () const
 Returns whether this functionality should be exclusive, or in other words, the only active plugin. More...
 
virtual bool IsActivated ()
 Returns the activation status. More...
 
virtual bool IsVisible ()
 Returns the visible status. More...
 
mitk::DataStorage::Pointer GetDataStorage () const override
 Gets the currently active data storage. More...
 
virtual void SetCurrentSelection (mitk::DataNode::Pointer dataNode) override
 Selects the data node in this view and also in the data manager. It sets the "selected" property of the node. As a (positive) side effect of changing the data manager selection, the "selected" property of the previously selected nodes will be cleared. More...
 
virtual void OnSelectionChanged (berry::IWorkbenchPart::Pointer part, const QList< mitk::DataNode::Pointer > &nodes) override
 
virtual QmitkRenderWindow * GetRenderWindow (QString id)
 Retrieves a RenderWindow from the mitkRenderWindowPart. More...
 
virtual QmitkRenderWindow * GetSelectedRenderWindow () const override
 Retrieves the currently selected RenderWindow from the mitkRenderWindowPart. More...
 
virtual bool IsActiveEditorCursorVisible () const override
 Gets the visibility of the cursor (aka. crosshair) in the 2D render windows of the main display. More...
 
virtual void SetActiveEditorCursorVisible (bool visible) const override
 Sets the visibility of the cursor (aka. crosshair) in the 2D render windows of the main display. More...
 
virtual void RequestRenderWindowUpdate (mitk::RenderingManager::RequestType requestType=mitk::RenderingManager::REQUEST_UPDATE_ALL) override
 Request an update of all render windows of the currently active render window part. More...
 
QList< mitk::DataNode::Pointer > GetDataManagerSelection () const override
 Gets the list of nodes selected in the data manager. More...
 
virtual void FireNodeSelected (mitk::DataNode::Pointer node) override
 Informs other parts of the workbench that node is selected via the blueberry selection service. More...
 
virtual
mitk::SliceNavigationController * 
GetSliceNavigationController () override
 Retrieve the current slice navigation controller from the currently focused render window. More...
 
virtual void FocusOnCurrentWindow () const override
 Used to try and get the FocusManager to focus on the Current IRenderWindowPart. More...
 
virtual mitk::Point3D GetSelectedPosition () const override
 Gets the selected position in the active render window part. More...
 
virtual void SetSelectedPosition (const mitk::Point3D &selectedPosition) override
 Sets the selected position in the active render window part. More...
 
- Public Member Functions inherited from niftk::VisibilityChangeObserver
 VisibilityChangeObserver ()
 
virtual ~VisibilityChangeObserver ()
 

Protected Member Functions

virtual void Activated () override
 
virtual void Deactivated () override
 
virtual void Visible () override
 
virtual void Hidden () override
 
virtual QWidget * GetParent ()
 
virtual void SetParent (QWidget *)
 Normally called from within CreateQtPartControl, we store the parent widget. More...
 
void SetViewToCoordinate (const mitk::Point3D &coordinate)
 Gets the current render window, and sets it to the given coordinate, specified in millimetres. More...
 

Detailed Description

Base view component for plugins listening to visibility change events, focus changed events and so on.

Member Typedef Documentation

typedef QmitkAbstractView niftk::BaseView::SuperClass

Constructor & Destructor Documentation

niftk::BaseView::BaseView ( )
explicit
niftk::BaseView::~BaseView ( )
virtual

Member Function Documentation

void niftk::BaseView::Activated ( )
overrideprotectedvirtual
See also
mitk::ILifecycleAwarePart::PartActivated

Reimplemented in niftk::BaseSegmentorView, niftk::ImageLookupTablesView, and SurfaceExtractorView.

void niftk::BaseView::Deactivated ( )
overrideprotectedvirtual
See also
mitk::ILifecycleAwarePart::PartDeactivated

Reimplemented in niftk::BaseSegmentorView.

void niftk::BaseView::FireNodeSelected ( mitk::DataNode::Pointer  node)
overridevirtual

Informs other parts of the workbench that node is selected via the blueberry selection service.

Note
This method should not be used if you have set your own selection provider via SetSelectionProvider() or your own QItemSelectionModel via GetDataNodeSelectionModel().

Implements niftk::IBaseView.

void niftk::BaseView::FocusOnCurrentWindow ( ) const
overridevirtual

Used to try and get the FocusManager to focus on the Current IRenderWindowPart.

Implements niftk::IBaseView.

QList< mitk::DataNode::Pointer > niftk::BaseView::GetDataManagerSelection ( ) const
overridevirtual

Gets the list of nodes selected in the data manager.

Returns
The current selection made in the datamanager bundle or an empty list if there is no selection or if it is empty.

Implements niftk::IBaseView.

mitk::DataStorage::Pointer niftk::BaseView::GetDataStorage ( ) const
overridevirtual

Gets the currently active data storage.

Implements niftk::IBaseView.

QWidget * niftk::BaseView::GetParent ( )
protectedvirtual

Get the parent Qt widget for this view.

Returns
QWidget* The parent widget passed into CreateQtPartControl.
QmitkRenderWindow * niftk::BaseView::GetRenderWindow ( QString  id)
virtual

Retrieves a RenderWindow from the mitkRenderWindowPart.

Parameters
idThe name of the QmitkRenderWindow, such as "axial", "sagittal", "coronal".
Returns
QmitkRenderWindow* The render window or NULL if it can not be found.
mitk::Point3D niftk::BaseView::GetSelectedPosition ( ) const
overridevirtual

Gets the selected position in the active render window part.

Implements niftk::IBaseView.

QmitkRenderWindow * niftk::BaseView::GetSelectedRenderWindow ( ) const
overridevirtual

Retrieves the currently selected RenderWindow from the mitkRenderWindowPart.

Returns
QmitkRenderWindow* The selected render window or NULL if it no render window is selected.

Implements niftk::IBaseView.

mitk::SliceNavigationController * niftk::BaseView::GetSliceNavigationController ( )
overridevirtual

Retrieve the current slice navigation controller from the currently focused render window.

Returns
mitk::SliceNavigationController* The slice navigation controller for the currenty focused render window, or NULL if it can't be determined.

Implements niftk::IBaseView.

void niftk::BaseView::Hidden ( )
overrideprotectedvirtual
See also
mitk::ILifecycleAwarePart::PartHidden

Reimplemented in niftk::BaseSegmentorView.

bool niftk::BaseView::IsActivated ( )
virtual

Returns the activation status.

Returns
bool true if activated and false otherwise.
bool niftk::BaseView::IsActiveEditorCursorVisible ( ) const
overridevirtual

Gets the visibility of the cursor (aka. crosshair) in the 2D render windows of the main display.

Implements niftk::IBaseView.

bool niftk::BaseView::IsExclusiveFunctionality ( ) const
virtual

Returns whether this functionality should be exclusive, or in other words, the only active plugin.

Returns
false Always false.
bool niftk::BaseView::IsVisible ( )
virtual

Returns the visible status.

Returns
bool true if visible and false otherwise.
void niftk::BaseView::OnFocusChanged ( )
virtual

Called when the window focus changes, and tracks the current mitk::BaseRenderer*.

void niftk::BaseView::OnSelectionChanged ( berry::IWorkbenchPart::Pointer  part,
const QList< mitk::DataNode::Pointer > &  nodes 
)
overridevirtual
See also
QmitkAbstractView::OnSelectionChanged.

Reimplemented in AffineTransformView, QmitkPointSetCropper, niftk::BaseSegmentorView, SurfaceExtractorView, and niftk::ImageLookupTablesView.

void niftk::BaseView::onVisibilityChanged ( const mitk::DataNode *  node)
overridevirtual

Called when the visibility of a node in the data storage changed.

Parameters
nodeThe node in the data storage whose visibility property has been modified.

Implements niftk::VisibilityChangeObserver.

Reimplemented in IntensityProfileView.

void niftk::BaseView::RequestRenderWindowUpdate ( mitk::RenderingManager::RequestType  requestType = mitk::RenderingManager::REQUEST_UPDATE_ALL)
overridevirtual

Request an update of all render windows of the currently active render window part.

Parameters
requestTypeSpecifies the type of render windows for which an update will be requested.

Implements niftk::IBaseView.

void niftk::BaseView::SetActiveEditorCursorVisible ( bool  visible) const
overridevirtual

Sets the visibility of the cursor (aka. crosshair) in the 2D render windows of the main display.

Implements niftk::IBaseView.

void niftk::BaseView::SetCurrentSelection ( mitk::DataNode::Pointer  dataNode)
overridevirtual

Selects the data node in this view and also in the data manager. It sets the "selected" property of the node. As a (positive) side effect of changing the data manager selection, the "selected" property of the previously selected nodes will be cleared.

Implements niftk::IBaseView.

void niftk::BaseView::SetParent ( QWidget *  parent)
protectedvirtual

Normally called from within CreateQtPartControl, we store the parent widget.

Parameters
QWidget*The widget passed into CreateQtPartControl.
void niftk::BaseView::SetSelectedPosition ( const mitk::Point3D &  selectedPosition)
overridevirtual

Sets the selected position in the active render window part.

Implements niftk::IBaseView.

void niftk::BaseView::SetViewToCoordinate ( const mitk::Point3D &  coordinate)
protected

Gets the current render window, and sets it to the given coordinate, specified in millimetres.

Parameters
coordinatespecified in millimetres.
void niftk::BaseView::Visible ( )
overrideprotectedvirtual
See also
mitk::ILifecycleAwarePart::PartVisible

Reimplemented in niftk::BaseSegmentorView, and VLRendererView.


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