ITK  4.4.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 
119 protected:
122 
123  void PrintSelf(std::ostream & os, Indent indent) const;
124 
128  void GenerateData();
129 
130 private:
131  GridForwardWarpImageFilter(const Self &); //purposely not implemented
132  void operator=(const Self &); //purposely not implemented
133 
136  unsigned int m_GridPixSpacing;
137 };
138 } // end namespace itk
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 #include "itkGridForwardWarpImageFilter.hxx"
142 #endif
143 
144 #endif
145