~ubuntu-branches/ubuntu/precise/insighttoolkit/precise

« back to all changes in this revision

Viewing changes to Code/Common/itkGaussianSpatialFunction.txx

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-12-19 20:16:49 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081219201649-drt97guwl2ryt0cn

* New upstream version.
  - patches/nifti-versioning.patch: Remove.  Applied upstream.
  - control:
  - rules: Update version numbers, package names.

* control: Build-depend on uuid-dev (gdcm uses it).

* copyright: Update download URL.

* rules: Adhere to parallel=N in DEB_BUILD_OPTIONS by setting MAKEFLAGS.

* compat: Set to 7.
* control: Update build-dep on debhelper to version >= 7.

* CMakeCache.txt.debian: Set CMAKE_BUILD_TYPE to "RELEASE" so that we
  build with -O3 (not -O2), necessary to optimize the templated code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
  Program:   Insight Segmentation & Registration Toolkit
4
4
  Module:    $RCSfile: itkGaussianSpatialFunction.txx,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2007-02-13 15:53:33 $
7
 
  Version:   $Revision: 1.11 $
 
6
  Date:      $Date: 2008-10-17 01:08:45 $
 
7
  Version:   $Revision: 1.12 $
8
8
 
9
9
  Copyright (c) Insight Software Consortium. All rights reserved.
10
10
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
11
 
12
 
     This software is distributed WITHOUT ANY WARRANTY; without even 
13
 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 
12
     This software is distributed WITHOUT ANY WARRANTY; without even
 
13
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
14
     PURPOSE.  See the above copyright notices for more information.
15
15
 
16
16
=========================================================================*/
41
41
}
42
42
 
43
43
template <typename TOutput, unsigned int VImageDimension, typename TInput>
44
 
typename GaussianSpatialFunction<TOutput, VImageDimension, TInput>::OutputType 
 
44
typename GaussianSpatialFunction<TOutput, VImageDimension, TInput>::OutputType
45
45
GaussianSpatialFunction<TOutput, VImageDimension, TInput>
46
46
::Evaluate(const TInput& position) const
47
47
{
73
73
 
74
74
  for(unsigned int i = 0; i < VImageDimension; i++)
75
75
    {
76
 
    suffixExp += (position[i] - m_Mean[i])*(position[i] - m_Mean[i]) 
 
76
    suffixExp += (position[i] - m_Mean[i])*(position[i] - m_Mean[i])
77
77
                 / (2 * m_Sigma[i] * m_Sigma[i]);
78
78
    }
79
79
 
91
91
 
92
92
  unsigned int i;
93
93
  os << indent << "Sigma: [";
94
 
  for (i=0; i+1 < VImageDimension ; i++)
 
94
  for( i=0; i+1 < VImageDimension; i++ )
95
95
    {
96
96
    os << m_Sigma[i] << ", ";
97
97
    }
98
98
  os << "]" << std::endl;
99
99
 
100
100
  os << indent << "Mean: [";
101
 
  for (i=0; i+1 < VImageDimension ; i++)
 
101
  for( i=0; i+1 < VImageDimension; i++ )
102
102
    {
103
103
    os << m_Mean[i] << ", ";
104
104
    }