otbWaveletPacketDecompositionCosts.h 2.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/*=========================================================================

  Program:   ORFEO Toolbox
  Language:  C++
  Date:      $Date$
  Version:   $Revision$


  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
  See OTBCopyright.txt for details.

Emmanuel Christophe's avatar
Emmanuel Christophe committed
12
  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
13 14
  See ITCopyright.txt for details.

Emmanuel Christophe's avatar
Emmanuel Christophe committed
15 16
     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17 18 19 20
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

21 22
#ifndef __otbWaveletPacketDecompositionCosts_h
#define __otbWaveletPacketDecompositionCosts_h
23 24 25

#include "itkObject.h"
#include "itkMacro.h"
26
#include "itkObjectFactory.h"
27

28
namespace otb {
29 30

/** \class FullyDecomposedWaveletPacketCost
31
 * \brief Cost evaluation to be used into the Wavelet Packet decomposition class.
32
 *
Emmanuel Christophe's avatar
Emmanuel Christophe committed
33
 * This class implements the criteria to perform fully decomposed wavelet packet.
34 35 36 37
 * It is based on the depth of the decomposition only...
 *
 * \sa WaveletPacketForwardTransform
 */
OTB Bot's avatar
STYLE  
OTB Bot committed
38
template <class TImage>
39
class ITK_EXPORT FullyDecomposedWaveletPacketCost
40
  : public itk::Object
41 42 43 44
{
public:
  /** Standard typedefs */
  typedef FullyDecomposedWaveletPacketCost Self;
OTB Bot's avatar
STYLE  
OTB Bot committed
45 46 47
  typedef itk::Object                      Superclass;
  typedef itk::SmartPointer<Self>          Pointer;
  typedef itk::SmartPointer<const Self>    ConstPointer;
48

49 50
  /** Type macro */
  itkNewMacro(Self);
51

52
  /** Creation through object factory macro */
OTB Bot's avatar
STYLE  
OTB Bot committed
53
  itkTypeMacro(FullyDecomposedWaveletPacketCost, Object);
54 55 56 57

  typedef TImage ImageType;

  /** Acces to the data */
58
  static unsigned int NumberOfAllowedDecompositions;
59 60

  /** Evaluate the cost */
61
  bool Evaluate(unsigned int decomposition, const ImageType * itkNotUsed(image))
62
  {
OTB Bot's avatar
STYLE  
OTB Bot committed
63
    return (decomposition < NumberOfAllowedDecompositions);
64 65 66
  }

protected:
67
  FullyDecomposedWaveletPacketCost () {}
68 69 70
  virtual ~FullyDecomposedWaveletPacketCost() {}

private:
OTB Bot's avatar
STYLE  
OTB Bot committed
71 72
  FullyDecomposedWaveletPacketCost (const Self &);   // not implemented
  void operator =(const Self&);
73

Emmanuel Christophe's avatar
Emmanuel Christophe committed
74
}; // end of class
75

OTB Bot's avatar
STYLE  
OTB Bot committed
76 77
template <class TImage>
unsigned int FullyDecomposedWaveletPacketCost<TImage>::NumberOfAllowedDecompositions = 1;
78 79 80 81

} // end of namespace otb

#endif