Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLMarkupsJsonWriter Class Reference

Writes properties into a JSON file. More...

#include <Modules/Loadable/Markups/MRML/vtkMRMLMarkupsJsonElement.h>

Inheritance diagram for vtkMRMLMarkupsJsonWriter:
Collaboration diagram for vtkMRMLMarkupsJsonWriter:

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual vtkMRMLMessageCollectionGetUserMessages ()
 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)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
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 ()
 
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 vtkMRMLMarkupsJsonWriterNew ()
 
static vtkMRMLMarkupsJsonWriterSafeDownCast (vtkObject *o)
 

Protected Member Functions

void operator= (const vtkMRMLMarkupsJsonWriter &)
 
 vtkMRMLMarkupsJsonWriter ()
 
 vtkMRMLMarkupsJsonWriter (const vtkMRMLMarkupsJsonWriter &)
 
 ~vtkMRMLMarkupsJsonWriter () override
 

Protected Attributes

vtkInternalInternal
 
vtkNew< vtkMRMLMessageCollectionUserMessages
 

Friends

class vtkInternal
 

Detailed Description

Writes properties into a JSON file.

Definition at line 188 of file vtkMRMLMarkupsJsonElement.h.

Member Typedef Documentation

◆ Superclass

Definition at line 193 of file vtkMRMLMarkupsJsonElement.h.

Constructor & Destructor Documentation

◆ vtkMRMLMarkupsJsonWriter() [1/2]

vtkMRMLMarkupsJsonWriter::vtkMRMLMarkupsJsonWriter ( )
protected

◆ ~vtkMRMLMarkupsJsonWriter()

vtkMRMLMarkupsJsonWriter::~vtkMRMLMarkupsJsonWriter ( )
overrideprotected

◆ vtkMRMLMarkupsJsonWriter() [2/2]

vtkMRMLMarkupsJsonWriter::vtkMRMLMarkupsJsonWriter ( const vtkMRMLMarkupsJsonWriter & )
protected

Member Function Documentation

◆ GetClassName()

virtual const char * vtkMRMLMarkupsJsonWriter::GetClassName ( )
virtual

◆ GetUserMessages()

virtual vtkMRMLMessageCollection * vtkMRMLMarkupsJsonWriter::GetUserMessages ( )
virtual

Returns user-displayable messages that may contain details about any failed operation.

◆ HasErrors()

bool vtkMRMLMarkupsJsonWriter::HasErrors ( )

Returns true if user messages contain error messages.

◆ IsA()

virtual int vtkMRMLMarkupsJsonWriter::IsA ( const char * type)
virtual

◆ IsTypeOf()

static int vtkMRMLMarkupsJsonWriter::IsTypeOf ( const char * type)
static

◆ New()

static vtkMRMLMarkupsJsonWriter * vtkMRMLMarkupsJsonWriter::New ( )
static

◆ operator=()

void vtkMRMLMarkupsJsonWriter::operator= ( const vtkMRMLMarkupsJsonWriter & )
protected

◆ PrintSelf()

void vtkMRMLMarkupsJsonWriter::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ SafeDownCast()

static vtkMRMLMarkupsJsonWriter * vtkMRMLMarkupsJsonWriter::SafeDownCast ( vtkObject * o)
static

◆ WriteArrayPropertyEnd()

void vtkMRMLMarkupsJsonWriter::WriteArrayPropertyEnd ( )

This method must be called when all array items are written.

◆ WriteArrayPropertyStart()

void vtkMRMLMarkupsJsonWriter::WriteArrayPropertyStart ( const std::string & propertyName)

This method creates a new array as a property.

◆ WriteBoolProperty()

void vtkMRMLMarkupsJsonWriter::WriteBoolProperty ( const std::string & propertyName,
bool propertyValue )

◆ WriteCodedEntryProperty()

void vtkMRMLMarkupsJsonWriter::WriteCodedEntryProperty ( const std::string & propertyName,
vtkCodedEntry * codedEntry )

◆ WriteDoubleArrayProperty()

void vtkMRMLMarkupsJsonWriter::WriteDoubleArrayProperty ( const char * propertyName,
vtkDoubleArray * doubleArray )

◆ WriteDoubleProperty()

void vtkMRMLMarkupsJsonWriter::WriteDoubleProperty ( const std::string & propertyName,
double propertyValue )

◆ WriteIntProperty()

void vtkMRMLMarkupsJsonWriter::WriteIntProperty ( const std::string & propertyName,
int propertyValue )

◆ WriteMatrix4x4Property()

void vtkMRMLMarkupsJsonWriter::WriteMatrix4x4Property ( const std::string & propertyName,
double v[16],
bool flipRasLps )

◆ WriteObjectEnd()

void vtkMRMLMarkupsJsonWriter::WriteObjectEnd ( )

This method must be called when all properties of the object are written.

◆ WriteObjectPropertyEnd()

void vtkMRMLMarkupsJsonWriter::WriteObjectPropertyEnd ( )

This method must be called when all properties of the object are written.

◆ WriteObjectPropertyStart()

void vtkMRMLMarkupsJsonWriter::WriteObjectPropertyStart ( const std::string & propertyName)

This method creates a new object as a property.

◆ WriteObjectStart()

void vtkMRMLMarkupsJsonWriter::WriteObjectStart ( )

This method creates a new object in an array.

◆ WriteStringProperty()

void vtkMRMLMarkupsJsonWriter::WriteStringProperty ( const std::string & propertyName,
const std::string & propertyValue )

Write simple value as an object property.

◆ WriteStringPropertyIfNotEmpty()

void vtkMRMLMarkupsJsonWriter::WriteStringPropertyIfNotEmpty ( const std::string & propertyName,
const std::string & propertyValue )

◆ WriteStringVectorProperty()

void vtkMRMLMarkupsJsonWriter::WriteStringVectorProperty ( const std::string & propertyName,
const std::vector< std::string > & arrayValues )

◆ WriteToFileBegin()

bool vtkMRMLMarkupsJsonWriter::WriteToFileBegin ( const char * filePath,
const char * schema )

This method must be called before writing any properties to the output file. Returns true on success.

◆ WriteToFileEnd()

bool vtkMRMLMarkupsJsonWriter::WriteToFileEnd ( )

This method must be called after writing all properties to the output file. Returns true on success.

◆ WriteVectorProperty()

void vtkMRMLMarkupsJsonWriter::WriteVectorProperty ( const std::string & propertyName,
double * v,
int numberOfComponents = 3 )

Friends And Related Symbol Documentation

◆ vtkInternal

friend class vtkInternal
friend

Definition at line 249 of file vtkMRMLMarkupsJsonElement.h.

Member Data Documentation

◆ Internal

vtkInternal* vtkMRMLMarkupsJsonWriter::Internal
protected

Definition at line 248 of file vtkMRMLMarkupsJsonElement.h.

◆ UserMessages

vtkNew<vtkMRMLMessageCollection> vtkMRMLMarkupsJsonWriter::UserMessages
protected

Definition at line 245 of file vtkMRMLMarkupsJsonElement.h.


The documentation for this class was generated from the following file: