18#ifndef __vtkMRMLIOProperties_h
19#define __vtkMRMLIOProperties_h
21#include "vtkMRMLLogicExport.h"
24#include <vtkVariant.h>
41 void PrintSelf(ostream& os, vtkIndent indent)
override;
44 void SetProperty(
const std::string& name,
const vtkVariant& value);
66 std::string
GetStringProperty(
const std::string& name,
const std::string& defaultValue =
"")
const;
113 std::map<std::string, vtkVariant> Properties;
114 std::vector<std::string> Order;
116 std::vector<std::string> BoolProperties;
void SetObjectProperty(const std::string &name, vtkObject *value)
Set a property to an object (such as the "screenShot" image of a scene). The object is referenced.
void SetBoolProperty(const std::string &name, bool value)
std::vector< std::string > GetPropertyNames() const
The names of the properties that are set, in the order they were first set.
bool IsMapProperty(const std::string &name) const
bool HasProperty(const std::string &name) const
bool GetBoolProperty(const std::string &name, bool defaultValue=false) const
vtkMRMLIOProperties * GetMapProperty(const std::string &name) const
void SetStringListProperty(const std::string &name, const std::vector< std::string > &values)
Set a property to a list of strings (such as "fileNames").
vtkVariant GetProperty(const std::string &name) const
The value of a property, or an invalid variant if it is not there.
bool IsObjectProperty(const std::string &name) const
bool IsStringListProperty(const std::string &name) const
void SetStringProperty(const std::string &name, const std::string &value)
static vtkMRMLIOProperties * New()
~vtkMRMLIOProperties() override
void RemoveAllProperties()
double GetDoubleProperty(const std::string &name, double defaultValue=0.0) const
void Update(vtkMRMLIOProperties *source)
Add the properties of another set to these, replacing values that are already set.
bool IsBoolProperty(const std::string &name) const
vtkObject * GetObjectProperty(const std::string &name) const
The value of an object property, or nullptr if it is not there or not an object.
std::vector< std::string > GetStringListProperty(const std::string &name) const
void RemoveProperty(const std::string &name)
void SetIntProperty(const std::string &name, int value)
bool GetListProperty(const std::string &name, vtkVariantArray *values) const
void SetDoubleProperty(const std::string &name, double value)
void Copy(vtkMRMLIOProperties *source)
Replace these properties with the properties of another set.
void SetMapProperty(const std::string &name, vtkMRMLIOProperties *values)
Set a property to a nested set of properties (a map). The properties are copied.
void PrintSelf(ostream &os, vtkIndent indent) override
int GetIntProperty(const std::string &name, int defaultValue=0) const
bool IsListProperty(const std::string &name) const
void SetListProperty(const std::string &name, vtkVariantArray *values)
void SetProperty(const std::string &name, const vtkVariant &value)
Set a property. A value that is already there is replaced.
std::string GetStringProperty(const std::string &name, const std::string &defaultValue="") const
The value of a property as a string; defaultValue if it is not there.