ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkGridForwardWarpImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkGridForwardWarpImageFilter_h
19 #define __itkGridForwardWarpImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
54 template<
55  class TDisplacementField,
56  class TOutputImage
57  >
58 class ITK_EXPORT GridForwardWarpImageFilter:
59  public ImageToImageFilter< TDisplacementField, TOutputImage >
60 {
61 public:
67 
69  itkNewMacro(Self);
70 
73 
75  typedef typename TOutputImage::RegionType OutputImageRegionType;
76 
78  typedef typename Superclass::OutputImageType OutputImageType;
79  typedef typename Superclass::OutputImagePointer OutputImagePointer;
80  typedef typename OutputImageType::IndexType IndexType;
81  typedef typename OutputImageType::SizeType SizeType;
82  typedef typename OutputImageType::PixelType PixelType;
83  typedef typename OutputImageType::SpacingType SpacingType;
84 
86  itkStaticConstMacro(ImageDimension, unsigned int,
87  TOutputImage::ImageDimension);
88  itkStaticConstMacro(DisplacementFieldDimension, unsigned int,
89  TDisplacementField::ImageDimension);
91 
93  typedef TDisplacementField DisplacementFieldType;
94  typedef typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer;
95  typedef typename DisplacementFieldType::PixelType DisplacementType;
96 
98  itkSetMacro(BackgroundValue, PixelType);
99 
101  itkGetConstMacro(BackgroundValue, PixelType);
102 
104  itkSetMacro(ForegroundValue, PixelType);
105 
107  itkGetConstMacro(ForegroundValue, PixelType);
108 
109 #ifdef ITK_USE_CONCEPT_CHECKING
110 
111  itkConceptMacro( SameDimensionCheck,
113  itkConceptMacro( DisplacementFieldHasNumericTraitsCheck,
115 
117 #endif
118 protected:
121 
122  void PrintSelf(std::ostream & os, Indent indent) const;
123 
127  void GenerateData();
128 
129 private:
130  GridForwardWarpImageFilter(const Self &); //purposely not implemented
131  void operator=(const Self &); //purposely not implemented
132 
135  unsigned int m_GridPixSpacing;
136 };
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkGridForwardWarpImageFilter.hxx"
141 #endif
142 
143 #endif
144