13 #ifndef mitkLevelWindowManager_h
14 #define mitkLevelWindowManager_h
56 itkFactorylessNewMacro(Self);
194 DataStorage::Pointer m_DataStorage;
195 LevelWindowProperty::Pointer m_LevelWindowProperty;
197 typedef std::pair<unsigned long, DataNode::Pointer> PropDataPair;
198 typedef std::map<PropDataPair, BaseProperty::Pointer> ObserverToPropertyValueMap;
200 ObserverToPropertyValueMap m_ObserverToVisibleProperty;
201 ObserverToPropertyValueMap m_ObserverToLayerProperty;
202 ObserverToPropertyValueMap m_ObserverToRenderingModeProperty;
203 ObserverToPropertyValueMap m_ObserverToDisplayedComponentProperty;
204 ObserverToPropertyValueMap m_ObserverToLevelWindowImageProperty;
205 ObserverToPropertyValueMap m_ObserverToSelectedProperty;
207 void UpdateObservers();
208 void ClearPropertyObserverMaps();
209 void CreatePropertyObserverMaps();
211 bool HasLevelWindowRenderingMode(
DataNode *dataNode)
const;
214 const DataNode *m_NodeMarkedToDelete;
217 bool m_SelectedImagesMode;
218 unsigned long m_PropertyModifiedTag;
219 Image *m_CurrentImage;
220 std::vector<DataNode::Pointer> m_DataNodesForLevelWindow;
221 bool m_IsPropertyModifiedTagSet;
222 bool m_LevelWindowMutex;
Central node class of the MITK data tree, associating a data object with properties and mappers.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Image class for storing multi-dimensional medical image data.
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
void RecalculateLevelWindowForSelectedComponent(const itk::EventObject &)
Recalculate the level window for the currently displayed component of selected images.
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)
Set the DataStorage to observe for image nodes.
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()
Get the currently observed DataStorage.
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.