18 #ifndef itkGPUFiniteDifferenceImageFilter_h
19 #define itkGPUFiniteDifferenceImageFilter_h
35 template<
typename TInputImage,
typename TOutputImage,
typename TParentImageFilter =
36 FiniteDifferenceImageFilter< TInputImage, TOutputImage > >
57 itkStaticConstMacro(ImageDimension,
unsigned int, OutputImageType::ImageDimension);
72 typedef typename FiniteDifferenceFunctionType::TimeStepType
TimeStepType;
73 typedef typename FiniteDifferenceFunctionType::RadiusType
RadiusType;
81 return this->m_DifferenceFunction;
89 itkDebugMacro(
"setting m_DifferenceFunction to " << differenceFunction);
90 if ( this->m_DifferenceFunction != differenceFunction )
92 this->m_DifferenceFunction = differenceFunction;
98 typedef enum { UNINITIALIZED = 0, INITIALIZED = 1 } FilterStateType;
103 this->SetState(INITIALIZED);
109 this->SetState(UNINITIALIZED);
113 #if !defined( ITK_WRAPPING_PARSER )
114 itkSetMacro(State, FilterStateType);
115 itkGetConstReferenceMacro(State, FilterStateType);
119 #ifdef ITK_USE_STRICT_CONCEPT_CHECKING
127 itkGetConstReferenceMacro(InitTime,
TimeProbe);
128 itkGetConstReferenceMacro(ComputeUpdateTime,
TimeProbe);
129 itkGetConstReferenceMacro(ApplyUpdateTime,
TimeProbe);
130 itkGetConstReferenceMacro(SmoothFieldTime,
TimeProbe);
137 void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
140 virtual
void AllocateUpdateBuffer() ITK_OVERRIDE = 0;
145 virtual
void GPUApplyUpdate(const TimeStepType& dt) = 0;
152 virtual TimeStepType GPUCalculateChange() = 0;
157 virtual
void CopyInputToOutput() ITK_OVERRIDE = 0;
162 virtual
void GPUGenerateData() ITK_OVERRIDE;
175 virtual
void GenerateInputRequestedRegion() ITK_OVERRIDE;
179 virtual
bool Halt() ITK_OVERRIDE;
190 virtual
bool ThreadedHalt(
void *itkNotUsed(threadInfo) ) ITK_OVERRIDE {
210 m_DifferenceFunction->InitializeIteration();
225 virtual TimeStepType ResolveTimeStep(
const std::vector<TimeStepType >& timeStepList,
226 const std::vector< bool >& valid)
const ITK_OVERRIDE;
258 void InitializeFunctionCoefficients();
272 #ifndef ITK_MANUAL_INSTANTIATION
273 #include "itkGPUFiniteDifferenceImageFilter.hxx"
FiniteDifferenceFunctionType::RadiusType RadiusType
Computes the time passed between two points in code.
virtual const FiniteDifferenceFunctionType::Pointer & GetDifferenceFunction() const override
FiniteDifferenceFunctionType::TimeStepType TimeStepType
NumericTraits< OutputPixelType >::ValueType OutputPixelValueType
virtual void Initialize() override
Base class for GPU Finite Difference Image Filters.
TOutputImage OutputImageType
SmartPointer< Self > Pointer
TInputImage InputImageType
TimeProbe m_SmoothFieldTime
bool m_ManualReinitialization
void SetStateToInitialized()
void SetStateToUninitialized()
GPUFiniteDifferenceFunction< TOutputImage >::DifferenceFunctionType FiniteDifferenceFunctionType
OutputPixelType PixelType
Base class for GPU filters that take an image as input and overwrite that image as the output...
virtual void InitializeIteration() override
SmartPointer< const Self > ConstPointer
GPUFiniteDifferenceImageFilter Self
GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter > GPUSuperclass
FiniteDifferenceFunctionType::NeighborhoodScalesType NeighborhoodScalesType
TParentImageFilter CPUSuperclass
TOutputImage::PixelType OutputPixelType
FiniteDifferenceFunctionType::Pointer m_DifferenceFunction
Control indentation during Print() invocation.
virtual void PostProcessOutput() override
NumericTraits< InputPixelType >::ValueType InputPixelValueType
TInputImage::PixelType InputPixelType
Define additional traits for native types such as int or float.
virtual void SetDifferenceFunction(FiniteDifferenceFunctionType *differenceFunction) override
#define itkConceptMacro(name, concept)