ITK  4.13.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 {
58 template<
59  typename TDisplacementField,
60  typename TOutputImage
61  >
62 class ITK_TEMPLATE_EXPORT GridForwardWarpImageFilter:
63  public ImageToImageFilter< TDisplacementField, TOutputImage >
64 {
65 public:
71 
73  itkNewMacro(Self);
74 
77 
79  typedef typename TOutputImage::RegionType OutputImageRegionType;
80 
82  typedef typename Superclass::OutputImageType OutputImageType;
83  typedef typename Superclass::OutputImagePointer OutputImagePointer;
86  typedef typename OutputImageType::PixelType PixelType;
87  typedef typename OutputImageType::SpacingType SpacingType;
88 
90  itkStaticConstMacro(ImageDimension, unsigned int,
91  TOutputImage::ImageDimension);
92  itkStaticConstMacro(DisplacementFieldDimension, unsigned int,
93  TDisplacementField::ImageDimension);
95 
97  typedef TDisplacementField DisplacementFieldType;
98  typedef typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer;
99  typedef typename DisplacementFieldType::PixelType DisplacementType;
100 
102  itkSetMacro(BackgroundValue, PixelType);
103 
105  itkGetConstMacro(BackgroundValue, PixelType);
106 
108  itkSetMacro(ForegroundValue, PixelType);
109 
111  itkGetConstMacro(ForegroundValue, PixelType);
112 
113 #ifdef ITK_USE_CONCEPT_CHECKING
114  // Begin concept checking
115  itkConceptMacro( SameDimensionCheck,
117  itkConceptMacro( DisplacementFieldHasNumericTraitsCheck,
119  // End concept checking
120 #endif
121 
122 protected:
125 
126  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
127 
128  void GenerateData() ITK_OVERRIDE;
129 
130 private:
131  ITK_DISALLOW_COPY_AND_ASSIGN(GridForwardWarpImageFilter);
132 
133  PixelType m_BackgroundValue;
134  PixelType m_ForegroundValue;
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
DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
ImageToImageFilter< TDisplacementField, TOutputImage > Superclass
OutputImageType::SpacingType SpacingType
Base class for all process objects that output image data.
Superclass::OutputImagePointer OutputImagePointer
Base class for filters that take an image as input and produce an image as output.
Warps a grid using an input deformation field.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::OutputImageType OutputImageType
#define itkConceptMacro(name, concept)
DisplacementFieldType::PixelType DisplacementType