Helper class to allow QmitkAbstractView and derived classes to react on changes of the slice/time navigation. Purpose of the class to be used in view and to give the respective view class (by composition) the possibility to react on changes of the currently selected timepoint or position in the world geometry.
It also offers convenient signals that are only triggered when the selected timepoint or the selected position of the active render window have really changed.
In order to setup this class properly the following things must be regarded:
More...
#include <QmitkSliceNavigationListener.h>
Helper class to allow QmitkAbstractView and derived classes to react on changes of the slice/time navigation. Purpose of the class to be used in view and to give the respective view class (by composition) the possibility to react on changes of the currently selected timepoint or position in the world geometry.
It also offers convenient signals that are only triggered when the selected timepoint or the selected position of the active render window have really changed.
In order to setup this class properly the following things must be regarded:
- View class must also derive public from mitk::IRenderWindowPartListener
View class must implement void RenderWindowPartActivated(mitk::IRenderWindowPart* renderWindowPart) and pass the renderWindowPart to the listener.
void QmitkMyView::RenderWindowPartActivated(mitk::IRenderWindowPart* renderWindowPart) { this->m_SliceNavigationListener.RenderWindowPartActivated(renderWindowPart); }
View class must implement void RenderWindowPartDeactivated(mitk::IRenderWindowPart* renderWindowPart) and pass the renderWindowPart to the listener.
void QmitkMyView::RenderWindowPartDeactivated(mitk::IRenderWindowPart* renderWindowPart) { this->m_SliceNavigationListener.RenderWindowPartDeactivated(renderWindowPart); }
View class must pass its on render window part in its CreateQtPartControl(QWidget* parent)
this->m_SliceNavigationListener.RenderWindowPartActivated(this->GetRenderWindowPart());
- View class must connect the SliceChanged signal of the listener as see fit.
Definition at line 65 of file QmitkSliceNavigationListener.h.
◆ ObserverMapType
◆ QmitkSliceNavigationListener()
QmitkSliceNavigationListener::QmitkSliceNavigationListener |
( |
| ) |
|
◆ ~QmitkSliceNavigationListener()
QmitkSliceNavigationListener::~QmitkSliceNavigationListener |
( |
| ) |
|
|
override |
◆ GetCurrentSelectedPosition()
mitk::Point3D QmitkSliceNavigationListener::GetCurrentSelectedPosition |
( |
| ) |
const |
◆ GetCurrentSelectedTimePoint()
◆ InitObservers()
bool QmitkSliceNavigationListener::InitObservers |
( |
| ) |
|
|
protected |
Initializes and sets the observers that are used to monitor changes in the selected position or time point in order to actualize the view.h
◆ ObserversInitialized()
◆ OnSliceChangedDelayed
void QmitkSliceNavigationListener::OnSliceChangedDelayed |
( |
| ) |
|
|
protectedslot |
Overwrite function to implement the behavior on slice/time changes.
◆ OnSliceChangedInternal()
void QmitkSliceNavigationListener::OnSliceChangedInternal |
( |
const itk::EventObject & |
e | ) |
|
|
protected |
Calls OnSliceChangedDelayed so the event isn't triggered multiple times.
◆ OnSliceNavigationControllerDeleted()
void QmitkSliceNavigationListener::OnSliceNavigationControllerDeleted |
( |
const itk::Object * |
sender, |
|
|
const itk::EventObject & |
|
|
) |
| |
|
protected |
◆ OnTimeChangedInternal()
void QmitkSliceNavigationListener::OnTimeChangedInternal |
( |
itk::Object * |
sender, |
|
|
const itk::EventObject & |
e |
|
) |
| |
|
protected |
◆ RemoveAllObservers()
Removes all observers of the deletedPart. If null pointer is passed all observers will be removed.
◆ RemoveObservers()
◆ RenderWindowPartActivated
◆ RenderWindowPartDeactivated
◆ RenderWindowPartInputChanged
◆ SelectedPositionChanged
void QmitkSliceNavigationListener::SelectedPositionChanged |
( |
const mitk::Point3D & |
newPoint | ) |
|
|
signal |
Convenience signal that can be used if you are only interested in changes of the current selected position. Changes in time will be ignored.
◆ SelectedTimePointChanged
void QmitkSliceNavigationListener::SelectedTimePointChanged |
( |
const mitk::TimePointType & |
newTimePoint | ) |
|
|
signal |
Convenience signal that can be used if you are only interested in changes of the current selected time point. Changes in spatial position will be ignored.
◆ SliceChanged
void QmitkSliceNavigationListener::SliceChanged |
( |
| ) |
|
|
signal |
Signal triggered as soon as there is any change. It may be a change in the position/slice or of the selected timepoint.
◆ m_ControllerToTimeObserverTag
unsigned int QmitkSliceNavigationListener::m_ControllerToTimeObserverTag |
|
protected |
◆ m_CurrentSelectedPosition
mitk::Point3D QmitkSliceNavigationListener::m_CurrentSelectedPosition |
|
protected |
◆ m_CurrentSelectedTimePoint
◆ m_ObserverMap
◆ m_PendingSliceChangedEvent
bool QmitkSliceNavigationListener::m_PendingSliceChangedEvent |
|
protected |
◆ m_renderWindowPart
The documentation for this class was generated from the following file: