Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkRenderWindowLayerUtilities.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKRENDERWINDOWLAYERUTILITIES_H
14 #define MITKRENDERWINDOWLAYERUTILITIES_H
15 
16 // render window manager module
18 
19 // mitk core
20 #include <mitkBaseRenderer.h>
21 #include <mitkDataNode.h>
22 #include <mitkDataStorage.h>
23 #include <mitkNodePredicateAnd.h>
24 
28 namespace mitk
29 {
30  namespace RenderWindowLayerUtilities
31  {
32  typedef std::vector<BaseRenderer*> RendererVector;
33  typedef std::map<int, DataNode::Pointer, std::greater<int>> LayerStack;
34 
38  const int BASE_LAYER_INDEX = 0;
42  const int TOP_LAYER_INDEX = -1;
43 
56  MITKRENDERWINDOWMANAGER_EXPORT LayerStack GetLayerStack(const DataStorage* dataStorage, const BaseRenderer* renderer, bool withBaseNode);
72  } // namespace RenderWindowLayerUtilities
73 } // namespace mitk
74 
75 #endif // MITKRENDERWINDOWLAYERUTILITIES_H
Data management class that handles &#39;was created by&#39; relations.
MITKRENDERWINDOWMANAGER_EXPORT void SetRenderWindowProperties(mitk::DataNode *dataNode, const BaseRenderer *renderer)
Set renderer-specific properties to mark a data node as &#39;managed by the specific renderer&#39;. In order for a renderer to manage a data node, the &#39;fixedLayer&#39; property has to be set for the given renderer. Additionally, the &#39;visible&#39; and the &#39;layer&#39; property are set and allow to individually render a set of nodes with a specific renderer. The last two mentioned properties are set so that they initially have the same value as the corresponding global property.
#define MITKRENDERWINDOWMANAGER_EXPORT
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
MITKRENDERWINDOWMANAGER_EXPORT NodePredicateAnd::Pointer GetRenderWindowPredicate(const BaseRenderer *renderer)
Helper function to get a node predicate that can be used to filter render window specific data nodes...
std::vector< BaseRenderer * > RendererVector
MITKRENDERWINDOWMANAGER_EXPORT LayerStack GetLayerStack(const DataStorage *dataStorage, const BaseRenderer *renderer, bool withBaseNode)
Return the stack of layers of the given renderer as std::map<int, DataNode::Pointer>, which guarantees ordering of the layers. Stacked layers are only included if they have their "fixedLayer" property set to true and their "layer" property set.
std::map< int, DataNode::Pointer, std::greater< int > > LayerStack
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57