ITK  6.0.0
Insight Toolkit
itkGridForwardWarpImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
22
23namespace itk
24{
58template <typename TDisplacementField, typename TOutputImage>
59class ITK_TEMPLATE_EXPORT GridForwardWarpImageFilter : public ImageToImageFilter<TDisplacementField, TOutputImage>
60{
61public:
62 ITK_DISALLOW_COPY_AND_MOVE(GridForwardWarpImageFilter);
63
69
71 itkNewMacro(Self);
72
74 itkOverrideGetNameOfClassMacro(GridForwardWarpImageFilter);
75
78
80 using typename Superclass::OutputImageType;
81 using typename Superclass::OutputImagePointer;
84 using PixelType = typename OutputImageType::PixelType;
85 using SpacingType = typename OutputImageType::SpacingType;
86
88 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
89 static constexpr unsigned int DisplacementFieldDimension = TDisplacementField::ImageDimension;
90
92 using DisplacementFieldType = TDisplacementField;
94 using DisplacementType = typename DisplacementFieldType::PixelType;
95
97 itkSetMacro(BackgroundValue, PixelType);
98
100 itkGetConstMacro(BackgroundValue, PixelType);
101
103 itkSetMacro(ForegroundValue, PixelType);
104
106 itkGetConstMacro(ForegroundValue, PixelType);
107
108#ifdef ITK_USE_CONCEPT_CHECKING
109 // Begin concept checking
111 itkConceptMacro(DisplacementFieldHasNumericTraitsCheck,
113 // End concept checking
114#endif
115
116protected:
118 ~GridForwardWarpImageFilter() override = default;
119
120 void
121 PrintSelf(std::ostream & os, Indent indent) const override;
122
123 void
124 GenerateData() override;
125
126private:
127 PixelType m_BackgroundValue{};
128 PixelType m_ForegroundValue{};
129 unsigned int m_GridPixSpacing{ 5 };
130};
131} // end namespace itk
132
133#ifndef ITK_MANUAL_INSTANTIATION
134# include "itkGridForwardWarpImageFilter.hxx"
135#endif
136
137#endif
Warps a grid using an input deformation field.
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::IndexType IndexType
typename OutputImageType::PixelType PixelType
typename DisplacementFieldType::PixelType DisplacementType
typename OutputImageType::SpacingType SpacingType
typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
~GridForwardWarpImageFilter() override=default
typename OutputImageType::SizeType SizeType
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< const Self > ConstPointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....