![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Writes properties into a JSON stream. More...
#include <Libs/MRML/Core/vtkMRMLJsonElement.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
std::string | ConvertXMLToJson (vtkXMLDataElement *xmlElement, const std::string &nodeTagName) |
virtual const char * | GetClassName () |
virtual vtkMRMLMessageCollection * | GetUserMessages () |
Returns user-displayable messages that may contain details about any failed operation. | |
bool | HasErrors () |
Returns true if user messages contain error messages. | |
virtual int | IsA (const char *type) |
bool | isBool (const std::string &str) |
Utility functions to check string type. | |
bool | isDouble (const std::string &str) |
bool | isInt (const std::string &str) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
std::string | toLower (const std::string &str) |
Utility function to convert string to lower case. | |
void | WriteArrayPropertyEnd () |
This method must be called when all array items are written. | |
void | WriteArrayPropertyStart (const std::string &propertyName) |
This method creates a new array as a property. | |
void | WriteObjectEnd () |
This method must be called when all properties of the object are written. | |
void | WriteObjectPropertyEnd () |
This method must be called when all properties of the object are written. | |
void | WriteObjectPropertyStart (const std::string &propertyName) |
This method creates a new object as a property. | |
void | WriteObjectStart () |
This method creates a new object in an array. | |
bool | WriteToFileBegin (const char *filePath, const char *schema) |
bool | WriteToFileEnd () |
bool | WriteToStringBegin (const char *nodeTagName) |
std::string | WriteToStringEnd () |
void | WriteStringProperty (const std::string &propertyName, const std::string &propertyValue) |
void | WriteStringVectorProperty (const std::string &propertyName, const std::vector< std::string > &arrayValues) |
void | WriteCodedEntryProperty (const std::string &propertyName, vtkCodedEntry *codedEntry) |
void | WriteStringPropertyIfNotEmpty (const std::string &propertyName, const std::string &propertyValue) |
void | WriteBoolProperty (const std::string &propertyName, bool propertyValue) |
void | WriteIntProperty (const std::string &propertyName, int propertyValue) |
void | WriteDoubleProperty (const std::string &propertyName, double propertyValue) |
void | WriteVectorProperty (const std::string &propertyName, double *v, int numberOfComponents=3) |
void | WriteMatrix4x4Property (const std::string &propertyName, double v[16], bool flipRasLps) |
void | WriteDoubleArrayProperty (const char *propertyName, vtkDoubleArray *doubleArray) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkMRMLJsonWriter * | New () |
static vtkMRMLJsonWriter * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
void | operator= (const vtkMRMLJsonWriter &) |
void | processXMLElement (vtkXMLDataElement *xmlElement) |
vtkMRMLJsonWriter () | |
vtkMRMLJsonWriter (const vtkMRMLJsonWriter &) | |
~vtkMRMLJsonWriter () override | |
Protected Attributes | |
vtkInternal * | Internal |
vtkNew< vtkMRMLMessageCollection > | UserMessages |
Friends | |
class | vtkInternal |
Writes properties into a JSON stream.
Definition at line 231 of file vtkMRMLJsonElement.h.
typedef vtkObject vtkMRMLJsonWriter::Superclass |
Definition at line 235 of file vtkMRMLJsonElement.h.
|
protected |
|
overrideprotected |
|
protected |
std::string vtkMRMLJsonWriter::ConvertXMLToJson | ( | vtkXMLDataElement * | xmlElement, |
const std::string & | nodeTagName ) |
Convert XML to JSON return string
|
virtual |
Reimplemented in vtkMRMLMarkupsJsonWriter.
|
virtual |
Returns user-displayable messages that may contain details about any failed operation.
bool vtkMRMLJsonWriter::HasErrors | ( | ) |
Returns true if user messages contain error messages.
|
virtual |
Reimplemented in vtkMRMLMarkupsJsonWriter.
bool vtkMRMLJsonWriter::isBool | ( | const std::string & | str | ) |
Utility functions to check string type.
bool vtkMRMLJsonWriter::isDouble | ( | const std::string & | str | ) |
bool vtkMRMLJsonWriter::isInt | ( | const std::string & | str | ) |
|
static |
|
static |
|
protected |
|
override |
|
protected |
|
static |
std::string vtkMRMLJsonWriter::toLower | ( | const std::string & | str | ) |
Utility function to convert string to lower case.
void vtkMRMLJsonWriter::WriteArrayPropertyEnd | ( | ) |
This method must be called when all array items are written.
void vtkMRMLJsonWriter::WriteArrayPropertyStart | ( | const std::string & | propertyName | ) |
This method creates a new array as a property.
void vtkMRMLJsonWriter::WriteBoolProperty | ( | const std::string & | propertyName, |
bool | propertyValue ) |
void vtkMRMLJsonWriter::WriteCodedEntryProperty | ( | const std::string & | propertyName, |
vtkCodedEntry * | codedEntry ) |
void vtkMRMLJsonWriter::WriteDoubleArrayProperty | ( | const char * | propertyName, |
vtkDoubleArray * | doubleArray ) |
void vtkMRMLJsonWriter::WriteDoubleProperty | ( | const std::string & | propertyName, |
double | propertyValue ) |
void vtkMRMLJsonWriter::WriteIntProperty | ( | const std::string & | propertyName, |
int | propertyValue ) |
void vtkMRMLJsonWriter::WriteMatrix4x4Property | ( | const std::string & | propertyName, |
double | v[16], | ||
bool | flipRasLps ) |
void vtkMRMLJsonWriter::WriteObjectEnd | ( | ) |
This method must be called when all properties of the object are written.
void vtkMRMLJsonWriter::WriteObjectPropertyEnd | ( | ) |
This method must be called when all properties of the object are written.
void vtkMRMLJsonWriter::WriteObjectPropertyStart | ( | const std::string & | propertyName | ) |
This method creates a new object as a property.
void vtkMRMLJsonWriter::WriteObjectStart | ( | ) |
This method creates a new object in an array.
void vtkMRMLJsonWriter::WriteStringProperty | ( | const std::string & | propertyName, |
const std::string & | propertyValue ) |
Write simple value as an object property.
void vtkMRMLJsonWriter::WriteStringPropertyIfNotEmpty | ( | const std::string & | propertyName, |
const std::string & | propertyValue ) |
void vtkMRMLJsonWriter::WriteStringVectorProperty | ( | const std::string & | propertyName, |
const std::vector< std::string > & | arrayValues ) |
bool vtkMRMLJsonWriter::WriteToFileBegin | ( | const char * | filePath, |
const char * | schema ) |
This method must be called before writing any properties to the output file. Returns true on success.
bool vtkMRMLJsonWriter::WriteToFileEnd | ( | ) |
This method must be called after writing all properties to the output file. Returns true on success.
bool vtkMRMLJsonWriter::WriteToStringBegin | ( | const char * | nodeTagName | ) |
This method must be called before writing any properties to the output file. Returns true on success.
std::string vtkMRMLJsonWriter::WriteToStringEnd | ( | ) |
This method must be called after writing all properties to the output file. Returns string representation of the JSON document.
void vtkMRMLJsonWriter::WriteVectorProperty | ( | const std::string & | propertyName, |
double * | v, | ||
int | numberOfComponents = 3 ) |
|
friend |
Definition at line 312 of file vtkMRMLJsonElement.h.
|
protected |
Definition at line 311 of file vtkMRMLJsonElement.h.
|
protected |
Definition at line 308 of file vtkMRMLJsonElement.h.