Orfeo Toolbox  3.16
itkWarpHarmonicEnergyCalculator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkWarpHarmonicEnergyCalculator.h,v $
5  Language: C++
6  Date: $Date: 2009-04-23 03:43:42 $
7  Version: $Revision: 1.4 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __itkWarpHarmonicEnergyCalculator_h
19 #define __itkWarpHarmonicEnergyCalculator_h
20 
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
24 #include "itkImage.h"
25 #include "itkVector.h"
26 
27 namespace itk
28 {
29 
45 template <class TInputImage>
47 {
48 public:
51  typedef Object Superclass;
54 
56  itkNewMacro(Self);
57 
60 
62  typedef TInputImage ImageType;
63 
65  typedef typename TInputImage::Pointer ImagePointer;
66 
68  typedef typename TInputImage::ConstPointer ImageConstPointer;
69 
71  typedef typename TInputImage::PixelType PixelType;
72 
74  typedef typename TInputImage::IndexType IndexType;
75 
77  typedef typename TInputImage::RegionType RegionType;
78 
80  itkStaticConstMacro(ImageDimension, unsigned int,
81  TInputImage::ImageDimension);
82 
84  itkStaticConstMacro(VectorDimension, unsigned int,
85  PixelType::Dimension);
86 
91 
95  void SetUseImageSpacingOn()
96  {
97  this->SetUseImageSpacing(true);
98  }
99 
103  void SetUseImageSpacingOff()
104  {
105  this->SetUseImageSpacing(false);
106  }
107 
110  void SetUseImageSpacing(bool);
111  itkGetConstMacro(UseImageSpacing, bool);
112 
115  void SetDerivativeWeights(double data[]);
116  itkGetVectorMacro(DerivativeWeights, const double, ::itk::GetImageDimension<TInputImage>::ImageDimension);
117 
119  itkSetConstObjectMacro(Image,ImageType);
120 
122  void Compute(void);
123 
125  itkGetConstMacro(HarmonicEnergy,double);
126 
128  void SetRegion( const RegionType & region );
129 
130 protected:
133  void PrintSelf(std::ostream& os, Indent indent) const;
134 
136  itkGetConstReferenceMacro( NeighborhoodRadius, RadiusType );
137  itkSetMacro( NeighborhoodRadius, RadiusType );
138 
139  double EvaluateAtNeighborhood( ConstNeighborhoodIteratorType &it ) const;
140 
141 private:
142  WarpHarmonicEnergyCalculator(const Self&); //purposely not implemented
143  void operator=(const Self&); //purposely not implemented
144 
147 
150 
152 
155 
157 };
158 
159 } // end namespace itk
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
163 #endif
164 
165 #endif /* __itkWarpHarmonicEnergyCalculator_h */

Generated at Sun Feb 3 2013 00:14:20 for Orfeo Toolbox with doxygen 1.8.1.1