49 #ifndef _MIRA_DISTANCELUT_H_ 50 #define _MIRA_DISTANCELUT_H_ 53 #include <boost/thread/mutex.hpp> 144 #if BOOST_VERSION < 105300 170 mArrayPtr(array), mData(data), mStride(stride), mRegion(region) {}
178 int getXmin()
const {
return mRegion.minCorner.x(); }
181 int getXmax()
const {
return mRegion.maxCorner.x(); }
184 int getYmin()
const {
return mRegion.minCorner.y(); }
187 int getYmax()
const {
return mRegion.maxCorner.y(); }
203 return mData + y*mStride + x;
211 return mData + y*mStride + getXmin();
219 return mData + y*mStride + getXmax()+1;
243 void ensureRegion(
const Rect2i& region);
264 void createLUT(
int width,
int subdivisions);
274 void computeLUT(
int width,
int subdivisions);
286 std::vector<CellDistArrayPtr> mLUT;
This class creates a look up table (LUT) to calculate the minimum and maximum Euclidean distance betw...
Definition: DistanceLUT.h:122
A struct to store the minimal and maximal distance of the cell towards the center point...
Definition: DistanceLUT.h:138
boost::shared_ptr< CellDist > CellDistArrayPtr
Definition: DistanceLUT.h:146
int getXmin() const
Returns the minimum x-boundary.
Definition: DistanceLUT.h:178
iterator begin(int y) const
Returns line iterator starting in the specified line.
Definition: DistanceLUT.h:210
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Class for 2D, 3D and N-dimensional points.
Provided for convenience.
Definition: Singleton.h:564
int getXmax() const
Returns the maximum x-boundary.
Definition: DistanceLUT.h:181
int getYmax() const
Returns the maximum y-boundary.
Definition: DistanceLUT.h:187
const CellDist * iterator
the class's iterator type
Definition: DistanceLUT.h:142
float minDist
Definition: DistanceLUT.h:139
int getWidth() const
Returns the region's width.
Definition: DistanceLUT.h:190
A singleton class that can be freely configured using policies that control the creation, instantiation, lifetime and thread-safety.
Region(CellDistArrayPtr array, CellDist *data, int stride, const Rect2i ®ion)
The constructor of the region.
Definition: DistanceLUT.h:169
Provides multidimensional rectangle templates.
Provides a view on a portion of the Distance LUT and can be obtained by calling DistanceLUT::getRegio...
Definition: DistanceLUT.h:158
const Rect2i & getRect() const
Returns a Rect containing the boundaries of this region.
Definition: DistanceLUT.h:175
int getYmin() const
Returns the minimum y-boundary.
Definition: DistanceLUT.h:184
iterator end(int y) const
Returns end iterator for the specified line.
Definition: DistanceLUT.h:218
int getHeight() const
Returns the region's height.
Definition: DistanceLUT.h:193
iterator getIterator(int x, int y) const
Returns an iterator to the given cell.
Definition: DistanceLUT.h:202