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
vtkMRMLMarkupsJsonElement Class Reference

Represents a json object or list. More...

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

Inheritance diagram for vtkMRMLMarkupsJsonElement:
Collaboration diagram for vtkMRMLMarkupsJsonElement:

Public Types

typedef vtkObject Superclass
 

Public Member Functions

VTK_NEWINSTANCE vtkMRMLMarkupsJsonElementGetArrayItem (int childItemIndex)
 
bool GetArrayItemsStringProperty (const char *arrayName, const char *propertyName, std::vector< std::string > &propertyValues)
 
VTK_NEWINSTANCE vtkMRMLMarkupsJsonElementGetArrayProperty (const char *arrayName)
 
int GetArraySize ()
 Returns the number of elements in this array.
 
bool GetBoolProperty (const char *propertyName)
 Get Boolean property value.
 
virtual const char * GetClassName ()
 
VTK_NEWINSTANCE vtkCodedEntryGetCodedEntryProperty (const char *propertyName)
 
VTK_NEWINSTANCE vtkDoubleArray * GetDoubleArrayProperty (const char *propertyName)
 
double GetDoubleProperty (const char *propertyName)
 
bool GetDoubleProperty (const char *propertyName, double &propertyValue)
 
int GetIntProperty (const char *propertyName)
 
bool GetIntProperty (const char *propertyName, int &propertyValue)
 
bool GetMatrix4x4Property (const char *propertyName, double v[16], bool flipRasLps)
 
VTK_NEWINSTANCE vtkMRMLMarkupsJsonElementGetObjectProperty (const char *objectName)
 
std::string GetSchema ()
 Get the JSON schema name.
 
std::string GetStringProperty (const char *propertyName)
 
bool GetStringProperty (const char *propertyName, std::string &propertyValue)
 
bool GetStringVectorProperty (const char *propertyName, std::vector< std::string > &arrayValues)
 
virtual vtkMRMLMessageCollectionGetUserMessages ()
 Returns user-displayable messages that may contain details about any failed operation.
 
bool GetVectorProperty (const char *propertyName, double *v, int numberOfComponents=3)
 
bool HasErrors ()
 Returns true if user messages contain error messages.
 
bool HasMember (const char *propertyName)
 Returns true if the JSON object contains a member by this name.
 
virtual int IsA (const char *type)
 
bool IsArray ()
 Returns true if this element is an array.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLMarkupsJsonElementNew ()
 
static vtkMRMLMarkupsJsonElementSafeDownCast (vtkObject *o)
 

Protected Member Functions

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

Protected Attributes

vtkInternalInternal
 
vtkNew< vtkMRMLMessageCollectionUserMessages
 

Friends

class vtkInternal
 
class vtkMRMLMarkupsJsonReader
 

Detailed Description

Represents a json object or list.

Definition at line 39 of file vtkMRMLMarkupsJsonElement.h.

Member Typedef Documentation

◆ Superclass

Definition at line 43 of file vtkMRMLMarkupsJsonElement.h.

Constructor & Destructor Documentation

◆ vtkMRMLMarkupsJsonElement() [1/2]

vtkMRMLMarkupsJsonElement::vtkMRMLMarkupsJsonElement ( )
protected

◆ ~vtkMRMLMarkupsJsonElement()

vtkMRMLMarkupsJsonElement::~vtkMRMLMarkupsJsonElement ( )
overrideprotected

◆ vtkMRMLMarkupsJsonElement() [2/2]

vtkMRMLMarkupsJsonElement::vtkMRMLMarkupsJsonElement ( const vtkMRMLMarkupsJsonElement & )
protected

Member Function Documentation

◆ GetArrayItem()

VTK_NEWINSTANCE vtkMRMLMarkupsJsonElement * vtkMRMLMarkupsJsonElement::GetArrayItem ( int childItemIndex)

Returns the n-th elements in this array. Only in C++: The caller must take ownership of the returned object.

◆ GetArrayItemsStringProperty()

bool vtkMRMLMarkupsJsonElement::GetArrayItemsStringProperty ( const char * arrayName,
const char * propertyName,
std::vector< std::string > & propertyValues )

Get property values from each item of an array. If no such property is found or it is not the right type then false is returned.

◆ GetArrayProperty()

VTK_NEWINSTANCE vtkMRMLMarkupsJsonElement * vtkMRMLMarkupsJsonElement::GetArrayProperty ( const char * arrayName)

Get an array element from a property. If no such property is found or it is not the right type then nullptr is returned. Only in C++: The caller must take ownership of the returned object.

◆ GetArraySize()

int vtkMRMLMarkupsJsonElement::GetArraySize ( )

Returns the number of elements in this array.

◆ GetBoolProperty()

bool vtkMRMLMarkupsJsonElement::GetBoolProperty ( const char * propertyName)

Get Boolean property value.

◆ GetClassName()

virtual const char * vtkMRMLMarkupsJsonElement::GetClassName ( )
virtual

◆ GetCodedEntryProperty()

VTK_NEWINSTANCE vtkCodedEntry * vtkMRMLMarkupsJsonElement::GetCodedEntryProperty ( const char * propertyName)

Get a coded entry object from a property. If no such property is found or it is not the right type then nullptr is returned. Only in C++: The caller must take ownership of the returned object.

◆ GetDoubleArrayProperty()

VTK_NEWINSTANCE vtkDoubleArray * vtkMRMLMarkupsJsonElement::GetDoubleArrayProperty ( const char * propertyName)

Get a variable-size, potentially multi-component floating-point vector from a property. If no such property is found or it is not the right type then nullptr is returned. Only in C++: The caller must take ownership of the returned object.

◆ GetDoubleProperty() [1/2]

double vtkMRMLMarkupsJsonElement::GetDoubleProperty ( const char * propertyName)

Get double-precision floating point property value. If no such property is found or it is not double then 0.0 is returned.

◆ GetDoubleProperty() [2/2]

bool vtkMRMLMarkupsJsonElement::GetDoubleProperty ( const char * propertyName,
double & propertyValue )

Get double-precision floating point property value. If a double property by the specified name is found then set it in propertyValue and return true. If a double property by the specified name is not found then return false.

◆ GetIntProperty() [1/2]

int vtkMRMLMarkupsJsonElement::GetIntProperty ( const char * propertyName)

Get integer property value. If no such property is found or it is not integer then 0 is returned.

◆ GetIntProperty() [2/2]

bool vtkMRMLMarkupsJsonElement::GetIntProperty ( const char * propertyName,
int & propertyValue )

Get integer property value. If an integer property by the specified name is found then set it in propertyValue and return true. If an integer double property by the specified name is not found then return false.

◆ GetMatrix4x4Property()

bool vtkMRMLMarkupsJsonElement::GetMatrix4x4Property ( const char * propertyName,
double v[16],
bool flipRasLps )

Get 4x4 matrix from a property. If no such property is found or it is not the right type then false is returned. If flipRasLps is set to true then the matrix is converted between LPS/RAS coordinate system (multiplied by diag(-1,-1,1,1) matrix).

◆ GetObjectProperty()

VTK_NEWINSTANCE vtkMRMLMarkupsJsonElement * vtkMRMLMarkupsJsonElement::GetObjectProperty ( const char * objectName)

Get an object element from a property. If no such property is found or it is not the right type then nullptr is returned. Only in C++: The caller must take ownership of the returned object.

◆ GetSchema()

std::string vtkMRMLMarkupsJsonElement::GetSchema ( )

Get the JSON schema name.

◆ GetStringProperty() [1/2]

std::string vtkMRMLMarkupsJsonElement::GetStringProperty ( const char * propertyName)

Get string property value. Returns empty string if no such string property is found.

◆ GetStringProperty() [2/2]

bool vtkMRMLMarkupsJsonElement::GetStringProperty ( const char * propertyName,
std::string & propertyValue )

Get string property value. If a string property by the specified name is found then set it in propertyValue and return true. If a string property by the specified name is not found then return false.

◆ GetStringVectorProperty()

bool vtkMRMLMarkupsJsonElement::GetStringVectorProperty ( const char * propertyName,
std::vector< std::string > & arrayValues )

Get a vector of string values from a property. If no such property is found or it is not the right type then false is returned.

◆ GetUserMessages()

virtual vtkMRMLMessageCollection * vtkMRMLMarkupsJsonElement::GetUserMessages ( )
virtual

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

◆ GetVectorProperty()

bool vtkMRMLMarkupsJsonElement::GetVectorProperty ( const char * propertyName,
double * v,
int numberOfComponents = 3 )

Get a fixed-size vector of floating point values from a property. If no such property is found or it is not the right type then false is returned.

◆ HasErrors()

bool vtkMRMLMarkupsJsonElement::HasErrors ( )

Returns true if user messages contain error messages.

◆ HasMember()

bool vtkMRMLMarkupsJsonElement::HasMember ( const char * propertyName)

Returns true if the JSON object contains a member by this name.

◆ IsA()

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

◆ IsArray()

bool vtkMRMLMarkupsJsonElement::IsArray ( )

Returns true if this element is an array.

◆ IsTypeOf()

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

◆ New()

static vtkMRMLMarkupsJsonElement * vtkMRMLMarkupsJsonElement::New ( )
static

◆ operator=()

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

◆ PrintSelf()

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

◆ SafeDownCast()

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

Friends And Related Symbol Documentation

◆ vtkInternal

friend class vtkInternal
friend

Definition at line 150 of file vtkMRMLMarkupsJsonElement.h.

◆ vtkMRMLMarkupsJsonReader

friend class vtkMRMLMarkupsJsonReader
friend

Definition at line 151 of file vtkMRMLMarkupsJsonElement.h.

Member Data Documentation

◆ Internal

vtkInternal* vtkMRMLMarkupsJsonElement::Internal
protected

Definition at line 149 of file vtkMRMLMarkupsJsonElement.h.

◆ UserMessages

vtkNew<vtkMRMLMessageCollection> vtkMRMLMarkupsJsonElement::UserMessages
protected

Definition at line 146 of file vtkMRMLMarkupsJsonElement.h.


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