46 #ifndef ORR_OCTREE_ZPROJECTION_H_
47 #define ORR_OCTREE_ZPROJECTION_H_
49 #include "orr_octree.h"
50 #include <pcl/pcl_exports.h>
75 z1 ()
const {
return z1_;}
78 z2 ()
const {
return z2_;}
93 : nodes_ (compare_nodes_z), x_ (x), y_ (y)
105 inline std::set<ORROctree::Node*, bool(*)(ORROctree::Node*,ORROctree::Node*)>&
115 std::set<ORROctree::Node*, bool(*)(ORROctree::Node*,ORROctree::Node*)>
nodes_;
127 build (
const ORROctree& input,
float eps_front,
float eps_back);
135 x =
static_cast<int> ((p[0] - bounds_[0])*inv_pixel_size_);
136 y =
static_cast<int> ((p[1] - bounds_[2])*inv_pixel_size_);
142 int x, y; this->getPixelCoordinates (p, x, y);
144 if ( x < 0 || x >= num_pixels_x_ )
return (NULL);
145 if ( y < 0 || y >= num_pixels_y_ )
return (NULL);
147 return (pixels_[x][y]);
153 int x, y; this->getPixelCoordinates (p, x, y);
155 if ( x < 0 || x >= num_pixels_x_ )
return (NULL);
156 if ( y < 0 || y >= num_pixels_y_ )
return (NULL);
158 return (pixels_[x][y]);
161 inline const std::set<ORROctree::Node*, bool(*)(ORROctree::Node*,ORROctree::Node*)>*
164 int x, y; this->getPixelCoordinates (p, x, y);
166 if ( x < 0 || x >= num_pixels_x_ )
return (NULL);
167 if ( y < 0 || y >= num_pixels_y_ )
return (NULL);
172 return (&sets_[x][y]->get_nodes ());
175 inline std::list<Pixel*>&
181 return pixels_[i][j];
200 num_x = num_pixels_x_;
201 num_y = num_pixels_y_;
205 float pixel_size_, inv_pixel_size_, bounds_[4], extent_x_, extent_y_;
void insert(ORROctree::Node *leaf)
That's a very specialized and simple octree class.
std::list< Set * > full_sets_
const float * getBounds() const
const Pixel * getPixel(const float *p) const
std::list< Pixel * > & getFullPixels()
Pixel * getPixel(const float *p)
const Pixel * getPixel(int i, int j) const
std::list< Pixel * > full_pixels_
static bool compare_nodes_z(ORROctree::Node *node1, ORROctree::Node *node2)
std::set< ORROctree::Node *, bool(*)(ORROctree::Node *, ORROctree::Node *)> & get_nodes()
float getPixelSize() const
virtual ~ORROctreeZProjection()
const std::set< ORROctree::Node *, bool(*)(ORROctree::Node *, ORROctree::Node *)> * getOctreeNodes(const float *p) const
void getPixelCoordinates(const float *p, int &x, int &y) const
void getNumberOfPixels(int &num_x, int &num_y) const
Get the width ('num_x') and height ('num_y') of the image.
std::set< ORROctree::Node *, bool(*)(ORROctree::Node *, ORROctree::Node *)> nodes_