itkVelocityFieldLieBracketFilter.h

Go to the documentation of this file.
00001 #ifndef __itkVelocityFieldLieBracketFilter_h
00002 #define __itkVelocityFieldLieBracketFilter_h
00003 
00004 #include <itkImageToImageFilter.h>
00005 #include <itkVectorCentralDifferenceImageFunction.h>
00006 #include <itkImageRegionConstIteratorWithIndex.h>
00007 
00008 namespace itk
00009 {
00043 template< class TInputImage, class TOutputImage >
00044 class ITK_EXPORT VelocityFieldLieBracketFilter:
00045   public ImageToImageFilter< TInputImage, TOutputImage >
00046 {
00047 public:
00049   typedef VelocityFieldLieBracketFilter                   Self;
00050   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00051   typedef SmartPointer< Self >                            Pointer;
00052   typedef SmartPointer< const Self >                      ConstPointer;
00053 
00055   typedef TInputImage                           InputFieldType;
00056   typedef typename InputFieldType::PixelType    InputFieldPixelType;
00057   typedef typename InputFieldType::Pointer      InputFieldPointer;
00058   typedef typename InputFieldType::ConstPointer InputFieldConstPointer;
00059   typedef typename InputFieldType::RegionType   InputFieldRegionType;
00060 
00061   typedef TOutputImage                           OutputFieldType;
00062   typedef typename OutputFieldType::PixelType    OutputFieldPixelType;
00063   typedef typename OutputFieldType::Pointer      OutputFieldPointer;
00064   typedef typename OutputFieldType::ConstPointer OutputFieldConstPointer;
00065   typedef typename OutputFieldType::RegionType   OutputFieldRegionType;
00066 
00068   itkNewMacro(Self);
00069 
00071   itkTypeMacro(VelocityFieldLieBracketFilter, ImageToImageFilter);
00072 
00074   typedef itk::VectorCentralDifferenceImageFunction< InputFieldType >
00075   InputFieldGradientCalculatorType;
00076 
00078   typedef typename InputFieldGradientCalculatorType::OutputType
00079   InputFieldGradientType;
00080 
00087   virtual void GenerateInputRequestedRegion()
00088   throw( InvalidRequestedRegionError );
00089 
00091   itkStaticConstMacro(InputFieldDimension, unsigned int,
00092                       TInputImage::ImageDimension);
00093   itkStaticConstMacro(OutputFieldDimension, unsigned int,
00094                       TOutputImage::ImageDimension);
00095   itkStaticConstMacro(InputFieldPixelDimension, unsigned int,
00096                       InputFieldPixelType::Dimension);
00097   itkStaticConstMacro(OutputFieldPixelDimension, unsigned int,
00098                       OutputFieldPixelType::Dimension);
00099 
00100 #ifdef ITK_USE_CONCEPT_CHECKING
00101 
00102   itkConceptMacro( SameDimensionCheck1,
00103                    ( Concept::SameDimension< InputFieldDimension, OutputFieldDimension > ) );
00104   itkConceptMacro( SameDimensionCheck2,
00105                    ( Concept::SameDimension< InputFieldDimension, InputFieldPixelDimension > ) );
00106   itkConceptMacro( SameDimensionCheck3,
00107                    ( Concept::SameDimension< OutputFieldDimension, OutputFieldPixelDimension > ) );
00109 #endif
00110 protected:
00111   VelocityFieldLieBracketFilter();
00112   ~VelocityFieldLieBracketFilter() {}
00113   void PrintSelf(std::ostream & os, Indent indent) const;
00114 
00126   void ThreadedGenerateData(const OutputFieldRegionType & outputRegionForThread,
00127                             int threadId);
00128 
00129   void BeforeThreadedGenerateData();
00130 
00132   itkSetObjectMacro(RightGradientCalculator, InputFieldGradientCalculatorType);
00133   itkSetObjectMacro(LeftGradientCalculator,  InputFieldGradientCalculatorType);
00134 
00136   itkGetObjectMacro(RightGradientCalculator, InputFieldGradientCalculatorType);
00137   itkGetObjectMacro(LeftGradientCalculator,  InputFieldGradientCalculatorType);
00138 private:
00139   // purposely not implemented
00140   VelocityFieldLieBracketFilter(const Self &);
00141   void operator=(const Self &);
00142 
00143   typename InputFieldGradientCalculatorType::Pointer m_RightGradientCalculator;
00144   typename InputFieldGradientCalculatorType::Pointer m_LeftGradientCalculator;
00145 };
00146 } // end namespace itk
00147 
00148 #ifndef ITK_MANUAL_INSTANTIATION
00149 #  include "itkVelocityFieldLieBracketFilter.txx"
00150 #endif
00151 
00152 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1