ITK  4.8.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  typename TDisplacementField,
56  typename TOutputImage
57  >
59  public ImageToImageFilter< TDisplacementField, TOutputImage >
60 {
61 public:
67 
69  itkNewMacro(Self);
70 
73 
75  typedef typename TOutputImage::RegionType OutputImageRegionType;
76 
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  // Begin concept checking
111  itkConceptMacro( SameDimensionCheck,
113  itkConceptMacro( DisplacementFieldHasNumericTraitsCheck,
115  // End concept checking
116 #endif
117 
118 protected:
121 
122  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
123 
127  void GenerateData() ITK_OVERRIDE;
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
DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
ImageToImageFilter< TDisplacementField, TOutputImage > Superclass
OutputImageType::SpacingType SpacingType
Base class for all process objects that output image data.
static const unsigned int DisplacementFieldDimension
OutputImageType::Pointer OutputImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
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
TOutputImage OutputImageType
Superclass::OutputImageType OutputImageType
#define itkConceptMacro(name, concept)
DisplacementFieldType::PixelType DisplacementType