Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::vtkPointSetXMLParser Class Reference

Implementation of the vtkXMLParser interface for reading mitk::PointSets. More...

#include <vtkPointSetXMLParser.h>

Inheritance diagram for mitk::vtkPointSetXMLParser:
Collaboration diagram for mitk::vtkPointSetXMLParser:

Public Types

typedef mitk::PointSet PointSetType
 
typedef std::stack< std::string > ParseStack
 
typedef std::list< PointSetType::PointerPointSetList
 
typedef PointSetType::DataType::PointIdentifier PointIdentifier
 
typedef PointSetType::PointType PointType
 

Public Member Functions

 vtkTypeMacro (vtkPointSetXMLParser, vtkXMLParser)
 
int InitializeParser () override
 
int CleanupParser () override
 
void StartElement (const char *name, const char **atts) override
 
void EndElement (const char *name) override
 
void CharacterDataHandler (const char *inData, int inLength) override
 
virtual mitk::ScalarType ParseScalarType (const std::string &data)
 
virtual PointIdentifier ParsePointIdentifier (const std::string &data)
 
virtual PointSetList GetParsedPointSets ()
 

Static Public Member Functions

static vtkPointSetXMLParserNew ()
 

Protected Member Functions

 vtkPointSetXMLParser ()
 
 ~vtkPointSetXMLParser () override
 

Protected Attributes

ParseStack m_ParseStack
 
PointSetList m_PointSetList
 
PointSetType::Pointer m_CurrentPointSet
 
PointType m_CurrentPoint
 
std::string m_CurId
 
std::string m_CurXString
 
std::string m_CurYString
 
std::string m_CurZString
 
PointIdentifier m_CurrentPointId
 
std::locale m_PreviousLocale
 

Detailed Description

Implementation of the vtkXMLParser interface for reading mitk::PointSets.

This class implements the XMLParser interface of the vtkXMLParser which is based on expat. It is used by the mitk::PointSetReader and is NOT INTENDED TO BE USED FROM THE END-USER. If you want to read point sets, use the mitk::PointSetReader.

Deprecated:
(as of 2014_10) Use mitk::IOUtils or mitk::FileReaderRegistry instead.

Definition at line 35 of file vtkPointSetXMLParser.h.

Member Typedef Documentation

◆ ParseStack

typedef std::stack<std::string> mitk::vtkPointSetXMLParser::ParseStack

Definition at line 44 of file vtkPointSetXMLParser.h.

◆ PointIdentifier

◆ PointSetList

◆ PointSetType

◆ PointType

Constructor & Destructor Documentation

◆ vtkPointSetXMLParser()

mitk::vtkPointSetXMLParser::vtkPointSetXMLParser ( )
protected

◆ ~vtkPointSetXMLParser()

mitk::vtkPointSetXMLParser::~vtkPointSetXMLParser ( )
overrideprotected

Member Function Documentation

◆ CharacterDataHandler()

void mitk::vtkPointSetXMLParser::CharacterDataHandler ( const char *  inData,
int  inLength 
)
override

Handler function which is called, if character data has been parsed by expat.

Parameters
inDataa char array containing the parsed string data
inLengththe length of the parsed data string.

◆ CleanupParser()

int mitk::vtkPointSetXMLParser::CleanupParser ( )
override

◆ EndElement()

void mitk::vtkPointSetXMLParser::EndElement ( const char *  name)
override

Handler function which is called, when a xml end-tag has been parsed.

◆ GetParsedPointSets()

virtual PointSetList mitk::vtkPointSetXMLParser::GetParsedPointSets ( )
virtual
Returns
the list of point sets which have been read from file. NOTE: your have to call the Parse() function, before this function.

◆ InitializeParser()

int mitk::vtkPointSetXMLParser::InitializeParser ( )
override

◆ New()

static vtkPointSetXMLParser* mitk::vtkPointSetXMLParser::New ( )
static

◆ ParsePointIdentifier()

virtual PointIdentifier mitk::vtkPointSetXMLParser::ParsePointIdentifier ( const std::string &  data)
virtual

Converts the given data to an PointIdentifier

◆ ParseScalarType()

virtual mitk::ScalarType mitk::vtkPointSetXMLParser::ParseScalarType ( const std::string &  data)
virtual

Converts the given data to mitk::ScalarType.

◆ StartElement()

void mitk::vtkPointSetXMLParser::StartElement ( const char *  name,
const char **  atts 
)
override

Handler function which is called, when a new xml start-tag has been parsed.

◆ vtkTypeMacro()

mitk::vtkPointSetXMLParser::vtkTypeMacro ( vtkPointSetXMLParser  ,
vtkXMLParser   
)

Member Data Documentation

◆ m_CurId

std::string mitk::vtkPointSetXMLParser::m_CurId
protected

Definition at line 118 of file vtkPointSetXMLParser.h.

◆ m_CurrentPoint

PointType mitk::vtkPointSetXMLParser::m_CurrentPoint
protected

The current point which is processed by the parser.

Definition at line 116 of file vtkPointSetXMLParser.h.

◆ m_CurrentPointId

PointIdentifier mitk::vtkPointSetXMLParser::m_CurrentPointId
protected

The current point id which is processed by the parser.

Definition at line 127 of file vtkPointSetXMLParser.h.

◆ m_CurrentPointSet

PointSetType::Pointer mitk::vtkPointSetXMLParser::m_CurrentPointSet
protected

The current point set which is processed by the parser.

Definition at line 110 of file vtkPointSetXMLParser.h.

◆ m_CurXString

std::string mitk::vtkPointSetXMLParser::m_CurXString
protected

Definition at line 119 of file vtkPointSetXMLParser.h.

◆ m_CurYString

std::string mitk::vtkPointSetXMLParser::m_CurYString
protected

Definition at line 120 of file vtkPointSetXMLParser.h.

◆ m_CurZString

std::string mitk::vtkPointSetXMLParser::m_CurZString
protected

Definition at line 121 of file vtkPointSetXMLParser.h.

◆ m_ParseStack

ParseStack mitk::vtkPointSetXMLParser::m_ParseStack
protected

A stack containing the parsed start-tags. If an end tag is encountered, it is matched with the top element of the stack.

Definition at line 99 of file vtkPointSetXMLParser.h.

◆ m_PointSetList

PointSetList mitk::vtkPointSetXMLParser::m_PointSetList
protected

Contains the parsed point sets.

Definition at line 104 of file vtkPointSetXMLParser.h.

◆ m_PreviousLocale

std::locale mitk::vtkPointSetXMLParser::m_PreviousLocale
protected

Definition at line 129 of file vtkPointSetXMLParser.h.


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