ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkGPUDenseFiniteDifferenceImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkGPUDenseFiniteDifferenceImageFilter_h
19 #define itkGPUDenseFiniteDifferenceImageFilter_h
20 
23 
24 namespace itk
25 {
27 itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel);
28 
52 template< typename TInputImage, typename TOutputImage, typename TParentImageFilter =
53  DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage > >
55  public GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
56 {
57 public:
58 
62  typedef TParentImageFilter CPUSuperclass;
65 
68 
73 
76  itkStaticConstMacro(ImageDimension, unsigned int, GPUSuperclass::ImageDimension);
77 
81 
84 
87 
88 #ifdef ITK_USE_CONCEPT_CHECKING
89  // Begin concept checking
90  itkConceptMacro( OutputTimesDoubleCheck,
92  itkConceptMacro( OutputAdditiveOperatorsCheck,
94  itkConceptMacro( InputConvertibleToOutputCheck,
96  // End concept checking
97 #endif
98 
100  itkGetOpenCLSourceFromKernelMacro(GPUDenseFiniteDifferenceImageFilterKernel);
101 
102 protected:
105  }
106  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
107 
110  virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE;
111 
112  virtual void GPUApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE;
113 
116  virtual TimeStepType GPUCalculateChange() ITK_OVERRIDE;
117 
121  virtual void CopyInputToOutput() ITK_OVERRIDE;
122 
125  virtual UpdateBufferType * GetUpdateBuffer() ITK_OVERRIDE {
126  return CPUSuperclass::GetUpdateBuffer();
127  }
128 
131  virtual void AllocateUpdateBuffer() ITK_OVERRIDE;
132 
133  /* GPU kernel handle for GPUApplyUpdate */
135 
136 private:
137  GPUDenseFiniteDifferenceImageFilter(const Self &); //purposely not implemented
138  void operator=(const Self &); //purposely not implemented
139 
140 };
141 } // end namespace itk
142 
143 #ifndef ITK_MANUAL_INSTANTIATION
144 #include "itkGPUDenseFiniteDifferenceImageFilter.hxx"
145 #endif
146 
147 #endif
class to abstract the behaviour of the GPU filters.
virtual void CopyInputToOutput() override
void PrintSelf(std::ostream &os, Indent indent) const override
FiniteDifferenceFunctionType::TimeStepType TimeStepType
Base class for GPU Finite Difference Image Filters.
itkGPUKernelClassMacro(GPUImageOpsKernel)
itkGetOpenCLSourceFromKernelMacro(GPUDenseFiniteDifferenceImageFilterKernel)
GPUFiniteDifferenceFunction< TOutputImage >::DifferenceFunctionType FiniteDifferenceFunctionType
GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter > GPUSuperclass
virtual void AllocateUpdateBuffer() override
virtual TimeStepType GPUCalculateChange() override
virtual void ApplyUpdate(const TimeStepType &dt) override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
GPUSuperclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
#define itkConceptMacro(name, concept)
virtual void GPUApplyUpdate(const TimeStepType &dt) override