opensurgsim
Public Member Functions | List of all members
SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data > Class Template Reference

Subclass the OctreeNodePLyReaderDelegateBase class to enable processing of the templated data, this should be specialized to enable specific processing of various extended node types. More...

#include <OctreeNodePlyReaderDelegate.h>

Inheritance diagram for SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >:
SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase SurgSim::DataStructures::PlyReaderDelegate

Public Member Functions

 OctreeNodePlyReaderDelegate ()
 Constructor.
 
 OctreeNodePlyReaderDelegate (std::shared_ptr< OctreeNode< Data >> octree)
 Constructor. More...
 
virtual ~OctreeNodePlyReaderDelegate ()
 Destructor.
 
std::shared_ptr< OctreeNode< Data > > getOctree ()
 
void processVoxel (const std::string &elementName) override
 Callback function to process one voxel. More...
 
void initializeOctree () override
 Set up the octree, this is left up to the derived classes.
 
- Public Member Functions inherited from SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase
 OctreeNodePlyReaderDelegateBase ()
 Constructor.
 
virtual ~OctreeNodePlyReaderDelegateBase ()
 Destructor.
 
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.
 
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...
 
- Public Member Functions inherited from SurgSim::DataStructures::PlyReaderDelegate
virtual ~PlyReaderDelegate ()
 Virtual destructor.
 

Additional Inherited Members

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

Detailed Description

template<typename Data>
class SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >

Subclass the OctreeNodePLyReaderDelegateBase class to enable processing of the templated data, this should be specialized to enable specific processing of various extended node types.

Template Parameters
DataThe data the should be inside the Octree, needs to be default constructable

Constructor & Destructor Documentation

§ OctreeNodePlyReaderDelegate()

template<typename Data >
SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >::OctreeNodePlyReaderDelegate ( std::shared_ptr< OctreeNode< Data >>  octree)
explicit

Constructor.

Parameters
octreeread the data into this octree

Member Function Documentation

§ getOctree()

template<typename Data >
std::shared_ptr< OctreeNode< Data > > SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >::getOctree ( )
Returns
the octree

§ processVoxel()

template<typename Data >
void SurgSim::DataStructures::OctreeNodePlyReaderDelegate< Data >::processVoxel ( const std::string &  elementName)
overridevirtual

Callback function to process one voxel.

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

Parameters
elementNameName of the element.

Implements SurgSim::DataStructures::OctreeNodePlyReaderDelegateBase.


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