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) {}
203 return mData + y*mStride + x;
211 return mData + y*mStride +
getXmin();
219 return mData + y*mStride +
getXmax()+1;
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
~DistanceLUT()
The destructor.
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.
float maxDist
Definition: DistanceLUT.h:139
Provided for convenience.
Definition: Singleton.h:528
PointType minCorner
Definition: Rect.h:445
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
Region getRegion(const Point2f &d, const Rect2i ®ion)
This function returns a portion of the LUT with cells containing the min and max distance to the give...
PointType maxCorner
Definition: Rect.h:446
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
DistanceLUT()
Creates a DistanceLUT with a default width of 1000 and 5 subdivisions.
void ensureRegion(const Rect2i ®ion)
Can be called to ensure, that the specified region in the LUT is available and valid.
iterator getIterator(int x, int y) const
Returns an iterator to the given cell.
Definition: DistanceLUT.h:202