ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkWarpVectorImageFilter.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 itkWarpVectorImageFilter_h
19#define itkWarpVectorImageFilter_h
20
23#include "itkPoint.h"
24#include "itkFixedArray.h"
25
26namespace itk
27{
88template <typename TInputImage, typename TOutputImage, typename TDisplacementField>
89class ITK_TEMPLATE_EXPORT WarpVectorImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
90{
91public:
92 ITK_DISALLOW_COPY_AND_MOVE(WarpVectorImageFilter);
93
99
101 itkNewMacro(Self);
102
104 itkOverrideGetNameOfClassMacro(WarpVectorImageFilter);
105
107 using OutputImageRegionType = typename TOutputImage::RegionType;
108
110 using typename Superclass::InputImageType;
111 using typename Superclass::InputImagePointer;
112 using typename Superclass::OutputImageType;
113 using typename Superclass::OutputImagePointer;
115
116 using IndexType = typename OutputImageType::IndexType;
117 using SizeType = typename OutputImageType::SizeType;
118 using PixelType = typename OutputImageType::PixelType;
119 using SpacingType = typename OutputImageType::SpacingType;
120 using ValueType = typename OutputImageType::PixelType::ValueType;
121
123 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
124
126 static constexpr unsigned int PixelDimension = PixelType::Dimension;
127
129 using DisplacementFieldType = TDisplacementField;
130 using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
131 using DisplacementType = typename DisplacementFieldType::PixelType;
132
134 using CoordinateType = double;
135#ifndef ITK_FUTURE_LEGACY_REMOVE
136 using CoordRepType ITK_FUTURE_DEPRECATED(
137 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") = CoordinateType;
138#endif
142
145
147 using DirectionType = typename TOutputImage::DirectionType;
148
150 void
152
154 void
156
160
162 itkSetObjectMacro(Interpolator, InterpolatorType);
163 itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
165
167 itkSetMacro(OutputSpacing, SpacingType);
168 virtual void
169 SetOutputSpacing(const double * spacing);
171
173 itkGetConstReferenceMacro(OutputSpacing, SpacingType);
174
176 itkSetMacro(OutputOrigin, PointType);
177 virtual void
178 SetOutputOrigin(const double * origin);
180
182 itkGetConstReferenceMacro(OutputOrigin, PointType);
183
185 itkSetMacro(OutputDirection, DirectionType);
186 itkGetConstReferenceMacro(OutputDirection, DirectionType);
188
190 itkSetMacro(EdgePaddingValue, PixelType);
191
193 itkGetConstMacro(EdgePaddingValue, PixelType);
194
200 void
202
209 void
211
214 void
216
218 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<ValueType>));
219 itkConceptMacro(DisplacementFieldHasNumericTraitsCheck,
221
222protected:
224 ~WarpVectorImageFilter() override = default;
225 void
226 PrintSelf(std::ostream & os, Indent indent) const override;
227
231 void
232 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
233
234
235private:
240
242};
243} // end namespace itk
244
245#ifndef ITK_MANUAL_INSTANTIATION
246# include "itkWarpVectorImageFilter.hxx"
247#endif
248
249#endif
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::Pointer InputImagePointer
Control indentation during Print() invocation.
Definition itkIndent.h:50
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Implements transparent reference counting.
Base class for all vector image interpolators.
Linearly interpolate a vector image at specified positions.
typename OutputImageType::SizeType SizeType
void GenerateInputRequestedRegion() override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
DisplacementFieldType * GetDisplacementField()
typename DisplacementFieldType::PixelType DisplacementType
void BeforeThreadedGenerateData() override
VectorLinearInterpolateImageFunction< InputImageType, CoordinateType > DefaultInterpolatorType
VectorInterpolateImageFunction< InputImageType, CoordinateType > InterpolatorType
typename InterpolatorType::Pointer InterpolatorPointer
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
typename OutputImageType::IndexType IndexType
void SetDisplacementField(const DisplacementFieldType *field)
typename OutputImageType::PixelType::ValueType ValueType
SmartPointer< const Self > ConstPointer
void SetDisplacementField(DisplacementFieldType *field)
typename TOutputImage::DirectionType DirectionType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
typename TOutputImage::RegionType OutputImageRegionType
typename OutputImageType::SpacingType SpacingType
virtual void SetOutputOrigin(const double *origin)
Point< CoordinateType, Self::ImageDimension > PointType
void GenerateOutputInformation() override
~WarpVectorImageFilter() override=default
typename OutputImageType::PixelType PixelType
virtual void SetOutputSpacing(const double *spacing)
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....