Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
27class VTK_MRML_EXPORT vtkMRMLScriptedModuleNode : public vtkMRMLNode
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
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
57 bool HasParameter(const std::string& name) const;
58
60 void SetParameter(const std::string& name, const std::string& value);
61
63 void UnsetParameter(const std::string& name);
64
68
70 std::string GetParameter(const std::string& name) const;
71
74
78
80 std::vector<std::string> GetParameterNames();
81
82protected:
85
88
89 typedef std::map<std::string, std::string> ParameterMap;
92};
93
94#endif
void operator=(const vtkMRMLScriptedModuleNode &)
static vtkMRMLScriptedModuleNode * New()
int GetParameterCount()
Get number of parameters.
vtkMRMLScriptedModuleNode(const vtkMRMLScriptedModuleNode &)
std::vector< std::string > GetParameterNames()
Get list of parameter names.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
std::string GetParameterNamesAsCommaSeparatedList()
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void SetParameter(const std::string &name, const std::string &value)
Set module parameter.
~vtkMRMLScriptedModuleNode() override
std::map< std::string, std::string > ParameterMap
void PrintSelf(ostream &os, vtkIndent indent) override
std::string GetParameter(const std::string &name) const
Get module parameter identified by name.
vtkMRMLCopyContentMacro(vtkMRMLScriptedModuleNode)
void UnsetParameter(const std::string &name)
Unset the parameter identified by name.
void ReadXMLAttributes(const char **atts) override
Set node attributes.
bool HasParameter(const std::string &name) const
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.