Maintains a list of SingleViewerWidgets and coordinates visibility properties by listening to AddNodeEvent, RemoveNodeEvent and listening directly to Modified events from the nodes "visible" property in DataStorage.
More...
|
| mitkClassMacro (MultiViewerVisibilityManager, DataNodePropertyListener) mitkNewMacro1Param(MultiViewerVisibilityManager |
|
const mitk::DataStorage::Pointer | MultiViewerVisibilityManager (mitk::DataStorage::Pointer dataStorage) |
| This class must (checked with assert) have a non-NULL mitk::DataStorage so it is injected in the constructor, and we register to AddNodeEvent, RemoveNodeEvent. More...
|
|
virtual | ~MultiViewerVisibilityManager () |
| Destructor, which unregisters all the listeners. More...
|
|
| MultiViewerVisibilityManager (const MultiViewerVisibilityManager &) |
|
MultiViewerVisibilityManager & | operator= (const MultiViewerVisibilityManager &) |
|
void | RegisterViewer (SingleViewerWidget *viewer) |
| Each new viewer should first be registered with this class, so this class can manage renderer specific visibility properties. More...
|
|
void | DeregisterViewers (std::vcl_size_t startIndex=0, std::vcl_size_t endIndex=-1) |
| De-registers a range of viewers, which means actually removing them from m_DataNodes and m_Viewers. Start index inclusive, end index exclusive. More...
|
|
void | ClearViewers (std::vcl_size_t startIndex=0, std::vcl_size_t endIndex=-1) |
| Used to clear a range of windows, meaning to set renderer specific visibility properties to false for all the nodes registered in m_DataNodes. Start index inclusive, end index exclusive. More...
|
|
DnDDisplayDropType | GetDropType () const |
| Get the drop type, which controls the behaviour when multiple images are dropped into a single viewer. More...
|
|
void | SetDropType (DnDDisplayDropType dropType) |
| Set the drop type, which controls the behaviour when multiple images are dropped into a single viewer. More...
|
|
DnDDisplayInterpolationType | GetInterpolationType () const |
| Returns the default interpolation type, which takes effect when a new image is dropped. More...
|
|
void | SetInterpolationType (DnDDisplayInterpolationType interpolationType) |
| Sets the default interpolation type, which takes effect when a new image is dropped. More...
|
|
WindowLayout | GetDefaultWindowLayout () const |
| Returns the default render window layout for when images are dropped into a render window. More...
|
|
void | SetDefaultWindowLayout (WindowLayout windowLayout) |
| Sets the default render window layout for when images are dropped into a render window. More...
|
|
bool | GetAutomaticallyAddChildren () const |
| When we drop nodes onto a window, if true, we add all the children. More...
|
|
void | SetAutomaticallyAddChildren (bool autoAdd) |
| When we drop nodes onto a window, if true, we add all the children. More...
|
|
bool | GetAccumulateWhenDropped () const |
| Gets the flag deciding whether we accumulate images each time we drop. More...
|
|
void | SetAccumulateWhenDropping (bool accumulate) |
| Sets the flag deciding whether we prefer to accumulate images each time they are dropped. More...
|
|
void | OnFocusChanged () |
| Called when one of the viewers receives the focus. More...
|
|
| mitkClassMacro (DataNodePropertyListener, DataStorageListener) mitkNewMacro2Param(DataNodePropertyListener |
|
const const std::string & | mitkNewMacro3Param (DataNodePropertyListener, const mitk::DataStorage::Pointer, const std::string &, bool) mitkNewMacro3Param(DataNodePropertyListener |
|
const const std::string const
const std::string int | mitkNewMacro3Param (DataNodePropertyListener, const mitk::DataStorage::Pointer, const std::string &, float) mitkNewMacro3Param(DataNodePropertyListener |
|
const const std::string const
const std::string int const
const std::string const
std::string &void | SetRenderers (const std::vector< const mitk::BaseRenderer * > &renderers) |
| Sets the list of renderers to check. More...
|
|
| mitkClassMacroItkParent (DataStorageListener, itk::LightObject) mitkNewMacro1Param(DataStorageListener |
|
const
mitk::DataStorage::Pointer
mitk::DataStorage::Pointer | GetDataStorage () const |
| Gets the data storage. More...
|
|
void | AddFilter (DataNodeFilter::Pointer filter) |
| Adds a filter. More...
|
|
void | ClearFilters () |
| Clears all filters. More...
|
|
bool | IsBlocked () const |
| Tells if the listener is blocked, i.e. the processing of signals is suppressed. More...
|
|
bool | SetBlocked (bool blocked) |
| Blocks the processing of signals. This can be used to avoid eventual infinite recursion. Returns true if the listener was already blocked, otherwise false. More...
|
|
|
virtual void | OnNodeAdded (mitk::DataNode *node) override |
| Called when a node is added, and we set rendering window specific visibility to false for all registered windows, plus other default properties such as interpolation type. More...
|
|
virtual void | OnNodeRemoved (mitk::DataNode *node) override |
| Called when a node is added, and we set rendering window specific visibility. More...
|
|
virtual void | OnPropertyChanged (mitk::DataNode *node, const mitk::BaseRenderer *renderer) override |
| Called when the property value has changed globally or for the given renderer. If the global property has changed, renderer is NULL. More...
|
|
virtual void | AddNodeToViewer (int windowIndex, mitk::DataNode *node, bool visibility=true) |
| For a given window, effectively sets the rendering window specific visibility property for the given node to initialVisibility. More...
|
|
virtual void | RemoveNodesFromViewer (int windowIndex) |
| For a given window (denoted by its windowIndex, or index number in m_Viewers), effectively sets the rendering window specific visibility property of all nodes registered with that window to false. More...
|
|
| DataNodePropertyListener (const mitk::DataStorage::Pointer dataStorage, const std::string &propertyName) |
|
| DataNodePropertyListener (const mitk::DataStorage::Pointer dataStorage, const std::string &propertyName, bool defaultValue) |
|
| DataNodePropertyListener (const mitk::DataStorage::Pointer dataStorage, const std::string &propertyName, int defaultValue) |
|
| DataNodePropertyListener (const mitk::DataStorage::Pointer dataStorage, const std::string &propertyName, float defaultValue) |
|
| DataNodePropertyListener (const mitk::DataStorage::Pointer dataStorage, const std::string &propertyName, const std::string &defaultValue) |
|
virtual | ~DataNodePropertyListener () |
|
| DataNodePropertyListener (const DataNodePropertyListener &) |
|
DataNodePropertyListener & | operator= (const DataNodePropertyListener &) |
|
virtual void | OnNodeDeleted (mitk::DataNode *node) override |
| Called when a node is deleted. Notifies the observers for the node then removes them. More...
|
|
| DataStorageListener (const mitk::DataStorage::Pointer) |
|
virtual | ~DataStorageListener () |
|
| DataStorageListener (const DataStorageListener &) |
|
DataStorageListener & | operator= (const DataStorageListener &) |
|
virtual void | OnNodeChanged (mitk::DataNode *node) |
| Called when the given node has been changed. Empty implementation, subclasses can redefine it. More...
|
|
bool | Pass (const mitk::DataNode *node) const |
| Checks the node against the list of filters. More...
|
|
Maintains a list of SingleViewerWidgets and coordinates visibility properties by listening to AddNodeEvent, RemoveNodeEvent and listening directly to Modified events from the nodes "visible" property in DataStorage.
The strategy is the following:
If a new data node is added to the data storage, a renderer specific visibility property is created for the render windows of each registered viewer. The initial visibility is false. At the same time, an observer is registered to listen to the change of the global visibility of the node. When the global visibility of a node changes, its visibility specific to the renderer of th selected window is turned to the same as the global visibility. Similarly in the other around, when the selected window changes, the global visibility of the data nodes is set to the same as the visibility specific to the selected window.
Note: Since this class will change the global visibility, it cannot be used together with the MITK display that does not maintain renderer specific visibilities to its render windows.