ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkVectorExpandImageFilter.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 itkVectorExpandImageFilter_h
19#define itkVectorExpandImageFilter_h
20
23
24#if !defined(ITK_LEGACY_REMOVE)
25namespace itk
26{
73template <typename TInputImage, typename TOutputImage>
74class ITK_TEMPLATE_EXPORT VectorExpandImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
75{
76public:
77 ITK_DISALLOW_COPY_AND_MOVE(VectorExpandImageFilter);
78
80 using Self = VectorExpandImageFilter;
81 using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
82 using Pointer = SmartPointer<Self>;
83 using ConstPointer = SmartPointer<const Self>;
84
86 itkNewMacro(Self);
87
89 using InputImagePointer = typename TInputImage::Pointer;
90 using OutputImagePointer = typename TOutputImage::Pointer;
91 using OutputImageRegionType = typename TOutputImage::RegionType;
92
94 itkOverrideGetNameOfClassMacro(VectorExpandImageFilter);
95
97 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
98
100 using typename Superclass::InputImageType;
101 using typename Superclass::OutputImageType;
102
104 using OutputPixelType = typename OutputImageType::PixelType;
105 using OutputValueType = typename OutputPixelType::ValueType;
106 using InputPixelType = typename InputImageType::PixelType;
107 using InputValueType = typename InputPixelType::ValueType;
108
110 enum
111 {
112 VectorDimension = InputPixelType::Dimension
113 };
114
116 using ExpandFactorsType = float;
117 using ExpandFactorsArrayType = FixedArray<ExpandFactorsType, ImageDimension>;
118
120 using CoordinateType = double;
121# ifndef ITK_FUTURE_LEGACY_REMOVE
122 using CoordRepType ITK_FUTURE_DEPRECATED(
123 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") = CoordinateType;
124# endif
125 using InterpolatorType = VectorInterpolateImageFunction<InputImageType, CoordinateType>;
126 using InterpolatorPointer = typename InterpolatorType::Pointer;
127 using DefaultInterpolatorType = VectorLinearInterpolateImageFunction<InputImageType, CoordinateType>;
128
130 itkSetObjectMacro(Interpolator, InterpolatorType);
131 itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
133
136 itkSetMacro(ExpandFactors, ExpandFactorsArrayType);
137 virtual void
138 SetExpandFactors(const float factor);
139 itkSetVectorMacro(ExpandFactors, const unsigned int, ImageDimension);
141
143 itkGetConstReferenceMacro(ExpandFactors, ExpandFactorsArrayType);
144
151 void
152 GenerateOutputInformation() override;
153
159 void
160 GenerateInputRequestedRegion() override;
161
162 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputValueType>));
163 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputValueType>));
164
165protected:
166 VectorExpandImageFilter();
167 ~VectorExpandImageFilter() override = default;
168 void
169 PrintSelf(std::ostream & os, Indent indent) const override;
170
179 void
180 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
181
182
184 void
185 BeforeThreadedGenerateData() override;
186
187private:
188 ExpandFactorsArrayType m_ExpandFactors{};
189 InterpolatorPointer m_Interpolator{};
190};
191} // end namespace itk
192
193# ifndef ITK_MANUAL_INSTANTIATION
194# include "itkVectorExpandImageFilter.hxx"
195# endif
196
197#endif // ITK_LEGACY_REMOVE
198#endif
Base class for filters that take an image as input and produce an image as output.
SmartPointer< const Self > ConstPointer
BinaryGeneratorImageFilter< TInputImage1, TInputImage2, TOutputImage > Superclass
SmartPointer< Self > Pointer
AddImageFilter Self
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....