SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase Class Referenceabstract

Delegate to read Octrees from ply files, this is the abstract base class, to let us modify loading by datatype. More...

`#include <SurgSim/DataStructures/OctreeNodePlyReaderDelegate.h>`

Inheritance diagram for SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase:

## Classes

struct | BoundsData
| Data Structure to receive the bounds information. More...
struct | DimensionData
| Data structure to receive the dimension information from the file. More...
struct | SpacingData
| Data structure to receive the spacing information from the file. More...
struct | VoxelData
| Data structure to receive the specific voxel information from the file. More...

## Public Member Functions

| OctreeNodePlyReaderDelegateBase ()
| Constructor. More...
virtual | ~OctreeNodePlyReaderDelegateBase ()
| Destructor. More...
bool | registerDelegate (PlyReader *reader) override
| Registers the delegate with the reader. More...
bool | fileIsAcceptable (const PlyReader &reader) override
| Check whether the file in the reader can be used with this delegate, this gives the delegate a chance to make sure that all the elements and properties that are required are available in the file encapsulated by the reader. More...
void * | beginBounds (const std::string &elementName, size_t count)
| Callback function, begin the processing of the bounds. More...
void * | beginDimension (const std::string &elementName, size_t count)
| Callback function, begin the processing of the dimension. More...
void * | beginSpacing (const std::string &elementName, size_t count)
| Callback function, begin the processing of the bounds. More...
virtual void * | beginVoxel (const std::string &elementName, size_t count)
| Callback function, begin the processing of the voxels. More...
virtual void | processVoxel (const std::string &elementName)=0
| Callback function to process one voxel. More...
Public Member Functions inherited from SurgSim::DataStructures::PlyReaderDelegate
virtual | ~PlyReaderDelegate ()
| Virtual destructor. More...

## Protected Member Functions

virtual void | initializeOctree ()=0
| Set up the octree, this is left up to the derived classes. More...

## Protected Attributes

struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::BoundsData | m_bounds
Eigen::AlignedBox< double, 3 > | m_boundingBox
| Bounding box, will be initialized from the file. More...
struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::SpacingData | m_spacing
struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::DimensionData | m_dimension
struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::VoxelData | m_voxel
int | m_numLevels
| Calculated number of levels for the octree. More...
bool | m_haveSpacing
bool | m_haveDimensions
bool | m_haveBounds

## Detailed Description

Delegate to read Octrees from ply files, this is the abstract base class, to let us modify loading by datatype.

## Constructor & Destructor Documentation

## OctreeNodePlyReaderDelegateBase()

SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::OctreeNodePlyReaderDelegateBase | ( |  | ) |

Constructor.

## ~OctreeNodePlyReaderDelegateBase()

SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::~OctreeNodePlyReaderDelegateBase | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## beginBounds()

void * SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::beginBounds | ( | const std::string & | elementName,
|  | size_t | count
| ) |  |

Callback function, begin the processing of the bounds.

Parameters

  elementName | Name of the element.
  count | Number of entries.

Exceptions

  SurgSim::Framework::AssertionFailure | if count != 1, only one bounds entry is expected

Returns
  memory for bounds data to the reader.

## beginDimension()

void * SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::beginDimension | ( | const std::string & | elementName,
|  | size_t | count
| ) |  |

Callback function, begin the processing of the dimension.

Parameters

  elementName | Name of the element.
  count | Number of entries.

Exceptions

  SurgSim::Framework::AssertionFailure | if count != 1, only one dimesion entry is expected

Returns
  memory for dimension data to the reader.

## beginSpacing()

void * SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::beginSpacing | ( | const std::string & | elementName,
|  | size_t | count
| ) |  |

Callback function, begin the processing of the bounds.

Parameters

  elementName | Name of the element.
  count | Number of entries.

Exceptions

  SurgSim::Framework::AssertionFailure | if count != 1, only one spacing entry is expected

Returns
  memory for spacing data to the reader.

## beginVoxel()

void * SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::beginVoxel | ( | const std::string & | elementName,
|  | size_t | count
| ) |  |

virtual

Callback function, begin the processing of the voxels.

Parameters

  elementName | Name of the element.
  count | Number of bounds entry.

Returns
  memory for voxel data to the reader.

## fileIsAcceptable()

bool SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::fileIsAcceptable | ( | const PlyReader & | reader | ) |

override virtual

Check whether the file in the reader can be used with this delegate, this gives the delegate a chance to make sure that all the elements and properties that are required are available in the file encapsulated by the reader.

Implements SurgSim::DataStructures::PlyReaderDelegate.

## initializeOctree()

virtual void SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::initializeOctree | ( |  | ) |

protected pure virtual

Set up the octree, this is left up to the derived classes.

Implemented in SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >.

## processVoxel()

virtual void SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::processVoxel | ( | const std::string & | elementName | ) |

pure virtual

Callback function to process one voxel.

This is left up to the subclasses, they might have to deal with data specific processing

Parameters

  elementName | Name of the element.

Implemented in SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >.

## registerDelegate()

bool SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::registerDelegate | ( | PlyReader * | reader | ) |

override virtual

Registers the delegate with the reader.

Parameters

  [out] | reader | The reader that should be used by the delegate.

Returns
  true usually if the reader is valid and fileIsAcceptable() is true.

Implements SurgSim::DataStructures::PlyReaderDelegate.

## Member Data Documentation

## m_boundingBox

Eigen::AlignedBox<double, 3> SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_boundingBox

protected

Bounding box, will be initialized from the file.

## m_bounds

struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::BoundsData SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_bounds

protected

## m_dimension

struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::DimensionData SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_dimension

protected

## m_haveBounds

bool SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_haveBounds

protected

Check wether we actually received the appropriate information, if not we can't initialize the octree

## m_haveDimensions

bool SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_haveDimensions

protected

Check wether we actually received the appropriate information, if not we can't initialize the octree

## m_haveSpacing

bool SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_haveSpacing

protected

Check wether we actually received the appropriate information, if not we can't initialize the octree

## m_numLevels

int SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_numLevels

protected

Calculated number of levels for the octree.

## m_spacing

struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::SpacingData SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_spacing

protected

## m_voxel

struct SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::VoxelData SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase::m_voxel

protected

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

- SurgSim/DataStructures/OctreeNodePlyReaderDelegate.h
- SurgSim/DataStructures/OctreeNodePlyReaderDelegate.cpp