itkGridForwardWarpImageFilterNew.h

Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Program:   Insight Segmentation & Registration Toolkit
00004  *  Module:    $RCSfile: itkGridForwardWarpImageFilterNew.h,v $
00005  *  Language:  C++
00006  *  Date:      $Date: 2009-04-23 03:43:41 $
00007  *  Version:   $Revision: 1.2 $
00008  *
00009  *  Copyright (c) Insight Software Consortium. All rights reserved.
00010  *  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011  *
00012  *  This software is distributed WITHOUT ANY WARRANTY; without even
00013  *  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014  *  PURPOSE.  See the above copyright notices for more information.
00015  *
00016  *  =========================================================================*/
00017 
00018 #ifndef __itkGridForwardWarpImageFilterNew_h
00019 #define __itkGridForwardWarpImageFilterNew_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkFixedArray.h"
00023 
00024 namespace itk
00025 {
00054 template<
00055   class TDeformationField,
00056   class TOutputImage
00057   >
00058 class ITK_EXPORT GridForwardWarpImageFilterNew:
00059   public ImageToImageFilter< TDeformationField, TOutputImage >
00060 {
00061 public:
00063   typedef GridForwardWarpImageFilterNew                         Self;
00064   typedef ImageToImageFilter< TDeformationField, TOutputImage > Superclass;
00065   typedef SmartPointer< Self >                                  Pointer;
00066   typedef SmartPointer< const Self >                            ConstPointer;
00067 
00069   itkNewMacro(Self);
00070 
00072   itkTypeMacro(GridForwardWarpImageFilterNew, ImageToImageFilter);
00073 
00075   typedef typename TOutputImage::RegionType OutputImageRegionType;
00076 
00078   typedef typename Superclass::OutputImageType    OutputImageType;
00079   typedef typename Superclass::OutputImagePointer OutputImagePointer;
00080   typedef typename OutputImageType::IndexType     IndexType;
00081   typedef typename OutputImageType::SizeType      SizeType;
00082   typedef typename OutputImageType::PixelType     PixelType;
00083   typedef typename OutputImageType::SpacingType   SpacingType;
00084 
00086   itkStaticConstMacro(ImageDimension, unsigned int,
00087                       TOutputImage::ImageDimension);
00088   itkStaticConstMacro(DeformationFieldDimension, unsigned int,
00089                       TDeformationField::ImageDimension);
00090 
00092   typedef TDeformationField                           DeformationFieldType;
00093   typedef typename DeformationFieldType::ConstPointer DeformationFieldConstPointer;
00094   typedef typename DeformationFieldType::PixelType    DisplacementType;
00095 
00097   itkSetMacro(BackgroundValue, PixelType);
00099   itkGetConstMacro(BackgroundValue, PixelType);
00100 
00102   itkSetMacro(ForegroundValue, PixelType);
00104   itkGetConstMacro(ForegroundValue, PixelType);
00105 
00117   typedef FixedArray< int, ImageDimension > GridSpacingType;
00118   itkSetMacro(GridPixelSpacing, GridSpacingType);
00120   itkGetConstMacro(GridPixelSpacing, GridSpacingType);
00121 
00122 #ifdef ITK_USE_CONCEPT_CHECKING
00123 
00124   itkConceptMacro( SameDimensionCheck,
00125                    ( Concept::SameDimension< ImageDimension, DeformationFieldDimension > ) );
00126   itkConceptMacro( DeformationFieldHasNumericTraitsCheck,
00127                    ( Concept::HasNumericTraits< typename TDeformationField::PixelType::ValueType > ) );
00129 #endif
00130 protected:
00131   GridForwardWarpImageFilterNew();
00132   ~GridForwardWarpImageFilterNew() {}
00133 
00134   void PrintSelf(std::ostream & os, Indent indent) const;
00135 
00139   void GenerateData();
00140 
00141 private:
00142   GridForwardWarpImageFilterNew(const Self &); // purposely not implemented
00143   void operator=(const Self &);                // purposely not implemented
00144 
00145   PixelType       m_BackgroundValue;
00146   PixelType       m_ForegroundValue;
00147   GridSpacingType m_GridPixelSpacing;
00148 };
00149 } // end namespace itk
00150 
00151 #ifndef ITK_MANUAL_INSTANTIATION
00152 #  include "itkGridForwardWarpImageFilterNew.txx"
00153 #endif
00154 
00155 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1