18 #ifndef itkGradientImageFilter_h
19 #define itkGradientImageFilter_h
29 template <
typename TPixelType,
unsigned int VImageDimension >
class VectorImage;
54 template<
typename TInputImage,
55 typename TOperatorValueType = float,
56 typename TOutputValueType = float,
57 typename TOutputImageType = Image< CovariantVector< TOutputValueType,
58 TInputImage::ImageDimension >,
59 TInputImage::ImageDimension > >
67 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
68 static constexpr
unsigned int OutputImageDimension = TOutputImageType::ImageDimension;
103 void GenerateInputRequestedRegion()
override;
108 { this->SetUseImageSpacing(
true); }
113 { this->SetUseImageSpacing(
false); }
117 itkSetMacro(UseImageSpacing,
bool);
118 itkGetConstMacro(UseImageSpacing,
bool);
119 itkBooleanMacro(UseImageSpacing);
124 #ifdef ITK_USE_CONCEPT_CHECKING
143 itkSetMacro(UseImageDirection,
bool);
144 itkGetConstMacro(UseImageDirection,
bool);
145 itkBooleanMacro(UseImageDirection);
151 void PrintSelf(std::ostream & os,
Indent indent)
const override;
163 void DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
167 void GenerateOutputInformation()
override;
171 template <
typename TValue>
174 if ( this->m_UseImageDirection )
177 it.GetImage()->TransformLocalVectorToPhysicalVector( gradient, physicalGradient );
186 template <
typename T >
190 if ( this->m_UseImageDirection )
192 it.
GetImage()->TransformLocalVectorToPhysicalVector( gradient, it.
Value() );
196 it.
Value() = gradient;
212 #ifndef ITK_MANUAL_INSTANTIATION
213 #include "itkGradientImageFilter.hxx"
typename InputImageType::Pointer InputImagePointer
ImageBoundaryCondition< TInputImage, TInputImage > * m_BoundaryCondition
Light weight base class for most itk classes.
void SetUseImageSpacingOn()
Templated n-dimensional vector image class.
typename OutputImageType::PixelType OutputPixelType
typename InputImageType::PixelType InputPixelType
TOutputValueType OutputValueType
void SetOutputPixel(ImageRegionIterator< VectorImage< TValue, OutputImageDimension > > &it, CovariantVectorType &gradient)
typename OutputImageType::RegionType OutputImageRegionType
void SetOutputPixel(ImageRegionIterator< T > &it, CovariantVectorType &gradient)
TInputImage InputImageType
void SetUseImageSpacingOff()
typename OutputImageType::Pointer OutputImagePointer
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
TOperatorValueType OperatorValueType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
ValueType * GetDataPointer()
ImageBaseType::RegionType RegionType
TOutputImageType OutputImageType
#define itkConceptMacro(name, concept)
A templated class holding a n-Dimensional covariant vector.
A multi-dimensional iterator templated over image type that walks a region of pixels.
const ImageType * GetImage() const
Computes the gradient of an image using directional derivatives.