otbWaveletPacketDecompositionCosts.h 2.3 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.

12 13
  Copyright (c) Institut Mines-Telecom. All rights reserved.
  See IMTCopyright.txt for details.
14

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
 * It is based on the depth of the decomposition only...
 *
 * \sa WaveletPacketForwardTransform
37 38
 *
 * \ingroup OTBWavelet
39
 */
OTB Bot's avatar
STYLE  
OTB Bot committed
40
template <class TImage>
41
class ITK_EXPORT FullyDecomposedWaveletPacketCost
42
  : public itk::Object
43 44 45 46
{
public:
  /** Standard typedefs */
  typedef FullyDecomposedWaveletPacketCost Self;
OTB Bot's avatar
STYLE  
OTB Bot committed
47 48 49
  typedef itk::Object                      Superclass;
  typedef itk::SmartPointer<Self>          Pointer;
  typedef itk::SmartPointer<const Self>    ConstPointer;
50

51 52
  /** Type macro */
  itkNewMacro(Self);
53

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

  typedef TImage ImageType;

  /** Acces to the data */
60
  static unsigned int NumberOfAllowedDecompositions;
61 62

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

protected:
69
  FullyDecomposedWaveletPacketCost () {}
70 71 72
  virtual ~FullyDecomposedWaveletPacketCost() {}

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

Emmanuel Christophe's avatar
Emmanuel Christophe committed
76
}; // end of class
77

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

} // end of namespace otb

#endif