3D Forest
Software for analysis of Lidar data from forest environment.
IndexFile Class Reference

#include <IndexFile.hpp>

Classes

struct  BuildNode
 
struct  Node
 
struct  Selection
 
struct  SelectionTile
 

Public Member Functions

 IndexFile ()
 
 ~IndexFile ()
 
void clear ()
 
void translate (const Vector3< double > &v)
 
const Box< double > & boundary () const
 
const Box< double > & boundaryPoints () const
 
size_t size () const
 
bool empty () const
 
void selectLeaves (std::vector< SelectionTile > &selection, const Box< double > &window, size_t datasetId, size_t tileId) const
 
void selectLeaves (std::vector< Selection > &selection, const Box< double > &window, size_t id) const
 
void selectNodes (std::vector< Selection > &selection, const Box< double > &window, size_t id) const
 
const NodeselectNode (std::map< const Node *, uint64_t > &used, double x, double y, double z) const
 
const NodeselectLeaf (double x, double y, double z) const
 
const Noderoot () const
 
const Nodenext (const Node *node, size_t idx) const
 
const Nodeprev (const Node *node) const
 
const Nodeat (size_t idx) const
 
Nodeat (size_t idx)
 
Box< double > boundary (const Node *node, const Box< double > &box) const
 
void read (const std::string &path)
 
void read (const std::string &path, uint64_t offset)
 
void read (ChunkFile &file)
 
void readPayload (ChunkFile &file, const ChunkFile::Chunk &chunk)
 
void write (const std::string &path) const
 
void write (ChunkFile &file) const
 
void insertBegin (const Box< double > &boundary, const Box< double > &boundaryPoints, size_t maxSize, size_t maxLevel=0, bool insertOnlyToLeaves=false)
 
uint64_t insert (double x, double y, double z)
 
void insertEnd ()
 

Static Public Attributes

static const uint32_t CHUNK_TYPE = 0x38584449U
 

Protected Member Functions

void selectLeaves (std::vector< SelectionTile > &selection, const Box< double > &window, const Box< double > &boundary, size_t datasetId, size_t tileId, size_t idx) const
 
void selectLeaves (std::vector< Selection > &idxList, const Box< double > &window, const Box< double > &boundary, size_t idx, size_t id) const
 
void selectNodes (std::vector< Selection > &idxList, const Box< double > &window, const Box< double > &boundary, size_t idx, size_t id) const
 
const NodeselectNode (std::map< const Node *, uint64_t > &used, double x, double y, double z, const Box< double > &boundary, size_t idx) const
 
const NodeselectLeaf (double x, double y, double z, const Box< double > &boundary, size_t idx) const
 
void divide (Box< double > &boundary, double x, double y, double z, uint64_t code) const
 
uint64_t insertEndToLeaves (Node *data, BuildNode *node, uint32_t prev, uint32_t &idx, uint64_t &from)
 
size_t countNodes () const
 
size_t countNodes (BuildNode *node) const
 

Protected Attributes

Box< double > boundary_
 
Box< double > boundaryFile_
 
Box< double > boundaryPoints_
 
Box< double > boundaryPointsFile_
 
std::vector< Nodenodes_
 
std::shared_ptr< BuildNoderoot_
 
size_t maxSize_
 
size_t maxLevel_
 
bool insertOnlyToLeaves_
 

Friends

void toJson (Json &out, const IndexFile &in)
 

Constructor & Destructor Documentation

◆ IndexFile()

IndexFile::IndexFile ( )

◆ ~IndexFile()

IndexFile::~IndexFile ( )

Member Function Documentation

◆ at() [1/2]

Node * IndexFile::at ( size_t idx)
inline

◆ at() [2/2]

◆ boundary() [1/2]

const Box< double > & IndexFile::boundary ( ) const
inline

◆ boundary() [2/2]

Box< double > IndexFile::boundary ( const Node * node,
const Box< double > & box ) const

◆ boundaryPoints()

const Box< double > & IndexFile::boundaryPoints ( ) const
inline

Referenced by insertBegin().

◆ clear()

void IndexFile::clear ( )

◆ countNodes() [1/2]

size_t IndexFile::countNodes ( ) const
protected

Referenced by countNodes(), countNodes(), and insertEnd().

◆ countNodes() [2/2]

size_t IndexFile::countNodes ( BuildNode * node) const
protected

◆ divide()

void IndexFile::divide ( Box< double > & boundary,
double x,
double y,
double z,
uint64_t code ) const
protected

◆ empty()

bool IndexFile::empty ( ) const
inline

◆ insert()

uint64_t IndexFile::insert ( double x,
double y,
double z )

◆ insertBegin()

void IndexFile::insertBegin ( const Box< double > & boundary,
const Box< double > & boundaryPoints,
size_t maxSize,
size_t maxLevel = 0,
bool insertOnlyToLeaves = false )

◆ insertEnd()

void IndexFile::insertEnd ( )

◆ insertEndToLeaves()

uint64_t IndexFile::insertEndToLeaves ( Node * data,
BuildNode * node,
uint32_t prev,
uint32_t & idx,
uint64_t & from )
protected

Referenced by insertEnd(), and insertEndToLeaves().

◆ next()

const IndexFile::Node * IndexFile::next ( const Node * node,
size_t idx ) const

Referenced by boundary(), and write().

◆ prev()

const IndexFile::Node * IndexFile::prev ( const Node * node) const

◆ read() [1/3]

void IndexFile::read ( ChunkFile & file)

◆ read() [2/3]

void IndexFile::read ( const std::string & path)

Referenced by read(), read(), and PageData::readPage().

◆ read() [3/3]

void IndexFile::read ( const std::string & path,
uint64_t offset )

◆ readPayload()

void IndexFile::readPayload ( ChunkFile & file,
const ChunkFile::Chunk & chunk )

Referenced by read().

◆ root()

const IndexFile::Node * IndexFile::root ( ) const

Referenced by prev().

◆ selectLeaf() [1/2]

const IndexFile::Node * IndexFile::selectLeaf ( double x,
double y,
double z ) const

Referenced by selectLeaf(), and selectLeaf().

◆ selectLeaf() [2/2]

const IndexFile::Node * IndexFile::selectLeaf ( double x,
double y,
double z,
const Box< double > & boundary,
size_t idx ) const
protected

◆ selectLeaves() [1/4]

void IndexFile::selectLeaves ( std::vector< Selection > & idxList,
const Box< double > & window,
const Box< double > & boundary,
size_t idx,
size_t id ) const
protected

◆ selectLeaves() [2/4]

void IndexFile::selectLeaves ( std::vector< Selection > & selection,
const Box< double > & window,
size_t id ) const

◆ selectLeaves() [3/4]

void IndexFile::selectLeaves ( std::vector< SelectionTile > & selection,
const Box< double > & window,
const Box< double > & boundary,
size_t datasetId,
size_t tileId,
size_t idx ) const
protected

◆ selectLeaves() [4/4]

void IndexFile::selectLeaves ( std::vector< SelectionTile > & selection,
const Box< double > & window,
size_t datasetId,
size_t tileId ) const

◆ selectNode() [1/2]

const IndexFile::Node * IndexFile::selectNode ( std::map< const Node *, uint64_t > & used,
double x,
double y,
double z ) const

◆ selectNode() [2/2]

const IndexFile::Node * IndexFile::selectNode ( std::map< const Node *, uint64_t > & used,
double x,
double y,
double z,
const Box< double > & boundary,
size_t idx ) const
protected

◆ selectNodes() [1/2]

void IndexFile::selectNodes ( std::vector< Selection > & idxList,
const Box< double > & window,
const Box< double > & boundary,
size_t idx,
size_t id ) const
protected

◆ selectNodes() [2/2]

void IndexFile::selectNodes ( std::vector< Selection > & selection,
const Box< double > & window,
size_t id ) const

Referenced by selectNodes(), and selectNodes().

◆ size()

size_t IndexFile::size ( ) const
inline

◆ translate()

void IndexFile::translate ( const Vector3< double > & v)

Referenced by PageData::readPage().

◆ write() [1/2]

void IndexFile::write ( ChunkFile & file) const

◆ write() [2/2]

void IndexFile::write ( const std::string & path) const

Friends And Related Symbol Documentation

◆ toJson

void toJson ( Json & out,
const IndexFile & in )
friend

Member Data Documentation

◆ boundary_

◆ boundaryFile_

Box<double> IndexFile::boundaryFile_
protected

◆ boundaryPoints_

Box<double> IndexFile::boundaryPoints_
protected

◆ boundaryPointsFile_

Box<double> IndexFile::boundaryPointsFile_
protected

◆ CHUNK_TYPE

const uint32_t IndexFile::CHUNK_TYPE = 0x38584449U
static

Signature "IDX8".

Referenced by readPayload(), and write().

◆ insertOnlyToLeaves_

bool IndexFile::insertOnlyToLeaves_
protected

Referenced by insert(), insertBegin(), and insertEnd().

◆ maxLevel_

size_t IndexFile::maxLevel_
protected

Referenced by insert(), and insertBegin().

◆ maxSize_

size_t IndexFile::maxSize_
protected

Referenced by insert(), and insertBegin().

◆ nodes_

◆ root_

std::shared_ptr<BuildNode> IndexFile::root_
protected

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