Orfeo Toolbox  3.16
itkMinMaxCurvatureFlowImageFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkMinMaxCurvatureFlowImageFilter.txx,v $
5  Language: C++
6  Date: $Date: 2009-01-24 20:03:00 $
7  Version: $Revision: 1.8 $
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 #ifndef __itkMinMaxCurvatureFlowImageFilter_txx
18 #define __itkMinMaxCurvatureFlowImageFilter_txx
19 
21 
22 #include "itkExceptionObject.h"
23 
24 namespace itk
25 {
26 
30 template <class TInputImage, class TOutputImage>
33 {
34 
35  m_StencilRadius = 2;
36 
38  cffp = MinMaxCurvatureFlowFunctionType::New();
39 
40  this->SetDifferenceFunction( static_cast<FiniteDifferenceFunctionType *>(
41  cffp.GetPointer() ) );
42 
43 }
44 
45 
46 /*
47  * Standard PrintSelf method.
48  */
49 template <class TInputImage, class TOutputImage>
50 void
52 ::PrintSelf(std::ostream& os, Indent indent) const
53 {
54  Superclass::PrintSelf(os, indent);
55  os << indent << "StencilRadius: " << m_StencilRadius << std::endl;
56 }
57 
58 
59 /*
60  * Initialize the state of filter and equation before each iteration.
61  */
62 template <class TInputImage, class TOutputImage>
63 void
66 {
67 
68  // update variables in the equation object
70  dynamic_cast<MinMaxCurvatureFlowFunctionType *>
71  (this->GetDifferenceFunction().GetPointer());
72 
73  if ( !f )
74  {
75  itkExceptionMacro(<<"DifferenceFunction not of type MinMaxCurvatureFlowFunction");
76  }
77 
78  f->SetStencilRadius( m_StencilRadius );
79  this->Superclass::InitializeIteration();
80 
81 }
82 
83 } // end namespace itk
84 
85 #endif

Generated at Sat Feb 2 2013 23:52:51 for Orfeo Toolbox with doxygen 1.8.1.1