ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkComplexBSplineInterpolateImageFunction.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkComplexBSplineInterpolateImageFunction_h
00019 #define __itkComplexBSplineInterpolateImageFunction_h
00020 
00021 #include "itkBSplineInterpolateImageFunction.h"
00022 #include "itkComplexToRealImageFilter.h"
00023 #include "itkComplexToImaginaryImageFilter.h"
00024 
00025 namespace itk
00026 {
00043 template< class TImageType, class TCoordRep = double, class TCoefficientType = double >
00044 class ITK_EXPORT ComplexBSplineInterpolateImageFunction:
00045   public InterpolateImageFunction< TImageType, TCoordRep >
00046 {
00047 public:
00048 
00050   typedef ComplexBSplineInterpolateImageFunction Self;
00051 
00053   typedef InterpolateImageFunction< TImageType, TCoordRep > Superclass;
00054 
00056   typedef SmartPointer< Self > Pointer;
00057 
00059   typedef SmartPointer< const Self > ConstPointer;
00060 
00062   itkTypeMacro(ComplexBSplineInterpolateImageFunction, InterpolateImageFunction);
00063 
00065   itkNewMacro(Self);
00066 
00068   itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
00069 
00071   typedef typename Superclass::OutputType OutputType;
00072 
00074   typedef typename Superclass::InputImageType InputImageType;
00075 
00077   typedef typename Superclass::IndexType IndexType;
00078 
00080   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00081 
00083   typedef typename Superclass::PointType PointType;
00084 
00086   typedef Image< double, itkGetStaticConstMacro(ImageDimension) > InternalImageType;
00087 
00089   typedef ComplexToRealImageFilter< InputImageType, InternalImageType >      RealFilterType;
00090   typedef ComplexToImaginaryImageFilter< InputImageType, InternalImageType > ImaginaryFilterType;
00091 
00093   typedef BSplineInterpolateImageFunction< InternalImageType, TCoordRep, TCoefficientType > InterpolatorType;
00094 
00103   virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index) const;
00104 
00106 /*  typedef CovariantVector< OutputType, itkGetStaticConstMacro( ImageDimension ) > CovariantVectorType;
00107 
00108   CovariantVectorType EvaluateDerivative( const PointType & point ) const
00109   {
00110    ContinuousIndexType index;
00111    this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
00112    return ( this->EvaluateDerivativeAtContinuousIndex( index ) );
00113   }
00114 
00115   CovariantVectorType EvaluateDerivativeAtContinuousIndex( const ContinuousIndexType & x ) const;
00116 */
00117 
00120   void SetSplineOrder(unsigned int SplineOrder);
00121 
00122   itkGetConstMacro(SplineOrder, int);
00123 
00126   virtual void SetInputImage(const TImageType *inputData);
00127 
00128 protected:
00129   ComplexBSplineInterpolateImageFunction();
00130   virtual ~ComplexBSplineInterpolateImageFunction() {}
00131   void operator=(const Self &);  //purposely not implemented
00132 
00133   void PrintSelf(std::ostream & os, Indent indent) const;
00134 
00135 private:
00136   ComplexBSplineInterpolateImageFunction(const Self &);  //purposely not
00137                                                          // implemented
00138 
00139   unsigned int m_SplineOrder;
00140 
00141   typename InterpolatorType::Pointer m_RealInterpolator;
00142   typename InterpolatorType::Pointer m_ImaginaryInterpolator;
00143 
00144   typename RealFilterType::Pointer m_RealFilter;
00145 
00146   typename ImaginaryFilterType::Pointer m_ImaginaryFilter;
00147 }; // class
00148 } // namespace
00149 
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkComplexBSplineInterpolateImageFunction.hxx"
00152 #endif
00153 
00154 #endif
00155