3
3
Program: Insight Segmentation & Registration Toolkit
4
4
Module: $RCSfile: itkFourierSeriesPath.h,v $
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 $
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.
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.
16
16
=========================================================================*/
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;
71
71
/** Run-time type information (and related methods). */
72
72
itkTypeMacro(FourierSeriesPath, ParametricPath);
75
75
typedef typename Superclass::InputType InputType;
78
78
typedef typename Superclass::OutputType OutputType;
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;
90
90
/** Return the location of the parametric path at the specified location. */
91
91
virtual OutputType Evaluate( const InputType & input ) const;
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;
97
97
/** Add another harmonic's frequency coefficients. */
98
98
void AddHarmonic( const VectorType & CosCoefficients,
99
99
const VectorType & SinCoefficients );
101
101
/** Clear all frequency coefficients (including the "DC" coefficients). */
105
105
m_SinCoefficients->Initialize();
106
106
this->Modified();
109
109
/** New() method for dynamic construction */
110
110
itkNewMacro( Self );
112
/** Needed for Pipelining */
112
/** Needed for Pipelining */
113
113
virtual void Initialize(void)
119
119
FourierSeriesPath();
120
120
~FourierSeriesPath(){}
121
121
void PrintSelf(std::ostream& os, Indent indent) const;
124
124
FourierSeriesPath(const Self&); //purposely not implemented
125
125
void operator=(const Self&); //purposely not implemented
127
127
CoefficientsPointer m_CosCoefficients;
128
128
CoefficientsPointer m_SinCoefficients;