NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Provides up to 5 x 5 image viewing panes, arranged as rows and columns. More...
Public Types | |
enum | ViewerBindingOption { PositionBinding = 1, CursorBinding = 2, MagnificationBinding = 4, WindowLayoutBinding = 8, GeometryBinding = 16 } |
Signals | |
void | BindingOptionsChanged (int bindingOptions) |
Public Member Functions | |
MultiViewerWidget (MultiViewerVisibilityManager *visibilityManager, mitk::RenderingManager *renderingManager, QWidget *parent=0, Qt::WindowFlags f=0) | |
Constructor which builds up the controls and layout, and sets the selected viewer to the first (0th), the default drop type to DNDDISPLAY_DROP_SINGLE, and sets the number of rows and columns to those specified in the constructor parameter list. More... | |
virtual | ~MultiViewerWidget () |
Destructor, where we assume that all Qt widgets will be destroyed automatically. Note that we don't create or own the MultiViewerVisibilityManager. More... | |
void | RequestUpdateAll () |
As each SingleViewerWidget may have its own rendering manager, we may have to manually ask each viewer to re-render. More... | |
void | SetViewerNumber (int viewerRows, int viewerColumns) |
Sets the number of viewers. More... | |
SingleViewerWidget * | GetViewer (int row, int column) const |
Gets the viewer in the given row and column. Indexing starts from 0. More... | |
int | GetBindingOptions () const |
Gets the viewer binding options. More... | |
void | SetBindingOptions (int bindingOptions) |
Sets the viewer binding options. More... | |
void | SetBackgroundColour (QColor backgroundColour) |
Set the background colour on all contained viewers, and we don't currently provide gradient backgrounds. More... | |
void | SetInterpolationType (DnDDisplayInterpolationType interpolationType) |
Sets the default interpolation type, which only takes effect when a node is next dropped into a given window. More... | |
void | SetDefaultWindowLayout (WindowLayout windowLayout) |
Sets the default window layout (axial, coronal etc.), which only takes effect when a node is next dropped into a given window. More... | |
void | SetDefaultSingleWindowLayout (WindowLayout windowLayout) |
Sets the default single window layout (axial, coronal etc.), which only takes effect when a node is next dropped into a given window. More... | |
void | SetDefaultMultiWindowLayout (WindowLayout layout) |
Sets the default multiple window layout (2x2, 3H, 3V etc.), which only takes effect when a node is next dropped into a given window. More... | |
void | SetDropType (DnDDisplayDropType dropType) |
Sets the default drop type checkbox. More... | |
void | SetShowDropTypeControls (bool visible) |
Sets the visibility flag on the drop type checkboxes. More... | |
bool | AreShowOptionsVisible () const |
Gets the visibility flag of the show option controls on the control panel. More... | |
void | SetShowOptionsVisible (bool visible) |
Sets the visibility flag of the show option controls on the control panel. More... | |
bool | AreWindowLayoutControlsVisible () const |
Gets the visibility flag of the window layout controls on the control panel. More... | |
void | SetWindowLayoutControlsVisible (bool visible) |
Sets the visibility flag of the window layout controls on the control panel. More... | |
bool | AreViewerNumberControlsVisible () const |
Gets the visibility flag of the multi viewer controls on the control panel. More... | |
void | SetViewerNumberControlsVisible (bool visible) |
Sets the visibility flag of the multi viewer controls on the control panel. More... | |
void | SetShowMagnificationSlider (bool visible) |
Sets the visibility flag controlling the Magnification Slider. More... | |
bool | IsCursorVisible () const |
Returns the flag indicating whether we show 2D cursors. More... | |
void | SetCursorVisible (bool visibile) |
Sets the flag controlling the visibility of 2D cursors. More... | |
bool | GetCursorDefaultVisibility () const |
Gets the default visibility of the 2D cursors that is applied for new viewers if the cursor is not bound across the viewers. More... | |
void | SetCursorDefaultVisibility (bool visibile) |
Sets the default visibility of the 2D cursors that is applied for new viewers if the cursor is not bound across the viewers. More... | |
bool | AreDirectionAnnotationsVisible () const |
Tells if the direction annotations are visible. More... | |
void | SetDirectionAnnotationsVisible (bool visible) |
Sets the visibility of the direction annotations. More... | |
bool | IsIntensityAnnotationVisible () const |
Tells if the intensity annotation is visible. More... | |
void | SetIntensityAnnotationVisible (bool visible) |
Sets the visibility of the intensity annotation. More... | |
bool | GetShow3DWindowIn2x2WindowLayout () const |
Gets the flag controlling whether to see the 3D window in orthogonal (2x2) window layout. More... | |
void | SetShow3DWindowIn2x2WindowLayout (bool enabled) |
Sets the flag controlling whether to see the 3D window in orthogonal (2x2) window layout. More... | |
void | SetRememberSettingsPerWindowLayout (bool rememberSettingsPerWindowLayout) |
Sets a flag to determine if we remember viewer positions (slice, timestep, magnification) when we switch the window layout. More... | |
void | SetSliceTracking (bool tracking) |
Sets the slice slider to be tracking. More... | |
void | SetTimeStepTracking (bool tracking) |
Sets the time step slider to be tracking. More... | |
void | SetMagnificationTracking (bool tracking) |
Sets the magnification slider to be tracking. More... | |
void | SetTimeStep (int timeStep) |
Most likely called from the MultiViewerEditor to request that the currently selected window changes time step. More... | |
void | SetSelectedWindowTo3D () |
Most likely called from the MultiViewerEditor to request that the currently selected window switches 3D. More... | |
virtual bool | ToggleCursorVisibility () |
Shows or hides the cursor. More... | |
bool | GetThumbnailMode () const |
Gets the flag indicating whether this viewer is currently in thumnail mode. More... | |
void | SetThumbnailMode (bool thumbnailMode) |
Sets this viewer to Thumbnail Mode, which means a grid of 5 x 5 viewers, and controls disabled. More... | |
WindowOrientation | GetOrientation () const |
Returns the orientation from the window layout, or WINDOW_ORIENTATION_UNKNOWN if not known (i.e. if 3D window layout is selected). More... | |
SingleViewerWidget * | GetSelectedViewer () const |
Will return the selected viewer or the first viewer if none is selected. More... | |
virtual QmitkRenderWindow * | GetSelectedRenderWindow () const |
virtual QHash< QString, QmitkRenderWindow * > | GetRenderWindows () const |
virtual QmitkRenderWindow * | GetRenderWindow (const QString &id) const |
mitk::Point3D | GetSelectedPosition (const QString &id=QString()) const |
Gets the selected position in world coordinates (mm) in the render window with the given id or in the currently selected render window if no id is given. More... | |
virtual void | SetSelectedPosition (const mitk::Point3D &pos, const QString &id=QString()) |
Sets the selected position in world coordinates (mm) in the render window with the given id or in the currently selected render window if no id is given. More... | |
virtual bool | IsLinkedNavigationEnabled () const |
virtual void | EnableLinkedNavigation (bool enabled) |
bool | IsFocused () |
Tells if the selected viewer is focused. More... | |
void | SetFocused () |
Sets the focus to the selected viewer. More... | |
virtual bool | eventFilter (QObject *object, QEvent *event) |
Shows the control panel if the mouse pointer is moved over the pin button. More... | |
Protected Slots | |
void | OnSelectedSliceControlChanged (int selectedSlice) |
Called when the selected slice has been changed through the control panel. More... | |
void | OnTimeStepControlChanged (int timeStep) |
Called when the time step has been changed through the control panel. More... | |
void | OnMagnificationControlChanged (double magnification) |
Called when the magnification has been changed through the control panel. More... | |
void | OnCursorVisibilityControlChanged (bool visible) |
Called when the show cursor option has been changed through the control panel. More... | |
void | OnShowDirectionAnnotationsControlsChanged (bool visible) |
Called when the show direction annotations option has been changed through the control panel. More... | |
void | OnShowIntensityAnnotationControlsChanged (bool visible) |
Called when the show intensity annotation option has been changed through the control panel. More... | |
void | OnShow3DWindowControlChanged (bool visible) |
Called when the show 3D window option has been changed through the control panel. More... | |
void | OnWindowLayoutControlChanged (WindowLayout windowLayout) |
Called when the window layout has been changed through the control panel. More... | |
void | OnWindowCursorBindingControlChanged (bool) |
Called when the binding of cursors in the render windows of a viewer has been changed through the control panel. More... | |
void | OnWindowMagnificationBindingControlChanged (bool) |
Called when the binding of magnifications in the render windows of a viewer has been changed through the control panel. More... | |
void | OnViewerNumberControlChanged (int rows, int columns) |
Called when the number of viewers has been changed through the control panel. More... | |
void | OnViewerPositionBindingControlChanged (bool bound) |
Called when the viewer position binding has been changed through the control panel. More... | |
void | OnViewerCursorBindingControlChanged (bool bound) |
Called when the viewer cursor binding has been changed through the control panel. More... | |
void | OnViewerWindowLayoutBindingControlChanged (bool bound) |
Called when the window layout binding across the viewers has been changed through the control panel. More... | |
void | OnViewerMagnificationBindingControlChanged (bool bound) |
Called when the viewer magnification binding has been changed through the control panel. More... | |
void | OnViewerGeometryBindingControlChanged (bool bound) |
Called when the viewer geometry binding has been changed through the control panel. More... | |
void | OnDropTypeControlChanged (DnDDisplayDropType dropType) |
Called when the drop type has been changed through the control panel. More... | |
void | OnDropAccumulateControlChanged (bool checked) |
Called when the drop accumulation has been changed through the control panel. More... | |
void | OnFocusChanged () |
Called when one of the viewers receives the focus. More... | |
void | OnSelectedPositionChanged (const mitk::Point3D &selectedPosition) |
Called when the selected position has changed in a render window of a viewer. Each of the contained viewers will signal when its slice navigation controllers have changed. More... | |
void | OnTimeStepChanged (int timeStep) |
Called when the selected time step has changed in a viewer. Each of the contained viewers will signal when its slice navigation controllers have changed. More... | |
void | OnCursorPositionChanged (WindowOrientation orientation, const mitk::Vector2D &cursorPosition) |
Called when the cursor position has changed in a render window because of panning or point selection. More... | |
void | OnScaleFactorChanged (WindowOrientation orientation, double scaleFactor) |
Called when the scale factor of a viewer has changed by zooming in one of its render windows. More... | |
void | OnWindowLayoutChanged (WindowLayout windowLayout) |
Called when the window layout of a viewer has changed. More... | |
void | OnTimeGeometryChanged (const mitk::TimeGeometry *timeGeometry) |
Called when the geometry of a viewer has changed. More... | |
void | OnCursorPositionBindingChanged (bool bound) |
Called when the cursor position binding has changed in a viewer. More... | |
void | OnScaleFactorBindingChanged (bool bound) |
Called when the scale factor binding has changed in a viewer. More... | |
void | OnCursorVisibilityChanged (bool visible) |
Called when the show cursor option has been changed in a viewer. More... | |
void | OnDirectionAnnotationsVisibilityChanged (bool visible) |
Called when the show direction annotations option has been changed in a viewer. More... | |
void | OnIntensityAnnotationVisibilityChanged (bool visible) |
Called when the show intensity annotation option has been changed in a viewer. More... | |
void | OnPopupOpened (bool opened) |
Called when the popup widget opens/closes, and used to re-render the viewers. More... | |
void | OnPinButtonToggled (bool checked) |
Called when the pin button is toggled. More... | |
Provides up to 5 x 5 image viewing panes, arranged as rows and columns.
This is a large, composite widget, containing a central area that can be used to view images, several controls located at the top of the widget and all the necessary plumbing to make it work. This widget is used as the main editor widget of the MultiViewerEditor.
The standard viewer layout is up to 5x5 (but normally, 1x1, 1x2, 1x3 or 2x2) image panes, each showing a single 2D image slice. This class contains m_MaxRows x m_MaxCols SingleViewerWidget each of which itself wraps a MultiWindowWidget which derives from QmitkStdMultiWidget, meaning that we can actually have up to m_MaxRows x m_MaxCols ortho viewers, including the option for 3D render window.
niftk::MultiViewerWidget::MultiViewerWidget | ( | MultiViewerVisibilityManager * | visibilityManager, |
mitk::RenderingManager * | renderingManager, | ||
QWidget * | parent = 0 , |
||
Qt::WindowFlags | f = 0 |
||
) |
Constructor which builds up the controls and layout, and sets the selected viewer to the first (0th), the default drop type to DNDDISPLAY_DROP_SINGLE, and sets the number of rows and columns to those specified in the constructor parameter list.
|
virtual |
Destructor, where we assume that all Qt widgets will be destroyed automatically. Note that we don't create or own the MultiViewerVisibilityManager.
bool niftk::MultiViewerWidget::AreDirectionAnnotationsVisible | ( | ) | const |
Tells if the direction annotations are visible.
bool niftk::MultiViewerWidget::AreShowOptionsVisible | ( | ) | const |
Gets the visibility flag of the show option controls on the control panel.
bool niftk::MultiViewerWidget::AreViewerNumberControlsVisible | ( | ) | const |
Gets the visibility flag of the multi viewer controls on the control panel.
bool niftk::MultiViewerWidget::AreWindowLayoutControlsVisible | ( | ) | const |
Gets the visibility flag of the window layout controls on the control panel.
|
virtual |
|
virtual |
Shows the control panel if the mouse pointer is moved over the pin button.
int niftk::MultiViewerWidget::GetBindingOptions | ( | ) | const |
Gets the viewer binding options.
bool niftk::MultiViewerWidget::GetCursorDefaultVisibility | ( | ) | const |
Gets the default visibility of the 2D cursors that is applied for new viewers if the cursor is not bound across the viewers.
WindowOrientation niftk::MultiViewerWidget::GetOrientation | ( | ) | const |
Returns the orientation from the window layout, or WINDOW_ORIENTATION_UNKNOWN if not known (i.e. if 3D window layout is selected).
|
virtual |
|
virtual |
mitk::Point3D niftk::MultiViewerWidget::GetSelectedPosition | ( | const QString & | id = QString() | ) | const |
Gets the selected position in world coordinates (mm) in the render window with the given id or in the currently selected render window if no id is given.
|
virtual |
SingleViewerWidget * niftk::MultiViewerWidget::GetSelectedViewer | ( | ) | const |
Will return the selected viewer or the first viewer if none is selected.
bool niftk::MultiViewerWidget::GetShow3DWindowIn2x2WindowLayout | ( | ) | const |
Gets the flag controlling whether to see the 3D window in orthogonal (2x2) window layout.
bool niftk::MultiViewerWidget::GetThumbnailMode | ( | ) | const |
Gets the flag indicating whether this viewer is currently in thumnail mode.
SingleViewerWidget * niftk::MultiViewerWidget::GetViewer | ( | int | row, |
int | column | ||
) | const |
Gets the viewer in the given row and column. Indexing starts from 0.
bool niftk::MultiViewerWidget::IsCursorVisible | ( | ) | const |
Returns the flag indicating whether we show 2D cursors.
bool niftk::MultiViewerWidget::IsFocused | ( | ) |
Tells if the selected viewer is focused.
bool niftk::MultiViewerWidget::IsIntensityAnnotationVisible | ( | ) | const |
Tells if the intensity annotation is visible.
|
virtual |
|
protectedslot |
Called when the cursor position binding has changed in a viewer.
|
protectedslot |
Called when the cursor position has changed in a render window because of panning or point selection.
|
protectedslot |
Called when the show cursor option has been changed in a viewer.
Note: this slot is also directly invoked from this class. In this case sender() returns 0.
|
protectedslot |
Called when the show cursor option has been changed through the control panel.
|
protectedslot |
Called when the show direction annotations option has been changed in a viewer.
Note: this slot is also directly invoked from this class. In this case sender() returns 0.
|
protectedslot |
Called when the drop accumulation has been changed through the control panel.
|
protectedslot |
Called when the drop type has been changed through the control panel.
|
protectedslot |
Called when one of the viewers receives the focus.
|
protectedslot |
Called when the show intensity annotation option has been changed in a viewer.
Note: this slot is also directly invoked from this class. In this case sender() returns 0.
|
protectedslot |
Called when the magnification has been changed through the control panel.
|
protectedslot |
Called when the pin button is toggled.
|
protectedslot |
Called when the popup widget opens/closes, and used to re-render the viewers.
|
protectedslot |
Called when the scale factor binding has changed in a viewer.
|
protectedslot |
Called when the scale factor of a viewer has changed by zooming in one of its render windows.
|
protectedslot |
Called when the selected position has changed in a render window of a viewer. Each of the contained viewers will signal when its slice navigation controllers have changed.
Called when the selected slice has been changed through the control panel.
|
protectedslot |
Called when the show 3D window option has been changed through the control panel.
|
protectedslot |
Called when the show direction annotations option has been changed through the control panel.
|
protectedslot |
Called when the show intensity annotation option has been changed through the control panel.
|
protectedslot |
Called when the geometry of a viewer has changed.
TODO disable slice controls as well
Called when the selected time step has changed in a viewer. Each of the contained viewers will signal when its slice navigation controllers have changed.
Called when the time step has been changed through the control panel.
|
protectedslot |
Called when the viewer cursor binding has been changed through the control panel.
|
protectedslot |
Called when the viewer geometry binding has been changed through the control panel.
|
protectedslot |
Called when the viewer magnification binding has been changed through the control panel.
Called when the number of viewers has been changed through the control panel.
|
protectedslot |
Called when the viewer position binding has been changed through the control panel.
|
protectedslot |
Called when the window layout binding across the viewers has been changed through the control panel.
|
protectedslot |
Called when the binding of cursors in the render windows of a viewer has been changed through the control panel.
If the cursor positions are bound across the viewers then the binding property across the windows of the viewers can be controlled just together. That is, it is either set for each or none of them.
|
protectedslot |
Called when the window layout of a viewer has changed.
|
protectedslot |
Called when the window layout has been changed through the control panel.
|
protectedslot |
Called when the binding of magnifications in the render windows of a viewer has been changed through the control panel.
If the scale factors are bound across the viewers then the binding property across the windows of the viewers can be controlled just together. That is, it is either set for each or none of them.
void niftk::MultiViewerWidget::RequestUpdateAll | ( | ) |
As each SingleViewerWidget may have its own rendering manager, we may have to manually ask each viewer to re-render.
void niftk::MultiViewerWidget::SetBackgroundColour | ( | QColor | backgroundColour | ) |
Set the background colour on all contained viewers, and we don't currently provide gradient backgrounds.
Sets the viewer binding options.
void niftk::MultiViewerWidget::SetCursorDefaultVisibility | ( | bool | visibile | ) |
Sets the default visibility of the 2D cursors that is applied for new viewers if the cursor is not bound across the viewers.
void niftk::MultiViewerWidget::SetCursorVisible | ( | bool | visibile | ) |
Sets the flag controlling the visibility of 2D cursors.
void niftk::MultiViewerWidget::SetDefaultMultiWindowLayout | ( | WindowLayout | layout | ) |
Sets the default multiple window layout (2x2, 3H, 3V etc.), which only takes effect when a node is next dropped into a given window.
void niftk::MultiViewerWidget::SetDefaultSingleWindowLayout | ( | WindowLayout | windowLayout | ) |
Sets the default single window layout (axial, coronal etc.), which only takes effect when a node is next dropped into a given window.
void niftk::MultiViewerWidget::SetDefaultWindowLayout | ( | WindowLayout | windowLayout | ) |
Sets the default window layout (axial, coronal etc.), which only takes effect when a node is next dropped into a given window.
void niftk::MultiViewerWidget::SetDirectionAnnotationsVisible | ( | bool | visible | ) |
Sets the visibility of the direction annotations.
void niftk::MultiViewerWidget::SetDropType | ( | DnDDisplayDropType | dropType | ) |
Sets the default drop type checkbox.
void niftk::MultiViewerWidget::SetFocused | ( | ) |
Sets the focus to the selected viewer.
void niftk::MultiViewerWidget::SetIntensityAnnotationVisible | ( | bool | visible | ) |
Sets the visibility of the intensity annotation.
void niftk::MultiViewerWidget::SetInterpolationType | ( | DnDDisplayInterpolationType | interpolationType | ) |
Sets the default interpolation type, which only takes effect when a node is next dropped into a given window.
void niftk::MultiViewerWidget::SetMagnificationTracking | ( | bool | tracking | ) |
Sets the magnification slider to be tracking.
void niftk::MultiViewerWidget::SetRememberSettingsPerWindowLayout | ( | bool | rememberSettingsPerWindowLayout | ) |
Sets a flag to determine if we remember viewer positions (slice, timestep, magnification) when we switch the window layout.
|
virtual |
Sets the selected position in world coordinates (mm) in the render window with the given id or in the currently selected render window if no id is given.
void niftk::MultiViewerWidget::SetSelectedWindowTo3D | ( | ) |
Most likely called from the MultiViewerEditor to request that the currently selected window switches 3D.
void niftk::MultiViewerWidget::SetShow3DWindowIn2x2WindowLayout | ( | bool | enabled | ) |
Sets the flag controlling whether to see the 3D window in orthogonal (2x2) window layout.
void niftk::MultiViewerWidget::SetShowDropTypeControls | ( | bool | visible | ) |
Sets the visibility flag on the drop type checkboxes.
void niftk::MultiViewerWidget::SetShowMagnificationSlider | ( | bool | visible | ) |
Sets the visibility flag controlling the Magnification Slider.
void niftk::MultiViewerWidget::SetShowOptionsVisible | ( | bool | visible | ) |
Sets the visibility flag of the show option controls on the control panel.
void niftk::MultiViewerWidget::SetSliceTracking | ( | bool | tracking | ) |
Sets the slice slider to be tracking.
void niftk::MultiViewerWidget::SetThumbnailMode | ( | bool | thumbnailMode | ) |
Sets this viewer to Thumbnail Mode, which means a grid of 5 x 5 viewers, and controls disabled.
Most likely called from the MultiViewerEditor to request that the currently selected window changes time step.
void niftk::MultiViewerWidget::SetTimeStepTracking | ( | bool | tracking | ) |
Sets the time step slider to be tracking.
Sets the number of viewers.
void niftk::MultiViewerWidget::SetViewerNumberControlsVisible | ( | bool | visible | ) |
Sets the visibility flag of the multi viewer controls on the control panel.
void niftk::MultiViewerWidget::SetWindowLayoutControlsVisible | ( | bool | visible | ) |
Sets the visibility flag of the window layout controls on the control panel.
|
virtual |
Shows or hides the cursor.