NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Subclass of QmitkRenderWindow to track to another QmitkRenderWindow and provide a zoomed-out view with an overlay of a bounding box to provide the current size of the currently tracked QmitkRenderWindow's view-port size. ....The client must. More...
Public Member Functions | |
ThumbnailRenderWindow (QWidget *parent, mitk::RenderingManager *renderingManager) | |
Constructs a ThumbnailRenderWindow object. More... | |
~ThumbnailRenderWindow () | |
Destructs the ThumbnailRenderWindow object. More... | |
bool | AreDisplayInteractionsEnabled () const |
Gets the flag that controls whether the display interactions are enabled for the render windows. More... | |
void | SetDisplayInteractionsEnabled (bool enabled) |
Sets the flag that controls whether the display interactions are enabled for the render windows. More... | |
void | Activated () |
Registers listeners. More... | |
void | Deactivated () |
Deregisters listeners. More... | |
int | GetBoundingBoxLineThickness () const |
Sets the bounding box line thickness, default is 1 pixel, but on some displays (eg. various Linux) may appear wider due to anti-aliasing. More... | |
void | SetBoundingBoxLineThickness (int thickness) |
Gets the bounding box line thickness. More... | |
float | GetBoundingBoxOpacity () const |
Gets the bounding box opacity, default is 1. More... | |
void | SetBoundingBoxOpacity (float opacity) |
Sets the bounding box opacity. More... | |
int | GetBoundingBoxLayer () const |
Gets the bounding box layer, default is 99. More... | |
void | SetBoundingBoxLayer (int layer) |
Sets the bounding box layer. More... | |
bool | GetBoundingBoxVisible () const |
Gets the bounding box visibility. More... | |
bool | GetRespondToMouseEvents () const |
Gets whether to resond to mouse events, default is on. More... | |
void | SetRespondToMouseEvents (bool on) |
Sets whether to resond to mouse events. More... | |
bool | GetRespondToWheelEvents () const |
Gets whether to resond to wheel events, default is off. More... | |
void | SetRespondToWheelEvents (bool on) |
Sets whether to resond to wheel events. More... | |
void | NodeAddedProxy (const mitk::DataNode *node) |
Called when a DataStorage Add Event was emmitted and sets m_InDataStorageChanged to true and calls NodeAdded afterwards. More... | |
void | NodeChangedProxy (const mitk::DataNode *node) |
Called when a DataStorage Change Event was emmitted and sets m_InDataStorageChanged to true and calls NodeChanged afterwards. More... | |
mitk::BaseRenderer::Pointer | GetTrackedRenderer () const |
Returns the currently tracked. More... | |
void | SetTrackedRenderer (mitk::BaseRenderer::Pointer rendererToTrack) |
Makes the thumbnail render window track the given renderer. The renderer is supposed to come from the main display (aka. editor). More... | |
Protected Member Functions | |
virtual void | OnNodeAdded (const mitk::DataNode *node) |
Called when a DataStorage Add event was emmitted and may be reimplemented by deriving classes. More... | |
virtual void | OnNodeChanged (const mitk::DataNode *node) |
Called when a DataStorage Change event was emmitted and may be reimplemented by deriving classes. More... | |
Friends | |
class | ThumbnailInteractor |
Subclass of QmitkRenderWindow to track to another QmitkRenderWindow and provide a zoomed-out view with an overlay of a bounding box to provide the current size of the currently tracked QmitkRenderWindow's view-port size. ....
The client must.
1. Create widget 2. Call "Activated" to register with the data storage when the widget is considered active (eg. on screen). 3. Call "Deactivated" to de-register with the data storage when the widget is considered not-active (eg. off screen).
The data storage will be initialised from the rendering manager at the first activation.
This class provides methods to set the bounding box opacity, line thickness, and rendering layer. These values would normally be set via preferences pages in the GUI. The preferences part is done in the ThumbnailView, but this widget could potentially be placed in any layout, as a small preview window of sorts.
This widget also has methods to decide whether we respond to mouse or wheel events. By default the design was to not allow wheel events, as this would cause the slice to change, which should then be propagated back to all other windows, and we don't know which windows are listening, or need updating. However, with regards to left mouse, click and move events, where the user is selecting the focus, then this is automatically passed to the global mitk::FocusManager which propagates to all registered views. So mouse events default to on.
niftk::ThumbnailRenderWindow::ThumbnailRenderWindow | ( | QWidget * | parent, |
mitk::RenderingManager * | renderingManager | ||
) |
Constructs a ThumbnailRenderWindow object.
TODO Very ugly. This should be done in the other way round, from the MIDAS tools.
niftk::ThumbnailRenderWindow::~ThumbnailRenderWindow | ( | ) |
Destructs the ThumbnailRenderWindow object.
void niftk::ThumbnailRenderWindow::Activated | ( | ) |
Registers listeners.
bool niftk::ThumbnailRenderWindow::AreDisplayInteractionsEnabled | ( | ) | const |
Gets the flag that controls whether the display interactions are enabled for the render windows.
void niftk::ThumbnailRenderWindow::Deactivated | ( | ) |
Deregisters listeners.
int niftk::ThumbnailRenderWindow::GetBoundingBoxLayer | ( | ) | const |
Gets the bounding box layer, default is 99.
int niftk::ThumbnailRenderWindow::GetBoundingBoxLineThickness | ( | ) | const |
Sets the bounding box line thickness, default is 1 pixel, but on some displays (eg. various Linux) may appear wider due to anti-aliasing.
float niftk::ThumbnailRenderWindow::GetBoundingBoxOpacity | ( | ) | const |
Gets the bounding box opacity, default is 1.
bool niftk::ThumbnailRenderWindow::GetBoundingBoxVisible | ( | ) | const |
Gets the bounding box visibility.
bool niftk::ThumbnailRenderWindow::GetRespondToMouseEvents | ( | ) | const |
Gets whether to resond to mouse events, default is on.
bool niftk::ThumbnailRenderWindow::GetRespondToWheelEvents | ( | ) | const |
Gets whether to resond to wheel events, default is off.
mitk::BaseRenderer::Pointer niftk::ThumbnailRenderWindow::GetTrackedRenderer | ( | ) | const |
Returns the currently tracked.
void niftk::ThumbnailRenderWindow::NodeAddedProxy | ( | const mitk::DataNode * | node | ) |
Called when a DataStorage Add Event was emmitted and sets m_InDataStorageChanged to true and calls NodeAdded afterwards.
void niftk::ThumbnailRenderWindow::NodeChangedProxy | ( | const mitk::DataNode * | node | ) |
Called when a DataStorage Change Event was emmitted and sets m_InDataStorageChanged to true and calls NodeChanged afterwards.
|
protectedvirtual |
Called when a DataStorage Add event was emmitted and may be reimplemented by deriving classes.
|
protectedvirtual |
Called when a DataStorage Change event was emmitted and may be reimplemented by deriving classes.
Gets the bounding box line thickness.
void niftk::ThumbnailRenderWindow::SetBoundingBoxOpacity | ( | float | opacity | ) |
Sets the bounding box opacity.
void niftk::ThumbnailRenderWindow::SetDisplayInteractionsEnabled | ( | bool | enabled | ) |
Sets the flag that controls whether the display interactions are enabled for the render windows.
void niftk::ThumbnailRenderWindow::SetRespondToMouseEvents | ( | bool | on | ) |
Sets whether to resond to mouse events.
void niftk::ThumbnailRenderWindow::SetRespondToWheelEvents | ( | bool | on | ) |
Sets whether to resond to wheel events.
void niftk::ThumbnailRenderWindow::SetTrackedRenderer | ( | mitk::BaseRenderer::Pointer | rendererToTrack | ) |
Makes the thumbnail render window track the given renderer. The renderer is supposed to come from the main display (aka. editor).
|
friend |