NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | Protected Member Functions | List of all members
niftk::BaseController Class Referenceabstract
Inheritance diagram for niftk::BaseController:
Inheritance graph
[legend]
Collaboration diagram for niftk::BaseController:
Collaboration graph
[legend]

Public Member Functions

 BaseController (IBaseView *view)
 Constructs a BaseController object. More...
 
virtual ~BaseController ()
 Destructs the BaseController object. More...
 
ImageOrientation GetOrientation () const
 Returns the orientation of the selected render window. Returns IMAGE_ORIENTATION_UNKNOWN if no window is selected or the selected window is a 3D window. More...
 
int GetSliceIndex () const
 Returns the index of the displayed slice in the currently selected window. Returns -1 if no window is selected or the selected window is a 3D window. More...
 
mitk::Point3D GetSelectedPosition () const
 Returns the selected position in the current editor (render window part). The selected position is the voxel at the intersection of the crosshair planes. More...
 
virtual void SetupGUI (QWidget *parent)
 Sets up the GUI. This function has to be called from the CreateQtPartControl function of the view. More...
 
virtual void OnViewGetsActivated ()
 Called when the BlueBerry view that hosts the GUI for this controller gets activated. More...
 
virtual void OnViewGetsDeactivated ()
 Called when the BlueBerry view that hosts the GUI for this controller gets deactivated. More...
 
virtual void OnViewGetsVisible ()
 Called when the BlueBerry view that hosts the GUI for this controller becomes visible. More...
 
virtual void OnViewGetsHidden ()
 Called when the BlueBerry view that hosts the GUI for this controller becomes hidden. More...
 

Protected Member Functions

mitk::DataStorage * GetDataStorage () const
 
void RequestRenderWindowUpdate () const
 
QList< mitk::DataNode::Pointer > GetDataManagerSelection () const
 
mitk::SliceNavigationController * GetSliceNavigationController () const
 
virtual void OnSelectedSliceChanged (niftk::ImageOrientation orientation, int sliceIndex)
 Called when the selected slice changes. This happens when selected window changes in the current editor (render window part) or when the focus is on a 2D render window in the current editor and the selected slice changes, either through interaction (e.g. by scrolling with the mouse wheel) or through an API call. More...
 
virtual BaseGUICreateGUI (QWidget *parent)=0
 Creates the widget that holds the GUI components of the view. This function is called from CreateQtPartControl. Derived classes should provide their implementation that returns an object whose class derives from niftk::BaseGUI. More...
 
BaseGUIGetGUI () const
 Gets the widget that holds the GUI components of the view. More...
 
IBaseViewGetView () const
 Gets the segmentor BlueBerry view. More...
 
virtual void OnFocusChanged ()
 Called when the window focus changes, and tracks the current mitk::BaseRenderer*. More...
 
virtual mitk::BaseRenderer * GetFocused2DRenderer () const
 Returns the currently focused renderer, as this class is tracking the focus changes. More...
 
virtual void OnNodeAdded (const mitk::DataNode *node)
 Called when a data node is added to the data storage. Empty implementation. Derived classes can override it. More...
 
virtual void OnNodeChanged (const mitk::DataNode *node)
 Called when a data node in the data storage has changed. Empty implementation. Derived classes can override it. More...
 
virtual void OnNodeRemoved (const mitk::DataNode *node)
 Called when a data node has been removed from the data storage. Empty implementation. Derived classes can override it. More...
 
virtual void OnNodeDeleted (const mitk::DataNode *node)
 Called when a data node has been deleted that has previously been in the data storage. Empty implementation. Derived classes can override it. More...
 
virtual void OnNodeVisibilityChanged (const mitk::DataNode *node, const mitk::BaseRenderer *renderer)
 Called when the visibility of a data node in the data storage has changed. The renderer is nullptr if the global visibility has changed. Empty implementation. Derived classes can override it. More...
 
void WaitCursorOn ()
 Convenient method to set and reset a wait cursor ("hourglass") More...
 
void WaitCursorOff ()
 Convenient method to restore the standard cursor. More...
 
void BusyCursorOn ()
 Convenient method to set and reset a busy cursor. More...
 
void BusyCursorOff ()
 Convenient method to restore the standard cursor. More...
 

Constructor & Destructor Documentation

niftk::BaseController::BaseController ( IBaseView view)

Constructs a BaseController object.

niftk::BaseController::~BaseController ( )
virtual

Destructs the BaseController object.

Member Function Documentation

void niftk::BaseController::BusyCursorOff ( )
protected

Convenient method to restore the standard cursor.

void niftk::BaseController::BusyCursorOn ( )
protected

Convenient method to set and reset a busy cursor.

virtual BaseGUI* niftk::BaseController::CreateGUI ( QWidget *  parent)
protectedpure virtual

Creates the widget that holds the GUI components of the view. This function is called from CreateQtPartControl. Derived classes should provide their implementation that returns an object whose class derives from niftk::BaseGUI.

Implemented in niftk::GeneralSegmentorController, and niftk::MorphologicalSegmentorController.

QList< mitk::DataNode::Pointer > niftk::BaseController::GetDataManagerSelection ( ) const
protected

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

See also
QmitkAbstractView::GetDataManagerSelection()
mitk::DataStorage * niftk::BaseController::GetDataStorage ( ) const
protected
mitk::BaseRenderer * niftk::BaseController::GetFocused2DRenderer ( ) const
protectedvirtual

Returns the currently focused renderer, as this class is tracking the focus changes.

Returns
mitk::BaseRenderer* The currently focused renderer, or nullptr if it has not been set.
BaseGUI * niftk::BaseController::GetGUI ( ) const
protected

Gets the widget that holds the GUI components of the view.

ImageOrientation niftk::BaseController::GetOrientation ( ) const

Returns the orientation of the selected render window. Returns IMAGE_ORIENTATION_UNKNOWN if no window is selected or the selected window is a 3D window.

mitk::Point3D niftk::BaseController::GetSelectedPosition ( ) const

Returns the selected position in the current editor (render window part). The selected position is the voxel at the intersection of the crosshair planes.

int niftk::BaseController::GetSliceIndex ( ) const

Returns the index of the displayed slice in the currently selected window. Returns -1 if no window is selected or the selected window is a 3D window.

mitk::SliceNavigationController * niftk::BaseController::GetSliceNavigationController ( ) const
protected
IBaseView * niftk::BaseController::GetView ( ) const
protected

Gets the segmentor BlueBerry view.

void niftk::BaseController::OnFocusChanged ( )
protectedvirtual

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

void niftk::BaseController::OnNodeAdded ( const mitk::DataNode *  node)
protectedvirtual

Called when a data node is added to the data storage. Empty implementation. Derived classes can override it.

void niftk::BaseController::OnNodeChanged ( const mitk::DataNode *  node)
protectedvirtual

Called when a data node in the data storage has changed. Empty implementation. Derived classes can override it.

void niftk::BaseController::OnNodeDeleted ( const mitk::DataNode *  node)
protectedvirtual

Called when a data node has been deleted that has previously been in the data storage. Empty implementation. Derived classes can override it.

void niftk::BaseController::OnNodeRemoved ( const mitk::DataNode *  node)
protectedvirtual

Called when a data node has been removed from the data storage. Empty implementation. Derived classes can override it.

Reimplemented in niftk::MorphologicalSegmentorController.

void niftk::BaseController::OnNodeVisibilityChanged ( const mitk::DataNode *  node,
const mitk::BaseRenderer *  renderer 
)
protectedvirtual

Called when the visibility of a data node in the data storage has changed. The renderer is nullptr if the global visibility has changed. Empty implementation. Derived classes can override it.

Reimplemented in niftk::GeneralSegmentorController, and niftk::MorphologicalSegmentorController.

void niftk::BaseController::OnSelectedSliceChanged ( niftk::ImageOrientation  orientation,
int  sliceIndex 
)
protectedvirtual

Called when the selected slice changes. This happens when selected window changes in the current editor (render window part) or when the focus is on a 2D render window in the current editor and the selected slice changes, either through interaction (e.g. by scrolling with the mouse wheel) or through an API call.

Parameters
orientationThe orientation of the 2D window or IMAGE_ORIENTATION_UNKNOWN if a 3D window is selected.
sliceIndexThe index of the current slice or -1 if a 3D window is selected.

Reimplemented in niftk::GeneralSegmentorController.

void niftk::BaseController::OnViewGetsActivated ( )
virtual

Called when the BlueBerry view that hosts the GUI for this controller gets activated.

Reimplemented in niftk::BaseSegmentorController.

void niftk::BaseController::OnViewGetsDeactivated ( )
virtual

Called when the BlueBerry view that hosts the GUI for this controller gets deactivated.

void niftk::BaseController::OnViewGetsHidden ( )
virtual

Called when the BlueBerry view that hosts the GUI for this controller becomes hidden.

void niftk::BaseController::OnViewGetsVisible ( )
virtual

Called when the BlueBerry view that hosts the GUI for this controller becomes visible.

void niftk::BaseController::RequestRenderWindowUpdate ( ) const
protected
void niftk::BaseController::SetupGUI ( QWidget *  parent)
virtual

Sets up the GUI. This function has to be called from the CreateQtPartControl function of the view.

Reimplemented in niftk::GeneralSegmentorController, niftk::BaseSegmentorController, and niftk::MorphologicalSegmentorController.

void niftk::BaseController::WaitCursorOff ( )
protected

Convenient method to restore the standard cursor.

void niftk::BaseController::WaitCursorOn ( )
protected

Convenient method to set and reset a wait cursor ("hourglass")


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