18 #ifndef itkVectorExpandImageFilter_h
19 #define itkVectorExpandImageFilter_h
24 #if !defined(ITK_LEGACY_REMOVE)
73 template <
typename TInputImage,
typename TOutputImage>
74 class ITK_TEMPLATE_EXPORT VectorExpandImageFilter :
public ImageToImageFilter<TInputImage, TOutputImage>
77 ITK_DISALLOW_COPY_AND_MOVE(VectorExpandImageFilter);
80 using Self = VectorExpandImageFilter;
81 using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
82 using Pointer = SmartPointer<Self>;
83 using ConstPointer = SmartPointer<const Self>;
89 using InputImagePointer =
typename TInputImage::Pointer;
90 using OutputImagePointer =
typename TOutputImage::Pointer;
94 itkTypeMacro(VectorExpandImageFilter, ImageToImageFilter);
97 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
100 using InputImageType =
typename Superclass::InputImageType;
101 using OutputImageType =
typename Superclass::OutputImageType;
104 using OutputPixelType =
typename OutputImageType::PixelType;
105 using OutputValueType =
typename OutputPixelType::ValueType;
106 using InputPixelType =
typename InputImageType::PixelType;
107 using InputValueType =
typename InputPixelType::ValueType;
116 using ExpandFactorsType = float;
117 using ExpandFactorsArrayType = FixedArray<ExpandFactorsType, ImageDimension>;
120 using CoordRepType = double;
121 using InterpolatorType = VectorInterpolateImageFunction<InputImageType, CoordRepType>;
122 using InterpolatorPointer =
typename InterpolatorType::Pointer;
123 using DefaultInterpolatorType = VectorLinearInterpolateImageFunction<InputImageType, CoordRepType>;
126 itkSetObjectMacro(Interpolator, InterpolatorType);
127 itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
132 itkSetMacro(ExpandFactors, ExpandFactorsArrayType);
134 SetExpandFactors(
const float factor);
135 itkSetVectorMacro(ExpandFactors,
const unsigned int, ImageDimension);
139 itkGetConstReferenceMacro(ExpandFactors, ExpandFactorsArrayType);
148 GenerateOutputInformation()
override;
156 GenerateInputRequestedRegion()
override;
158 # ifdef ITK_USE_CONCEPT_CHECKING
160 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputValueType>));
161 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputValueType>));
166 VectorExpandImageFilter();
167 ~VectorExpandImageFilter()
override =
default;
169 PrintSelf(std::ostream & os, Indent indent)
const override;
180 DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
185 BeforeThreadedGenerateData()
override;
188 ExpandFactorsArrayType m_ExpandFactors;
189 InterpolatorPointer m_Interpolator;
192 #endif // ITK_LEGACY_REMOVE
194 #ifndef ITK_MANUAL_INSTANTIATION
195 # include "itkVectorExpandImageFilter.hxx"