Orfeo Toolbox  3.16
itkFiniteDifferenceFunction.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkFiniteDifferenceFunction.txx,v $
5  Language: C++
6  Date: $Date: 2008-10-16 23:25:41 $
7  Version: $Revision: 1.10 $
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 __itkFiniteDifferenceFunction_txx
18 #define __itkFiniteDifferenceFunction_txx
19 
21 
22 namespace itk
23 {
24 template<class TImageType>
25 void
27 PrintSelf(std::ostream& os, Indent indent) const
28 {
29  Superclass::PrintSelf(os, indent);
30  os << indent << "Radius: " << m_Radius << std::endl;
31  os << indent << "ScaleCoefficients: " << m_ScaleCoefficients;
32 }
33 
34 template<class TImageType>
38 {
39  NeighborhoodScalesType neighborhoodScales;
40  neighborhoodScales.Fill(0.0);
41  typedef typename NeighborhoodScalesType::ComponentType NeighborhoodScaleType;
42  for(int i=0; i<ImageDimension; i++)
43  {
44  if (this->m_Radius[i] > 0)
45  {
46  neighborhoodScales[i] = this->m_ScaleCoefficients[i] / this->m_Radius[i];
47  }
48  }
49  return neighborhoodScales;
50 }
51 
52 } // end namespace itk
53 
54 
55 #endif

Generated at Sat Feb 2 2013 23:37:54 for Orfeo Toolbox with doxygen 1.8.1.1