18 #ifndef itkGradientRecursiveGaussianImageFilter_h
19 #define itkGradientRecursiveGaussianImageFilter_h
56 typename TOutputImage = Image<
57 CovariantVector<typename NumericTraits<typename TInputImage::PixelType>::RealType, TInputImage::ImageDimension>,
58 TInputImage::ImageDimension>>
83 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
140 GetSigmaArray()
const;
150 SetNormalizeAcrossScale(
bool normalize);
151 itkGetConstMacro(NormalizeAcrossScale,
bool);
160 GenerateInputRequestedRegion()
override;
172 itkSetMacro(UseImageDirection,
bool);
173 itkGetConstMacro(UseImageDirection,
bool);
174 itkBooleanMacro(UseImageDirection);
177 #ifdef ITK_USE_CONCEPT_CHECKING
189 PrintSelf(std::ostream & os,
Indent indent)
const override;
193 GenerateData()
override;
197 EnlargeOutputRequestedRegion(
DataObject * output)
override;
200 GenerateOutputInformation()
override;
203 template <
typename TValue>
211 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, physicalGradient);
212 it.Set(
OutputPixelType(physicalGradient.GetDataPointer(), ImageDimension,
false));
215 template <
typename T>
224 for (
unsigned int nc = 0; nc < nComponents; ++nc)
228 for (
unsigned int dim = 0; dim < ImageDimension; ++dim)
230 componentGradient[dim] =
233 it.
GetImage()->TransformLocalVectorToPhysicalVector(componentGradient, correctedComponentGradient);
234 for (
unsigned int dim = 0; dim < ImageDimension; ++dim)
237 nc * ImageDimension + dim, correctedGradient, correctedComponentGradient[dim]);
240 it.
Set(correctedGradient);
243 template <
template <
typename,
unsigned int>
class P,
class T,
unsigned int VDimension>
249 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, it.Value());
253 std::vector<GaussianFilterPointer> m_SmoothingFilters{};
258 bool m_NormalizeAcrossScale{};
261 bool m_UseImageDirection{
true };
268 #ifndef ITK_MANUAL_INSTANTIATION
269 # include "itkGradientRecursiveGaussianImageFilter.hxx"