13 #ifndef mitkLevelWindowManager_h
14 #define mitkLevelWindowManager_h
56 itkFactorylessNewMacro(
Self);
69 void SetAutoTopMostImage(
bool autoTopMost,
const DataNode *removedNode =
nullptr);
77 void SetSelectedImages(
bool selectedImagesMode,
const DataNode *removedNode =
nullptr);
79 void RecalculateLevelWindowForSelectedComponent(
const itk::EventObject&);
85 void Update(
const itk::EventObject&);
93 void UpdateSelected(
const itk::EventObject&);
103 void SetLevelWindow(
const LevelWindow &levelWindow);
121 bool IsAutoTopMost()
const;
127 bool IsSelectedImages()
const;
134 void DataStorageAddedNode(
const DataNode *dataNode =
nullptr);
141 void DataStorageRemovedNode(
const DataNode *dataNode =
nullptr);
145 void OnPropertyModified(
const itk::EventObject&);
151 Image *GetCurrentImage()
const;
158 int GetNumberOfObservers()
const;
167 DataStorage::SetOfObjects::ConstPointer GetRelevantNodes()
const;
176 typedef std::pair<unsigned long, DataNode::Pointer> PropDataPair;
177 typedef std::map<PropDataPair, BaseProperty::Pointer> ObserverToPropertyValueMap;
179 ObserverToPropertyValueMap m_ObserverToVisibleProperty;
180 ObserverToPropertyValueMap m_ObserverToLayerProperty;
181 ObserverToPropertyValueMap m_ObserverToRenderingModeProperty;
182 ObserverToPropertyValueMap m_ObserverToDisplayedComponentProperty;
183 ObserverToPropertyValueMap m_ObserverToLevelWindowImageProperty;
184 ObserverToPropertyValueMap m_ObserverToSelectedProperty;
186 void UpdateObservers();
187 void ClearPropertyObserverMaps();
188 void CreatePropertyObserverMaps();
190 bool HasLevelWindowRenderingMode(
DataNode *dataNode)
const;
193 const DataNode *m_NodeMarkedToDelete;
196 bool m_SelectedImagesMode;
197 unsigned long m_PropertyModifiedTag;
198 Image *m_CurrentImage;
199 std::vector<DataNode::Pointer> m_DataNodesForLevelWindow;
200 bool m_IsPropertyModifiedTagSet;
201 bool m_LevelWindowMutex;