ITK  5.0.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:
66  ITK_DISALLOW_COPY_AND_ASSIGN(GridForwardWarpImageFilter);
67 
73 
75  itkNewMacro(Self);
76 
79 
82 
84  using OutputImageType = typename Superclass::OutputImageType;
85  using OutputImagePointer = typename Superclass::OutputImagePointer;
88  using PixelType = typename OutputImageType::PixelType;
89  using SpacingType = typename OutputImageType::SpacingType;
90 
92  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
93  static constexpr unsigned int DisplacementFieldDimension = TDisplacementField::ImageDimension;
94 
96  using DisplacementFieldType = TDisplacementField;
97  using DisplacementFieldConstPointer = typename DisplacementFieldType::ConstPointer;
98  using DisplacementType = typename DisplacementFieldType::PixelType;
99 
101  itkSetMacro(BackgroundValue, PixelType);
102 
104  itkGetConstMacro(BackgroundValue, PixelType);
105 
107  itkSetMacro(ForegroundValue, PixelType);
108 
110  itkGetConstMacro(ForegroundValue, PixelType);
111 
112 #ifdef ITK_USE_CONCEPT_CHECKING
113  // Begin concept checking
114  itkConceptMacro( SameDimensionCheck,
116  itkConceptMacro( DisplacementFieldHasNumericTraitsCheck,
118  // End concept checking
119 #endif
120 
121 protected:
124 
125  void PrintSelf(std::ostream & os, Indent indent) const override;
126 
127  void GenerateData() override;
128 
129 private:
132  unsigned int m_GridPixSpacing;
133 };
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkGridForwardWarpImageFilter.hxx"
138 #endif
139 
140 #endif
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::IndexType IndexType
typename OutputImageType::SpacingType SpacingType
typename DisplacementFieldType::PixelType DisplacementType
typename OutputImageType::SizeType SizeType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::PixelType PixelType
Base class for filters that take an image as input and produce an image as output.
typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
Warps a grid using an input deformation field.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)