Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PyramidImageInterface.hh
1 /* This file is part of the BIAS library (Basic ImageAlgorithmS).
2 
3  Copyright (C) 2003, 2004 (see file CONTACTS for details)
4  Multimediale Systeme der Informationsverarbeitung
5  Institut fuer Informatik
6  Christian-Albrechts-Universitaet Kiel
7 
8 
9  BIAS is free software; you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation; either version 2.1 of the License, or
12  (at your option) any later version.
13 
14  BIAS is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with BIAS; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
22 #ifndef __PyramidImageInterface_hh__
23 #define __PyramidImageInterface_hh__
24 
25 #include <Base/Common/BIASpragmaStart.hh>
26 
27 #include <string>
28 #include <iostream>
29 
30 namespace BIAS
31 {
32  // forward declarations
33  class ImageBase;
34  template <class T> class Image;
35  template <class T> class SharedPtr;
36  class UUID;
37 
38  /** @class PyramidImageInterface
39  @ingroup g_image
40  @brief interface definition of all pyramid images
41 
42  @author woelk 02/2008 (c) www.vision-n.de */
43  template <class StorageType>
44  class BIASImage_EXPORT PyramidImageInterface
45  {
46  public:
48 
49  virtual ~PyramidImageInterface() {};
50 
51  virtual void Init(const Image<StorageType>& image,
52  const unsigned py_size) = 0;
53 
54  virtual void InitFromImageBase(const ImageBase& image,
55  const unsigned py_size) = 0;
56 
57  virtual void Init(const unsigned int width, const unsigned int height,
58  const unsigned int channelcount,
59  const unsigned py_size) = 0;
60 
61  virtual void Init(const unsigned pyramid_size) = 0;
62 
63  virtual void Clear() = 0;
64 
66  operator[](const unsigned index) = 0;
67 
69  operator[](const unsigned index) const = 0;
70 
71 /* virtual StorageType
72  GetTrilinearImageValue(const double& x, const double& y,
73  const double& scale, int channel=0) const = 0;*/
74  virtual int GetTrilinearImageValue(const double& x,
75  const double& y,
76  const double& scale,
77  double& T,
78  int channel=0) const = 0;
79 
80 /* interface changed in pyramidimage.cpp by koeser 1/2008 - fixed here by grauel*/
81  virtual double
82  GetImageValue(const double& x, const double& y,
83  unsigned int scale, int channel=0) const = 0;
84 
85  virtual void GetSingleImage(Image<StorageType>& im) const = 0;
86 
87  virtual void SetUID(BIAS::UUID uid) = 0;
88 
89  virtual int SetROI(unsigned minx, unsigned miny,
90  unsigned maxx, unsigned maxy) = 0;
91 
92  virtual PyramidImageInterface<StorageType> *ShallowClone() const = 0;
93 
94  virtual bool IsEmpty() const = 0;
95 
96  /// deprecated interface
97  inline bool empty() const { return IsEmpty(); }
98 
99  virtual unsigned Size() const = 0;
100 
101  /// deprecated interface
102  inline unsigned size() const { return Size(); }
103 
104  virtual void SetZero() = 0;
105 
106  virtual int WriteImages(const std::string& prefix) const = 0;
107 
108 
109  /// deprecated interface
110  inline unsigned GetPyramidSize() const { return Size(); };
111 
112  virtual void resize(const unsigned size) = 0;
113 
114  virtual double GetRescaleFactor() const = 0;
115 
116  virtual double GetPositionOffset() const = 0;
117 
118  virtual int Downsample() = 0;
119 
120  virtual void Dump(std::ostream& os = std::cout) const = 0;
121  protected:
122 
123 
124  };
125 
126 } // namespace BIAS
127 
128 
129 #include <Base/Common/BIASpragmaEnd.hh>
130 
131 #endif
unsigned GetPyramidSize() const
deprecated interface
unsigned size() const
deprecated interface
pointer with reference count and automatic deletion
Definition: SharedPtr.hh:50
class BIASImageBase_EXPORT Image
Definition: ImageBase.hh:91
The image template class for specific storage types.
Definition: Image.hh:78
interface definition of all pyramid images
bool empty() const
deprecated interface
class BIASImageBase_EXPORT UUID
forward declaration for stream operators
Definition: UUID.hh:64
interface class for producing/storing Universally Unique IDentifiers
Definition: UUID.hh:98
This is the base class for images in BIAS.
Definition: ImageBase.hh:102