13 #ifndef mitkLevelWindowManager_h
14 #define mitkLevelWindowManager_h
56 itkFactorylessNewMacro(Self);
85 void Update(
const itk::EventObject&);
173 DataStorage::Pointer m_DataStorage;
174 LevelWindowProperty::Pointer m_LevelWindowProperty;
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;
Class for nodes of the DataTree.
Data management class that handles 'was created by' relations.
Image class for storing images.
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
void RecalculateLevelWindowForSelectedComponent(const itk::EventObject &)
void SetSelectedImages(bool selectedImagesMode, const DataNode *removedNode=nullptr)
(Re-)Initialize the LevelWindowManager by setting the selected images. Use the removedNode parameter ...
LevelWindowProperty::Pointer GetLevelWindowProperty() const
Return the current LevelWindowProperty object from the image that is affected by changes.
const LevelWindow & GetLevelWindow() const
Return Level/Window values for the current image.
void SetLevelWindow(const LevelWindow &levelWindow)
Set new Level/Window values and inform all listeners about changes.
void SetAutoTopMostImage(bool autoTopMost, const DataNode *removedNode=nullptr)
(Re-)Initialize the LevelWindowManager by setting the topmost image. Use the removedNode parameter if...
mitkClassMacroItkParent(LevelWindowManager, itk::Object)
DataStorage::SetOfObjects::ConstPointer GetRelevantNodes() const
Return all nodes in the data storage that have the following properties:
void Update(const itk::EventObject &)
Update the level window. This function is called if a property of a data node is changed....
void SetDataStorage(DataStorage *dataStorage)
Image * GetCurrentImage() const
Return the currently active image.
void DataStorageAddedNode(const DataNode *dataNode=nullptr)
This method is called when a node is added to the data storage. A listener on the data storage is use...
void UpdateSelected(const itk::EventObject &)
Update the level window. This function is only called if the 'selected' property of a data node is ch...
bool IsSelectedImages() const
Return true, if level window changes will affect the currently selected images.
int GetNumberOfObservers() const
Return the number of observers for data node's "visible" property. This basically returns the number ...
DataStorage * GetDataStorage()
void DataStorageRemovedNode(const DataNode *dataNode=nullptr)
This method is called when a node is removed from the data storage. A listener on the data storage is...
void SetLevelWindowProperty(LevelWindowProperty::Pointer levelWindowProperty)
Set a specific LevelWindowProperty; all changes will affect the image belonging to this property.
void OnPropertyModified(const itk::EventObject &)
Change notifications from mitkLevelWindowProperty.
bool IsAutoTopMost() const
Return true, if level window changes will affect the topmost layer image.
The LevelWindow class Class to store level/window values.
Find image slices visible on a given plane.