15 #ifndef niftkMultiViewerVisibilityManager_h
16 #define niftkMultiViewerVisibilityManager_h
18 #include <niftkDnDDisplayExports.h>
24 #include <mitkDataStorage.h>
25 #include <mitkProperties.h>
35 class SingleViewerWidget;
84 void DeregisterViewers(std::size_t startIndex = 0, std::size_t endIndex = -1);
88 void ClearViewers(std::size_t startIndex = 0, std::size_t endIndex = -1);
121 void OnFocusChanged();
126 void OnNodesDropped(std::vector<mitk::DataNode*> nodes);
132 virtual void OnNodeAdded(mitk::DataNode* node)
override;
135 virtual void OnNodeRemoved(mitk::DataNode* node)
override;
139 virtual void OnPropertyChanged(mitk::DataNode* node,
const mitk::BaseRenderer* renderer)
override;
142 virtual void AddNodeToViewer(
int windowIndex, mitk::DataNode* node,
bool visibility=
true);
145 virtual void RemoveNodesFromViewer(
int windowIndex);
151 void UpdateGlobalVisibilities(mitk::BaseRenderer* renderer);
154 virtual int GetNodesInViewer(
int windowIndex);
160 template<
typename TPixel,
unsigned int VImageDimension>
171 mitk::TimeGeometry::Pointer GetTimeGeometry(std::vector<mitk::DataNode*> nodes,
int nodeIndex);
175 std::vector< std::set<mitk::DataNode*> > m_DataNodesPerViewer;
178 std::vector< SingleViewerWidget* > m_Viewers;
191 bool m_AutomaticallyAddChildren;
196 unsigned long m_FocusManagerObserverTag;
DnDDisplayInterpolationType GetInterpolationType() const
Returns the default interpolation type, which takes effect when a new image is dropped.
Definition: niftkMultiViewerVisibilityManager.h:97
WindowOrientation
Describes the different types of orientation, axial, sagittal, coronal, that can be achieved in the D...
Definition: niftkDnDDisplayEnums.h:29
DnDDisplayDropType
Describes the different modes that can be used when drag and dropping into the DnD Display window...
Definition: niftkDnDDisplayEnums.h:163
Definition: niftkDataNodePropertyListener.h:45
void SetDefaultWindowLayout(WindowLayout windowLayout)
Sets the default render window layout for when images are dropped into a render window.
Definition: niftkMultiViewerVisibilityManager.h:106
WindowLayout GetDefaultWindowLayout() const
Returns the default render window layout for when images are dropped into a render window...
Definition: niftkMultiViewerVisibilityManager.h:103
bool GetAccumulateWhenDropped() const
Gets the flag deciding whether we accumulate images each time we drop.
Definition: niftkMultiViewerVisibilityManager.h:115
WindowLayout
Describes the different render window layouts. So one WindowLayout could have multiple windows of dif...
Definition: niftkDnDDisplayEnums.h:49
void SetInterpolationType(DnDDisplayInterpolationType interpolationType)
Sets the default interpolation type, which takes effect when a new image is dropped.
Definition: niftkMultiViewerVisibilityManager.h:100
void SetDropType(DnDDisplayDropType dropType)
Set the drop type, which controls the behaviour when multiple images are dropped into a single viewer...
Definition: niftkMultiViewerVisibilityManager.h:94
DnDDisplayDropType GetDropType() const
Get the drop type, which controls the behaviour when multiple images are dropped into a single viewer...
Definition: niftkMultiViewerVisibilityManager.h:91
DnDDisplayInterpolationType
Describes what the interpolation type should be set to when an image is dropped.
Definition: niftkDnDDisplayEnums.h:174
void SetAccumulateWhenDropping(bool accumulate)
Sets the flag deciding whether we prefer to accumulate images each time they are dropped.
Definition: niftkMultiViewerVisibilityManager.h:118
bool GetAutomaticallyAddChildren() const
When we drop nodes onto a window, if true, we add all the children.
Definition: niftkMultiViewerVisibilityManager.h:109
WindowLayout GetWindowLayout(const std::string &windowLayoutName)
Definition: niftkDnDDisplayEnums.h:94
Maintains a list of SingleViewerWidgets and coordinates visibility properties by listening to AddNode...
Definition: niftkMultiViewerVisibilityManager.h:61
Definition: niftkExceptionObject.h:21
void SetAutomaticallyAddChildren(bool autoAdd)
When we drop nodes onto a window, if true, we add all the children.
Definition: niftkMultiViewerVisibilityManager.h:112
ImageOrientation GetAsAcquiredOrientation(ImageOrientation defaultOrientation, const mitk::Image *image)
Returns the ImageOrientation corresponding to the XY plane, or else returns the supplied default...
Definition: niftkImageUtils.cxx:80