Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLShaderPropertyNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Simon Drouin, Brigham and Women's
17  Hospital, Boston, MA.
18 
19 ==============================================================================*/
22 
23 #ifndef __vtkMRMLShaderPropertyNode_h
24 #define __vtkMRMLShaderPropertyNode_h
25 
26 // VolumeRendering includes
27 #include "vtkSlicerVolumeRenderingModuleMRMLExport.h"
28 
29 // MRML includes
30 #include "vtkMRMLStorableNode.h"
31 
32 // VTK includes
33 class vtkShaderProperty;
34 class vtkUniforms;
35 
39 class VTK_SLICER_VOLUMERENDERING_MODULE_MRML_EXPORT vtkMRMLShaderPropertyNode
40  : public vtkMRMLStorableNode
41 {
42 public:
43 
45  static vtkMRMLShaderPropertyNode *New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
51  vtkGetObjectMacro(ShaderProperty, vtkShaderProperty);
52 
54  vtkUniforms * GetVertexUniforms();
55  vtkUniforms * GetFragmentUniforms();
56  vtkUniforms * GetGeometryUniforms();
57 
58  //--------------------------------------------------------------------------
59  // MRMLNode methods
60  //--------------------------------------------------------------------------
61  vtkMRMLNode* CreateNodeInstance() override;
62 
64  void ReadXMLAttributes( const char** atts) override;
65 
67  void WriteXML(ostream& of, int indent) override;
68 
72 
74  const char* GetNodeTagName() override {return "ShaderProperty";}
75 
77  void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData) override;
78 
81 
83  bool GetModifiedSinceRead() override;
84 
85 protected:
87  ~vtkMRMLShaderPropertyNode() override;
88 
89 protected:
91  vtkIntArray* ObservedEvents;
92 
94  vtkShaderProperty* ShaderProperty{nullptr};
95 
96 private:
98  void operator=(const vtkMRMLShaderPropertyNode&) = delete;
99 
100 };
101 
102 #endif
vtkMRMLShaderPropertyNode volume shader custom code and custom uniform variables defined by users or ...
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
virtual bool GetModifiedSinceRead()
vtkMRMLNode * CreateNodeInstance() override=0
MRMLNode methods.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
MRML node to represent a 3D surface model.
A superclass for other storage nodes.
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Storage nodes
vtkIntArray * ObservedEvents
Events observed on the transfer functions.
vtkMRMLCopyContentMacro(vtkMRMLStorableNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void operator=(const vtkMRMLStorableNode &)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void PrintSelf(ostream &os, vtkIndent indent) override