Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLFolderDisplayNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6  Queen's University, Kingston, ON, Canada. All Rights Reserved.
7 
8  See COPYRIGHT.txt
9  or http://www.slicer.org/copyright/copyright.txt for details.
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 
17  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18  and was supported through CANARIE.
19 
20 ==============================================================================*/
21 
22 #ifndef __vtkMRMLFolderDisplayNode_h
23 #define __vtkMRMLFolderDisplayNode_h
24 
25 // MRML includes
26 #include "vtkMRMLDisplayNode.h"
27 
29 
54 class VTK_MRML_EXPORT vtkMRMLFolderDisplayNode : public vtkMRMLDisplayNode
55 {
56 public:
57  static vtkMRMLFolderDisplayNode *New();
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  vtkMRMLNode* CreateNodeInstance() override;
62 
64  const char* GetNodeTagName() override {return "FolderDisplay";}
65 
67  void ReadXMLAttributes(const char** atts) override;
68 
70  void WriteXML(ostream& of, int indent) override;
71 
75 
77  void SetScene(vtkMRMLScene* scene) override;
78 
80  void ProcessMRMLEvents( vtkObject *caller, unsigned long event, void *callData) override;
81 
83  void Modified() override;
84 
88  void SetApplyDisplayPropertiesOnBranch(bool on);
89  vtkGetMacro(ApplyDisplayPropertiesOnBranch, bool);
91 
94  void ChildDisplayNodesModified();
95 
100  static vtkMRMLDisplayNode* GetOverridingHierarchyDisplayNode(vtkMRMLDisplayableNode* node);
101 
105  static bool GetHierarchyVisibility(vtkMRMLDisplayableNode* node);
106 
109  // or not. Opacity defined by hierarchy is the product of the ancestors' opacities.
110  static double GetHierarchyOpacity(vtkMRMLDisplayableNode* node);
111 
112 protected:
114  ~vtkMRMLFolderDisplayNode() override;
116  void operator=(const vtkMRMLFolderDisplayNode&);
117 
118 private:
122  bool ApplyDisplayPropertiesOnBranch{false};
123 };
124 
125 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void ReadXMLAttributes(const char **atts) override
MRML node to represent a display property for child nodes of a subject hierarchy folder.
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
vtkMRMLCopyContentMacro(vtkMRMLDisplayNode)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
void WriteXML(ostream &of, int indent) override
void operator=(const vtkMRMLDisplayNode &)
virtual void SetScene(vtkMRMLScene *scene)
This method is for internal use only. Use AddNode method of vtkMRMLScene to add a node to the scene...
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
Abstract class that contains graphical display properties for displayable nodes.
void Modified() override
Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.
Definition: vtkMRMLNode.h:489
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167