30 #ifndef vtkSMTransferFunctionPresets_h 31 #define vtkSMTransferFunctionPresets_h 33 #include "vtkPVServerManagerRenderingModule.h" 35 #include "vtkStdString.h" 41 class ValueConstIterator;
49 void PrintSelf(ostream& os, vtkIndent indent);
55 unsigned int GetNumberOfPresets();
61 vtkStdString GetPresetAsString(
unsigned int index);
69 bool AddPreset(
const char* name,
const vtkStdString& preset);
74 bool RemovePreset(
unsigned int index);
80 const Json::Value& GetFirstPresetWithName(
const char* name);
85 const Json::Value& GetPreset(
unsigned int index);
90 vtkStdString GetPresetName(
unsigned int index);
95 bool GetPresetHasOpacities(
const Json::Value& preset);
98 return this->GetPresetHasOpacities(this->GetPreset(index));
104 bool GetPresetHasIndexedColors(
const Json::Value& preset);
107 return this->GetPresetHasIndexedColors(this->GetPreset(index));
113 bool GetPresetHasAnnotations(
const Json::Value& preset);
116 return this->GetPresetHasAnnotations(this->GetPreset(index));
122 bool AddPreset(
const char* name,
const Json::Value& preset);
128 vtkStdString AddUniquePreset(
const Json::Value& preset,
const char* prefix = NULL);
134 bool IsPresetBuiltin(
unsigned int index);
139 bool RenamePreset(
unsigned int index,
const char* newname);
148 bool ImportPresets(
const char* filename);
149 bool ImportPresets(
const Json::Value& presets);
161 vtkInternals* Internals;
bool GetPresetHasOpacities(unsigned int index)
manages presets for color, opacity, and annotation presets.
superclass for most server manager classes
bool GetPresetHasIndexedColors(unsigned int index)
bool GetPresetHasAnnotations(unsigned int index)
This is used by vtkPVXMLParser to represent an XML document starting at the root element.