00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _itkOrthogonalSwath2DPathFilter_h
00019 #define _itkOrthogonalSwath2DPathFilter_h
00020
00021 #include "itkPathAndImageToPathFilter.h"
00022 #include "itkOrthogonallyCorrected2DParametricPath.h"
00023
00024
00025 namespace itk
00026 {
00048 template <class TFourierSeriesPath, class TSwathMeritImage>
00049 class ITK_EXPORT OrthogonalSwath2DPathFilter : public
00050 PathAndImageToPathFilter< TFourierSeriesPath, TSwathMeritImage,
00051 OrthogonallyCorrected2DParametricPath >
00052 {
00053 public:
00055 typedef OrthogonalSwath2DPathFilter Self;
00056 typedef PathAndImageToPathFilter< TFourierSeriesPath, TSwathMeritImage,
00057 OrthogonallyCorrected2DParametricPath > Superclass;
00058 typedef SmartPointer<Self> Pointer;
00059 typedef SmartPointer<const Self> ConstPointer;
00060
00062 itkNewMacro(Self);
00063
00065 itkTypeMacro(OrthogonalSwath2DPathFilter, PathAndImageToPathFilter);
00066
00068 typedef TFourierSeriesPath InputPathType;
00069 typedef typename InputPathType::Pointer InputPathPointer;
00070 typedef typename InputPathType::InputType InputPathInputType;
00071
00072 typedef TSwathMeritImage ImageType;
00073 typedef typename ImageType::ConstPointer ImageConstPointer;
00074
00075 typedef OrthogonallyCorrected2DParametricPath OutputPathType;
00076 typedef typename OutputPathType::Pointer OutputPathPointer;
00077 typedef typename OutputPathType::InputType OutputPathInputType;
00078 typedef typename OutputPathType::OrthogonalCorrectionTableType
00079 OrthogonalCorrectionTableType;
00080 typedef typename OutputPathType::OrthogonalCorrectionTablePointer
00081 OrthogonalCorrectionTablePointer;
00082
00083 typedef typename InputPathType::IndexType IndexType;
00084 typedef typename InputPathType::OffsetType OffsetType;
00085 typedef typename ImageType::SizeType SizeType;
00086
00087 protected:
00088 OrthogonalSwath2DPathFilter();
00089 virtual ~OrthogonalSwath2DPathFilter();
00090 void PrintSelf(std::ostream& os, Indent indent) const;
00091
00092 void GenerateData(void);
00093
00094 private:
00095 OrthogonalSwath2DPathFilter(const Self&);
00096 void operator=(const Self&);
00097
00098
00099
00100
00101 unsigned int FindAndStoreBestErrorStep(unsigned int x, unsigned int F,
00102 unsigned int L);
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115 inline int &StepValue(int f, int l, int x)
00116 {
00117 int rows=m_SwathSize[1];
00118 return m_StepValues[ (x*rows*rows) + (f*rows) + (l) ];
00119 }
00120
00121 inline double &MeritValue(int f, int l, int x)
00122 {
00123 int rows=m_SwathSize[1];
00124 return m_MeritValues[ (x*rows*rows) + (f*rows) + (l) ];
00125 }
00126
00127 int *m_StepValues;
00128 double *m_MeritValues;
00129
00130 int *m_OptimumStepsValues;
00131 OrthogonalCorrectionTablePointer m_FinalOffsetValues;
00132
00133 SizeType m_SwathSize;
00134 };
00135
00136 }
00137
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkOrthogonalSwath2DPathFilter.txx"
00140 #endif
00141
00142 #endif
00143