Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FFT2D_Tiles.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5 Multimediale Systeme der Informationsverarbeitung
6 Institut fuer Informatik
7 Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 
26 #ifndef __2DFFT_TILES_hh__
27 #define __2DFFT_TILES_hh__
28 
29 #include <bias_config.h>
30 
31 #include "FFT2D.hh"
32 
33 namespace BIAS {
34 
35 /** \class FFT2D_Tiles
36  * \brief Wrapper to the fftw3 library, which is supposed to perform
37  * the FFT patch- (tile-) wise.
38  * \attention This class is practically *NOT* implemented!
39  * \note Use fast as follows:
40  * - call Init() with appropriate size
41  * - call Filter()
42 
43  * \todo remove FFT2D_Tiles or really implement it. (JW)
44  * \author evers
45  * \date 2004/01 */
46  template <class InputStorageType, class OutputStorageType>
47  class BIASImage_EXPORT FFT2D_Tiles
48  : public FFT2D<InputStorageType, OutputStorageType>
49  {
50  public:
51  FFT2D_Tiles();
52  ~FFT2D_Tiles();
53 
54  virtual void Init(int /*imgsizex*/, int /*imgsizey*/)
55  {
56  BIASERR("Can not use FFT2D_Tiles::Init(width,height)");
57  }
58  /** @brief Initialize FFT to transform image tile- (patch-)wise
59  */
60  virtual void Init(int width, int height,
61  int tilewidth, int tileheight);
62 
63  /** cal this before a second call to Init() */
64  void Release();
65 
66  /** dst.GetChannelCount()==2*src.GetCHannelCount()
67  The result is not normalized! */
68  virtual int Filter(const Image<InputStorageType>& src,
70 
71  /** dstX.GetChannelCount()==src.GetCHannelCount()
72  The result is not normalized! */
73  virtual int Filter(const Image<InputStorageType>& src,
76 
77  /** Transform forward and get absolute value from complex result
78  The result is not normalized! */
79  virtual int TransformAbs(const Image<InputStorageType>& src,
81 
82  /** Transform reverse, src _must_ be of _SizeX,_OutSizeY,2
83  */
84  virtual int TransformReverse(const Image<OutputStorageType>& src,
86 
87 
88 
89  protected:
90 
91  virtual int Forward_(const Image<InputStorageType>& src);
92 
93  // assumes src.GetChannelCount() == 2
94  virtual int Reverse_(const Image<OutputStorageType>& src);
95 
96  int _TileSizeX, _TileSizeY;
97  int _NumTilesX, _NumTilesY;
98  };
99 
100 } // namespace
101 
102 #endif // __FFT2D_Tiles_hh__
virtual void Init(int, int)
Definition: FFT2D_Tiles.hh:54
Wrapper to the fftw3 library, which is supposed to perform the FFT patch- (tile-) wise...
Definition: FFT2D_Tiles.hh:47
Wrapper to the fftw3 library adapted for 2D image filtering.
Definition: FFT2D.hh:50