Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLScriptedModuleNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLScriptedModuleNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLScriptedModuleNode_h
16 #define __vtkMRMLScriptedModuleNode_h
17 
18 // MRML includes
19 #include "vtkMRMLNode.h"
20 
21 // STD includes
22 #include <string>
23 #include <vector>
24 
27 class VTK_MRML_EXPORT vtkMRMLScriptedModuleNode : public vtkMRMLNode
28 {
29 public:
30  static vtkMRMLScriptedModuleNode *New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  vtkMRMLNode* CreateNodeInstance() override;
35 
37  void ReadXMLAttributes( const char** atts) override;
38 
40  void WriteXML(ostream& of, int indent) override;
41 
45 
47  const char* GetNodeTagName() override;
48 
51  vtkGetStringMacro (ModuleName);
52  vtkSetStringMacro (ModuleName);
53 
55  void SetParameter(const std::string& name, const std::string& value);
56 
58  void UnsetParameter(const std::string& name);
59 
62  void UnsetAllParameters();
63 
65  std::string GetParameter(const std::string& name) const;
66 
68  int GetParameterCount();
69 
72  std::string GetParameterNamesAsCommaSeparatedList();
73 
75  std::vector<std::string> GetParameterNames();
76 
77 protected:
79  ~vtkMRMLScriptedModuleNode() override;
80 
83 
84  typedef std::map<std::string, std::string> ParameterMap;
86  char *ModuleName;
87 };
88 
89 #endif
virtual void ReadXMLAttributes(const char **atts)
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
std::map< std::string, std::string > ParameterMap
virtual void WriteXML(ostream &of, int indent)
void PrintSelf(ostream &os, vtkIndent indent) override
#define vtkMRMLCopyContentMacro(thisClassName)
Definition: vtkMRMLNode.h:142
virtual const char * GetNodeTagName()=0
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167