Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ROI.hh
1 /* This file is part of the BIAS library (Basic ImageAlgorithmS).
2 
3  Copyright (C) 2003-2009 (see file CONTACT for details)
4  Multimediale Systeme der Informationsverarbeitung
5  Institut fuer Informatik
6  Christian-Albrechts-Universitaet Kiel
7 
8  BIAS is free software; you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as published by
10  the Free Software Foundation; either version 2.1 of the License, or
11  (at your option) any later version.
12 
13  BIAS is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License
19  along with BIAS; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/
21 #ifndef __ROI_hh__
22 #define __ROI_hh__
23 
24 #include <Base/Common/BIASpragmaStart.hh>
25 
26 #include <Base/Debug/Debug.hh>
27 #include <Base/Debug/Error.hh>
28 #include <Base/Debug/Exception.hh>
29 #include <iostream>
30 #include <vector>
31 #include <cmath>
32 
33 #define ROI_VERSION_NUMBER 200
34 
35 namespace BIAS {
36 
37  // forward declaration to avoid mutual inclusion
38  class ImageBase;
39 
41 
42  BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const enum ERoiType& type);
43 
44  /** @class Position
45  @ingroup g_image_base
46  @brief stores valid/nvalid positions in image
47 
48  @author woelk 07/2005 */
49  class BIASImageBase_EXPORT Position
50  {
51  public:
52  Position() : x(0), y(0) {};
53  Position(unsigned xx, unsigned yy) : x(xx), y(yy) {};
54  Position(const Position &pos) { *this = pos; }
55 
56  ~Position() {};
57 
58  /// assignment operator
59  Position& operator=(const Position& p) { x=p.x; y=p.y; return *this; }
60 
61  /// comparison, needed for sorting
62  bool operator<(const Position& p) const
63  { return (y==p.y)?(x<p.x):(y<p.y); }
64  /// comparison
65  bool operator!=(const Position& p) const
66  { return (y!=p.y)||(x!=p.x); }
67 
68  friend BIASImageBase_EXPORT
69  std::ostream& operator<<(std::ostream& os, const Position &pos);
70 
71  /// member variables
72  unsigned x, y;
73  };
74 
75  /** @class ROI
76  @ingroup g_image_base
77  @brief class for handling different region of interest (ROI)
78  representations...
79 
80  The ROI class usually is member of an ImageBase and is stored together
81  with the ImageBase. If an ImageBase is written to disk in the binary mip
82  format, the ROI member is also automatically written in the same file.
83 
84  Flags indication the validity of the single representations exist within
85  the ROI class.
86 
87  Right now, three different representations are possible:
88  - \b Corner representation:
89  The corner representation represents a rectangular ROI. The corner
90  representation holds upper left and lower right corners defining a
91  rectangular roi region. The upper left corner is included in the roi
92  while the lower right corner is excluded from the roi. When ROI belongs
93  to image and no roi is set, upper left corner is (0, 0) and lower right
94  corner is given by (width, height). The corner representation is always
95  valid.
96  - \b Map representations:
97  If the ROI belongs to an ImageBase, the MapData() and MapDataArray()
98  must be of the same size as the Image. This is usually nesured by the
99  ImageBase.Init() functions. The MapData() is of Type unsigned char.
100  A value of 0 mneans not belonging to ROI, while any other value means
101  belonging to ROI.
102  - \b Vector representation:
103  Every position in the vector belongs to roi, while every position not
104  in the vector does not belong to the ROI. The VectorValid() flag
105  indicates the validity of the vector entries.
106  - \b Row representation:
107  A start and an endn point ist stored fro each image row. It is thus
108  possible to store a convex ROI very memory efficient
109 
110  The ROI class can later on be expanded in a way, that the vector does
111  not only hold positions, but maybe somthing like more complex mask
112  patches...
113 
114  \todo TODO change ROI memebr in ImageBase to pointer to:
115  - share a ROI between multiple images
116 
117  @author woelk 07/2005 redesign woelk 02/2008 (c) www.vision-n.de */
118  class BIASImageBase_EXPORT ROI : public Debug
119  {
120  public:
121  /** @name construction and destruction
122  @{ */
123 
124  /// destructor
125  ~ROI();
126 
127  /// str. constructor
128  ROI();
129 
130  /// @brief calls operator=
131  ROI(const ROI& roi);
132 
133  /** Deletes internal memory, sets mask and vector invalid.
134  @author woelk 07/2005 */
135  void Release();
136 
137  /** Resizes parent image. Unsets region of interest!
138  @author woelk 07/2005 */
139  void Resize(unsigned width, unsigned height);
140 
141  /** @brief Delete region of interest.
142  @author woelk 07/2005 **/
143  void UnsetROI();
144 
145  /// assignment operator
146  ROI& operator=(const ROI& roi);
147 
148  /// alloc and free of internal memory
149  void SetROIType(const enum ERoiType& type);
150 
151  /// comparison
152  bool operator==(const ROI& roi) const;
153  inline bool operator!=(const ROI& roi) const
154  { return !operator==(roi); }
155 
156  //@}
157 
158  /** @name access function
159  @{ */
160 
161  /** @brief Sets a rectangular region of interest
162  * @param [in] UpperLeftX,UpperLeftY: first corner (x,y) of ROI (start), included in ROI
163  * @param [in] LowerRightX,LowerRightY: lower right corner (x,y) of ROI (end), NOT included in ROI
164  * @attention LowerRightX and LowerRightY are not included in the ROI, this is correct per definition!
165  * @author woelk 07/2005 */
166  int SetCorners(unsigned UpperLeftX, unsigned UpperLeftY,
167  unsigned LowerRightX, unsigned LowerRightY);
168 
169  /** @brief Return the region of interest, by saving the
170  * coordinates within the variables defined by the parameters
171  * @param [out] UpperLeftX,UpperLeftY: first corner (x,y) of ROI (start), included in ROI
172  * @param [out] LowerRightX,LowerRightY: lower right corner (x,y) of ROI (end), NOT included in ROI
173  * @author woelk 07/2005 */
174  inline void GetCorners(unsigned &UpperLeftX, unsigned &UpperLeftY,
175  unsigned &LowerRightX,
176  unsigned &LowerRightY) const;
177  /** @brief Return the region of interest, by saving the
178  * coordinates within the variables defined by the parameters
179  * @param [out] UpperLeftX,UpperLeftY: first corner (x,y) of ROI (start), included in ROI
180  * @param [out] LowerRightX,LowerRightY: lower right corner (x,y) of ROI (end), NOT included in ROI
181  * @author woelk 07/2005 */
182  inline void GetCorners(int& UpperLeftX, int& UpperLeftY,
183  int& LowerRightX, int& LowerRightY) const;
184 
185  /** @brief fetch individual ROI corner coordinate
186 
187  efficient inline access, used by BackwardMapping in most inner loop
188  @author koeser 08/2007 */
189  inline unsigned GetCornerUpperLeftX() const { return UpperLeftX_; }
190 
191  /** @brief fetch individual ROI corner coordinate
192 
193  efficient inline access, used by BackwardMapping in most inner loop
194  @author koeser 08/2007 */
195  inline unsigned GetCornerUpperLeftY() const { return UpperLeftY_; }
196 
197  /** @brief fetch individual ROI corner coordinate
198 
199  efficient inline access, used by BackwardMapping in most inner loop
200  @author koeser 08/2007 */
201  inline unsigned GetCornerLowerRightX() const { return LowerRightX_; }
202 
203  /** @brief fetch individual ROI corner coordinate
204 
205  efficient inline access, used by BackwardMapping in most inner loop
206  @author koeser 08/2007 */
207  inline unsigned GetCornerLowerRightY() const { return LowerRightY_; }
208 
209  /** @brief ROI check if pixel position is inside the ROI */
210  inline bool IsInROI(const double& x, const double& y) const;
211 
212  /** @brief ROI check if rectangular window is inside the ROI
213  @attention Tests if right bottom corner is also included in the ROI! */
214  inline bool IsInROI(const double& left, const double& top,
215  const double& right, const double& bottom) const;
216 
217  /** returns an image of StorageType unsigned char, where every
218  pixel not in the ROI is set to UCHAR_MAX and every other pixel to 0
219  @author woelk 07/2005 */
220  int GetMaskImage(ImageBase& im) const;
221 
222  /** every pixel with value==0.0 is in the ROI, every pixel with
223  value!=0.0 is not in the ROI
224  @author woelk 07/2005 */
225  int SetMaskImage(const ImageBase& im);
226 
227  /** Direct access to the mask data
228  @author woelk 07/2005 */
229  void SetMask(const unsigned& x, const unsigned& y, const bool val);
230 
231  /** Direct access to the mask data, const version
232  @author woelk 07/2005 */
233  bool Mask(const unsigned& x, const unsigned& y) const;
234 
235  /** Sets MaskValid_=false and VectorValid_=true.
236  Copies pos -> Vector_.
237  Sorts Vector_.
238  @author woelk 07/2005 */
239  void SetVector(std::vector<Position>& pos);
240 
241  /// returns a pointer to the vector representation of the ROI
242  inline std::vector<Position>* GetVector()
243  { if (RoiType_!=ROI_Points) return NULL; return &Vector_; }
244 
245  /** get a copy of mask vector. Returns true if vector is valid
246  @author woelk 07/2005 */
247  bool GetVector(std::vector<Position>& vec) const;
248 
249  /// width capacity of roi (image width)
250  inline unsigned GetWidth() const
251  { return Width_; }
252 
253  /// height capacity of roi (image height)
254  inline unsigned GetHeight() const
255  { return Height_; }
256 
257  /** Horizontal start and end position per image row, the length of the
258  vectors always corresponds to the image height. When no pixels in a
259  certain row y are located inside the roi, both start[y] and end[y]
260  are zero. */
261  inline bool GetRows(std::vector<unsigned>& start,
262  std::vector<unsigned>& end) const
263  { start = RowStart_; end = RowEnd_; return (RoiType_==ROI_Rows); }
264 
265  /** Horizontal start and end position per image row, the length of the
266  vectors always corresponds to the image height. When no pixels in a
267  certain row y are located inside the roi, both start[y] and end[y]
268  are zero. */
269  void SetRows(const std::vector<unsigned>& start,
270  const std::vector<unsigned>& end);
271 
272  //@}
273 
274  /** @name interpolation
275  @{ */
276 
277  /** @brief Check if subpixel position (x,y) in ROI is valid for bilinear
278  interpolation (i.e. has 4 neighbors inside the ROI).
279  @author esquivel */
280  inline bool CheckBilinearInterpolation(const double x,
281  const double y) const;
282 
283  /** @brief Check if subpixel position (x,y) in ROI is valid for bicubic
284  interpolation (i.e. 4x4 window centered at (x,y) is inside the ROI).
285  @author esquivel */
286  inline bool CheckBicubicInterpolation(const double x,
287  const double y) const;
288 
289  /** @brief Get valid neighbor pixels in ROI for bilinear interpolation
290  at subpixel position (x,y).
291  @return Returns number of valid neighbors found in ROI (0 to 4).
292  @author esquivel */
293  inline int GetBilinearInterpolationNeighbors(const double x,
294  const double y,
295  std::vector<int> &nx,
296  std::vector<int> &ny) const;
297  //@}
298 
299  /** @name checking
300  @{ */
301 
302  /// is the mask image valid?
303  inline enum ERoiType GetROIType() const
304  { return RoiType_; }
305 
306  /// is the position vector valid?
307  inline bool MaskValid() const
308  { return (RoiType_==ROI_Mask); }
309 
310  /// is the position vector valid?
311  inline bool VectorValid() const
312  { return (RoiType_==ROI_Points); }
313 
314  /** Returns true if both ROIs have the same size.
315  Only the rectangular ROI as defined by the corners is validated.
316  @author woelk 07/2005 */
317  bool SameSize(const ROI& roi) const;
318 
319  //@}
320 
321  /** @name io functions
322  @{ */
323 
324  ///
325  friend BIASImageBase_EXPORT std::ostream&
326  operator<<(std::ostream& os, const ROI& roi);
327 
328  /** binary output to stream
329  @author woelk 07/2005 */
330  int WriteBinary(std::ostream& os) const;
331 
332  /** binary input from stream
333  @author woelk 07/2005 */
334  int ReadBinary(std::istream& is);
335 
336  //@}
337 
338  /** @name conversion functions
339  @{ */
340 
341  /** Generic conversion function from current ROI representation to the
342  given ROI representation.
343  @return Returns 0 if the conversion was successful, < 0 otherwise.
344  @author esquivel 01/2010
345  */
346  int ConvertROIType(const enum ERoiType& type);
347 
348  //@}
349 
350  void Erode(const ROI &src, const unsigned half_mask_size);
351 
352  protected:
353  /// which method is used to store the ROI
354  enum ERoiType RoiType_;
355  /// maximum dimension of roi data
356  unsigned Width_, Height_;
357 
358  /// internal data for ROI of type ROI_Corners
359  /// rectangular region of interest defined by upper left and lower right
360  /// corners. The upperleft corner is part of the rectangle, while the
361  /// lower is just outside
362  unsigned UpperLeftX_, UpperLeftY_;
363  unsigned LowerRightX_, LowerRightY_;
364 
365  /// internal data for ROI of type ROI_Mask
366  /// the mask data: Mask_[y*Width_+x] corresponds to pixel at (x,y)
367  /// a bool vector is used, because the bool std::vector is internally
368  /// stored as a bitfield
369  std::vector<bool> Mask_;
370 
371  /// internal data for ROI of type ROI_Points
372  /// Vector instance of ROI, always sorted from top left to bottom right
373  std::vector<Position> Vector_;
374 
375  /// internal data for ROI of type ROI_Rows
376  /// the ROI is specified by a min and a max value for each row in the image
377  std::vector<unsigned> RowStart_, RowEnd_;
378 
379  /// version number of ROI class
380  static const int Version_;
381 
382  /** @name internal conversion functions
383  @{ */
384 
385  /** Fills mask representation of ROI from corner representation */
386  int Corners2Mask_();
387 
388  /** Fills vector representation of ROI from corner representation */
389  int Corners2Vector_();
390 
391  /** Fills rows representation of ROI from corner representation */
392  int Corners2Rows_();
393 
394  /** Fills corner/bounding box representation of ROI from mask
395  representation. Returns 0 if mask is valid. */
396  int Mask2Corners_();
397 
398  /** Fills vector representation of ROI from mask representation.
399  Returns 0 if mask is valid. Sets VectorValid flag if maks is valid.
400  @author woelk 07/2005 */
401  int Mask2Vector_();
402 
403  /** Fills rows representation of ROI from mask representation. */
404  int Mask2Rows_();
405 
406  /** Fills corner/bounding box representation of ROI from vector
407  representation. Returns 0 if vector is valid.
408  @author woelk 07/2005 */
409  int Vector2Corners_();
410 
411  /** Fills vector representation of ROI from mask representation.
412  Returns 0 if vector is valid. Sets MaskValid flag if vector is valid.
413  @author woelk 07/2005 */
414  int Vector2Mask_();
415 
416  /** Fills rows representation of ROI from vector representation. */
417  int Vector2Rows_();
418 
419  /** Fills corner representation of ROI from rows representation. */
420  int Rows2Corners_();
421 
422  /** Fills mask representation of ROI from rows representation. */
423  int Rows2Mask_();
424 
425  /** Fills vector representation of ROI from rows representation. */
426  int Rows2Vector_();
427 
428  //@}
429 
430  }; // class
431 
432  /** human readable output operator for ROI, mainly for debugging
433  @author woelk 07/2005 */
434  BIASImageBase_EXPORT std::ostream&
435  operator<<(std::ostream& os, const ROI& roi);
436 
437 
438  ///////////////////////////////////////////////////////////////////////
439  // inline functions
440  ///////////////////////////////////////////////////////////////////////
441 
442  inline
443  void ROI::GetCorners(unsigned &UpperLeftX, unsigned &UpperLeftY,
444  unsigned &LowerRightX,unsigned &LowerRightY) const
445  {
446  UpperLeftX = UpperLeftX_;
447  UpperLeftY = UpperLeftY_;
448  LowerRightX = LowerRightX_;
449  LowerRightY = LowerRightY_;
450  }
451 
452  inline
453  void ROI::GetCorners(int& UpperLeftX, int& UpperLeftY,
454  int& LowerRightX, int& LowerRightY) const
455  {
456  UpperLeftX = (int)UpperLeftX_;
457  UpperLeftY = (int)UpperLeftY_;
458  LowerRightX = (int)LowerRightX_;
459  LowerRightY = (int)LowerRightY_;
460  }
461 # define rint(x) (floor(x+0.5))
462 
463  inline bool ROI::IsInROI(const double& x, const double& y) const
464  {
465  switch (RoiType_)
466  {
467  case ROI_Corners:
468  return (UpperLeftX_ <= x && (LowerRightX_-1) >= x &&
469  UpperLeftY_ <= y && (LowerRightY_-1) >= y);
470  break;
471  case ROI_Mask:
472  {
473  int iy = (int)rint(y);
474  int ix = (int)rint(x);
475  if (ix<0 || iy<0 || ix>=(int)Width_ || iy>=(int)Height_) return false;
476  return Mask((unsigned)ix, (unsigned)iy);
477  }
478  break;
479  case ROI_Points:
480  {
481  unsigned iy = (unsigned)rint(y);
482  unsigned ix = (unsigned)rint(x);
483  std::vector<Position>::const_iterator iter;
484  for (iter=Vector_.begin(); iter!=Vector_.end(); iter++){
485  if (iter->x==ix && iter->y==iy) return true;
486  }
487  return false;
488  }
489  break;
490  case ROI_Rows:
491  {
492  int iy = (int)rint(y);
493  if (iy<0 || iy>=(int)Height_) return false;
494  int ix = (int)rint(x);
495  return (ix>=(int)RowStart_[iy] && ix<(int)RowEnd_[iy]);
496  }
497  break;
498  default:
499  BEXCEPTION("Unknown ROI type "<<RoiType_<<" found");
500  break;
501  }
502  return false;
503  }
504 
505  inline bool ROI::IsInROI(const double& left, const double& top,
506  const double& right, const double& bottom) const
507  {
508  switch (RoiType_)
509  {
510  case ROI_Corners:
511  return (UpperLeftX_ <= left && (LowerRightX_-1) >= right &&
512  UpperLeftY_ <= top && (LowerRightY_-1) >= bottom);
513  break;
514  case ROI_Mask:
515  {
516  int il = (int)rint(left);
517  int it = (int)rint(top);
518  int ir = (int)rint(right);
519  int ib = (int)rint(bottom);
520  if (il<0 || it<0 || ir>=(int)Width_ || ib>=(int)Height_) return false;
521  for (register int iy = it; iy <= ib; iy++)
522  for (register int ix = il; ix <= ir; ix++)
523  if (!Mask((unsigned)ix, (unsigned)iy)) return false;
524  return true;
525  }
526  break;
527  case ROI_Points:
528  {
529  // TODO Does not work when ROI is allowed to contain points multiply!
530  unsigned il = (unsigned)rint(left);
531  unsigned it = (unsigned)rint(top);
532  unsigned ir = (unsigned)rint(right);
533  unsigned ib = (unsigned)rint(bottom);
534  int count = 0;
535  const int size = (ir-il+1)*(ib-it+1);
536  std::vector<Position>::const_iterator iter;
537  for (iter=Vector_.begin(); iter!=Vector_.end() && count<size; iter++) {
538  if (iter->x >= il && iter->x <= ir && iter->y >= it && iter->y <= ib)
539  count++;
540  }
541  return (count == size);
542  }
543  break;
544  case ROI_Rows:
545  {
546  int il = (int)rint(left);
547  int it = (int)rint(top);
548  int ir = (int)rint(right);
549  int ib = (int)rint(bottom);
550  if (it<0 || ib>=(int)Height_) return false;
551  for (register int iy = it; iy <= ib; iy++) {
552  if (il < (int)RowStart_[iy] || ir >= (int)RowEnd_[iy]) return false;
553  }
554  return true;
555  }
556  break;
557  default:
558  BEXCEPTION("Unknown ROI type "<<RoiType_<<" found");
559  break;
560  }
561  return false;
562  }
563 
564  inline bool ROI::
565  CheckBilinearInterpolation(const double x, const double y) const
566  {
567  return IsInROI(floor(x), floor(y), ceil(x), ceil(y));
568  }
569 
570  inline bool ROI::
571  CheckBicubicInterpolation(const double x, const double y) const
572  {
573  return IsInROI(floor(x)-1, floor(y)-1, floor(x)+2, floor(y)+2);
574  }
575 
576  inline int ROI::
577  GetBilinearInterpolationNeighbors(const double x, const double y,
578  std::vector<int> &nx,
579  std::vector<int> &ny) const
580  {
581  nx.clear();
582  ny.clear();
583  const int fx = floor(x);
584  const int cx = ceil(x);
585  const int fy = floor(y);
586  const int cy = ceil(y);
587  if (IsInROI(fx, fy)) { nx.push_back(fx); ny.push_back(fy); }
588  if (IsInROI(cx, fy)) { nx.push_back(cx); ny.push_back(fy); }
589  if (IsInROI(fx, cy)) { nx.push_back(fx); ny.push_back(cy); }
590  if (IsInROI(cx, cy)) { nx.push_back(cx); ny.push_back(cy); }
591  return int(nx.size());
592  }
593 
594 } // namespace
595 
596 #include <Base/Common/BIASpragmaEnd.hh>
597 
598 #endif // __ROI_hh__
~Position()
Definition: ROI.hh:56
stores valid/nvalid positions in image
Definition: ROI.hh:49
class for handling different region of interest (ROI) representations...
Definition: ROI.hh:118
Position(const Position &pos)
Definition: ROI.hh:54
void GetCorners(unsigned &UpperLeftX, unsigned &UpperLeftY, unsigned &LowerRightX, unsigned &LowerRightY) const
Return the region of interest, by saving the coordinates within the variables defined by the paramete...
Definition: ROI.hh:443
std::vector< bool > Mask_
internal data for ROI of type ROI_Mask the mask data: Mask_[y*Width_+x] corresponds to pixel at (x...
Definition: ROI.hh:369
int GetBilinearInterpolationNeighbors(const double x, const double y, std::vector< int > &nx, std::vector< int > &ny) const
Get valid neighbor pixels in ROI for bilinear interpolation at subpixel position (x,y).
Definition: ROI.hh:577
unsigned x
member variables
Definition: ROI.hh:72
bool operator<(const Position &p) const
comparison, needed for sorting
Definition: ROI.hh:62
bool Mask(const unsigned &x, const unsigned &y) const
Direct access to the mask data, const version.
Definition: ROI.cpp:488
unsigned GetWidth() const
width capacity of roi (image width)
Definition: ROI.hh:250
Position(unsigned xx, unsigned yy)
Definition: ROI.hh:53
unsigned y
Definition: ROI.hh:72
bool operator!=(const Position &p) const
comparison
Definition: ROI.hh:65
unsigned Height_
Definition: ROI.hh:356
enum ERoiType RoiType_
which method is used to store the ROI
Definition: ROI.hh:354
Position()
Definition: ROI.hh:52
unsigned Width_
maximum dimension of roi data
Definition: ROI.hh:356
unsigned LowerRightX_
Definition: ROI.hh:363
std::vector< Position > * GetVector()
returns a pointer to the vector representation of the ROI
Definition: ROI.hh:242
bool VectorValid() const
is the position vector valid?
Definition: ROI.hh:311
bool IsInROI(const double &x, const double &y) const
ROI check if pixel position is inside the ROI.
Definition: ROI.hh:463
unsigned LowerRightY_
Definition: ROI.hh:363
bool GetRows(std::vector< unsigned > &start, std::vector< unsigned > &end) const
Horizontal start and end position per image row, the length of the vectors always corresponds to the ...
Definition: ROI.hh:261
std::ostream & operator<<(std::ostream &os, const Array2D< T > &arg)
Definition: Array2D.hh:260
unsigned UpperLeftX_
internal data for ROI of type ROI_Corners rectangular region of interest defined by upper left and lo...
Definition: ROI.hh:362
Position & operator=(const Position &p)
assignment operator
Definition: ROI.hh:59
static const int Version_
version number of ROI class
Definition: ROI.hh:380
std::vector< unsigned > RowEnd_
Definition: ROI.hh:377
bool CheckBilinearInterpolation(const double x, const double y) const
Check if subpixel position (x,y) in ROI is valid for bilinear interpolation (i.e. ...
Definition: ROI.hh:565
bool MaskValid() const
is the position vector valid?
Definition: ROI.hh:307
bool CheckBicubicInterpolation(const double x, const double y) const
Check if subpixel position (x,y) in ROI is valid for bicubic interpolation (i.e.
Definition: ROI.hh:571
unsigned GetHeight() const
height capacity of roi (image height)
Definition: ROI.hh:254
bool operator!=(const ROI &roi) const
Definition: ROI.hh:153
unsigned GetCornerLowerRightY() const
fetch individual ROI corner coordinate
Definition: ROI.hh:207
This is the base class for images in BIAS.
Definition: ImageBase.hh:102
ERoiType
Definition: ROI.hh:40
unsigned GetCornerUpperLeftY() const
fetch individual ROI corner coordinate
Definition: ROI.hh:195
std::vector< Position > Vector_
internal data for ROI of type ROI_Points Vector instance of ROI, always sorted from top left to botto...
Definition: ROI.hh:373
unsigned GetCornerLowerRightX() const
fetch individual ROI corner coordinate
Definition: ROI.hh:201
unsigned UpperLeftY_
Definition: ROI.hh:362
unsigned GetCornerUpperLeftX() const
fetch individual ROI corner coordinate
Definition: ROI.hh:189
std::vector< unsigned > RowStart_
internal data for ROI of type ROI_Rows the ROI is specified by a min and a max value for each row in ...
Definition: ROI.hh:377