18 #ifndef itkGradientImageFilter_h
19 #define itkGradientImageFilter_h
29 template <
typename TPixelType,
unsigned int VImageDimension>
61 template <
typename TInputImage,
62 typename TOperatorValueType = float,
63 typename TOutputValueType = float,
64 typename TOutputImageType =
65 Image<CovariantVector<TOutputValueType, TInputImage::ImageDimension>, TInputImage::ImageDimension>>
73 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
74 static constexpr
unsigned int OutputImageDimension = TOutputImageType::ImageDimension;
109 GenerateInputRequestedRegion()
override;
116 itkSetMacro(UseImageSpacing,
bool);
117 itkGetConstMacro(UseImageSpacing,
bool);
118 itkBooleanMacro(UseImageSpacing);
121 #if !defined(ITK_FUTURE_LEGACY_REMOVE)
126 SetUseImageSpacingOn()
128 this->SetUseImageSpacing(
true);
135 SetUseImageSpacingOff()
137 this->SetUseImageSpacing(
false);
143 OverrideBoundaryCondition(ImageBoundaryCondition<TInputImage> * boundaryCondition);
145 #ifdef ITK_USE_CONCEPT_CHECKING
147 itkConceptMacro(InputConvertibleToOutputCheck, (Concept::Convertible<InputPixelType, OutputValueType>));
148 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputValueType>));
162 itkSetMacro(UseImageDirection,
bool);
163 itkGetConstMacro(UseImageDirection,
bool);
164 itkBooleanMacro(UseImageDirection);
168 GradientImageFilter();
169 ~GradientImageFilter()
override;
171 PrintSelf(std::ostream & os, Indent indent)
const override;
184 DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
189 GenerateOutputInformation()
override;
193 template <
typename TValue>
197 if (this->m_UseImageDirection)
200 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, physicalGradient);
209 template <
typename T>
214 if (this->m_UseImageDirection)
216 it.
GetImage()->TransformLocalVectorToPhysicalVector(gradient, it.
Value());
220 it.
Value() = gradient;
236 #ifndef ITK_MANUAL_INSTANTIATION
237 # include "itkGradientImageFilter.hxx"