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

« back to all changes in this revision

Viewing changes to Code/Common/itkFourierSeriesPath.h

  • 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: itkFourierSeriesPath.h,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2007-01-30 20:56:07 $
7
 
  Version:   $Revision: 1.6 $
 
6
  Date:      $Date: 2008-10-16 23:25:41 $
 
7
  Version:   $Revision: 1.7 $
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
=========================================================================*/
33
33
 *
34
34
 * This class is intended to represent closed parametric paths through an image
35
35
 * which are defined by their Fourier coeficients (frequency components).  The
36
 
 * paths must be closed and defined over the interval [0,1], where the paths' 
 
36
 * paths must be closed and defined over the interval [0,1], where the paths'
37
37
 * values at input 0 and input 1 are identical.  The user can control how many
38
38
 * harmonics (how high of frequency components) are represented by a given
39
39
 * instantiation of this class.  Classic applications of this class include
67
67
  typedef ParametricPath<VDimension>  Superclass;
68
68
  typedef SmartPointer<Self>          Pointer;
69
69
  typedef SmartPointer<const Self>    ConstPointer;
70
 
  
 
70
 
71
71
  /** Run-time type information (and related methods). */
72
72
  itkTypeMacro(FourierSeriesPath, ParametricPath);
73
 
  
 
73
 
74
74
  /** Input type */
75
75
  typedef typename Superclass::InputType  InputType;
76
 
  
 
76
 
77
77
  /** Output type */
78
78
  typedef typename Superclass::OutputType OutputType;
79
 
  
80
 
  
 
79
 
 
80
 
81
81
  /** Basic data-structure types used */
82
 
  typedef ContinuousIndex<double,VDimension>    ContinuousIndexType; 
83
 
  typedef Index<  VDimension >                  IndexType;           
84
 
  typedef Offset< VDimension >                  OffsetType;          
85
 
  typedef Vector<double,VDimension>             VectorType;          
 
82
  typedef ContinuousIndex<double,VDimension>    ContinuousIndexType;
 
83
  typedef Index<  VDimension >                  IndexType;
 
84
  typedef Offset< VDimension >                  OffsetType;
 
85
  typedef Vector<double,VDimension>             VectorType;
86
86
  typedef VectorContainer<unsigned, VectorType> CoefficientsType;
87
87
  typedef typename CoefficientsType::Pointer    CoefficientsPointer;
88
88
 
89
89
 
90
90
  /** Return the location of the parametric path at the specified location. */
91
91
  virtual OutputType Evaluate( const InputType & input ) const;
92
 
  
 
92
 
93
93
  /** Evaluate the first derivative of the ND output with respect to the 1D
94
94
    * input.  This is an exact, algebraic function. */
95
95
  virtual VectorType EvaluateDerivative(const InputType & input) const;
96
 
  
 
96
 
97
97
  /** Add another harmonic's frequency coefficients. */
98
98
  void AddHarmonic( const VectorType & CosCoefficients,
99
99
                    const VectorType & SinCoefficients );
100
 
  
 
100
 
101
101
  /** Clear all frequency coefficients (including the "DC" coefficients). */
102
102
  void Clear()
103
103
    {
105
105
    m_SinCoefficients->Initialize();
106
106
    this->Modified();
107
107
    }
108
 
  
 
108
 
109
109
  /** New() method for dynamic construction */
110
110
  itkNewMacro( Self );
111
 
  
112
 
    /** Needed for Pipelining */
 
111
 
 
112
  /** Needed for Pipelining */
113
113
  virtual void Initialize(void)
114
114
    {
115
115
    this->Clear();
116
116
    }
117
 
  
 
117
 
118
118
protected:
119
119
  FourierSeriesPath();
120
120
  ~FourierSeriesPath(){}
121
121
  void PrintSelf(std::ostream& os, Indent indent) const;
122
 
  
 
122
 
123
123
private:
124
124
  FourierSeriesPath(const Self&); //purposely not implemented
125
125
  void operator=(const Self&); //purposely not implemented
126
 
  
 
126
 
127
127
  CoefficientsPointer m_CosCoefficients;
128
128
  CoefficientsPointer m_SinCoefficients;
129
129
};