ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkGPUNeighborhoodOperatorImageFilter.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 __itkGPUNeighborhoodOperatorImageFilter_h
19 #define __itkGPUNeighborhoodOperatorImageFilter_h
20 
21 #include "itkGPUImage.h"
23 #include "itkImageToImageFilter.h"
25 #include "itkImage.h"
28 
29 namespace itk
30 {
44 itkGPUKernelClassMacro(GPUNeighborhoodOperatorImageFilterKernel);
45 
46 template< class TInputImage, class TOutputImage,
47  class TOperatorValueType = typename TOutputImage::PixelType,
48  class TParentImageFilter = NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType> >
50  public GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
51 {
52 public:
55  typedef TParentImageFilter CPUSuperclass;
59 
61  itkNewMacro(Self);
62 
65 
68  typedef typename TOutputImage::PixelType OutputPixelType;
69  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
70  typedef typename TInputImage::PixelType InputPixelType;
71  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
72  typedef TOperatorValueType OperatorValueType;
73 
76 
78 
80  itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
81  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
82  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
84 
86  typedef TInputImage InputImageType;
87  typedef TOutputImage OutputImageType;
88  typedef typename InputImageType::Pointer InputImagePointer;
89 
93 
96 
99 
102  itkGetStaticConstMacro(ImageDimension) > OutputNeighborhoodType;
103 
105  itkGetOpenCLSourceFromKernelMacro(GPUNeighborhoodOperatorImageFilterKernel);
106 
110  void SetOperator(const OutputNeighborhoodType & p);
111 
138 #ifdef ITK_USE_CONCEPT_CHECKING
139 
140  // itkConceptMacro( SameDimensionCheck,
141  // ( Concept::SameDimension< InputImageDimension, ImageDimension > ) );
142  // itkConceptMacro( OperatorConvertibleToOutputCheck,
143  // ( Concept::Convertible< OperatorValueType, OutputPixelType > ) );
144  // itkConceptMacro( InputConvertibleToOperatorCheck,
145  // ( Concept::Convertible< InputPixelValueType, OperatorValueType > ) );
146  // itkConceptMacro( OperatorMultiplyOperatorCheck,
147  // ( Concept::MultiplyOperator< OperatorValueType > ) );
148  // itkConceptMacro( OperatorAdditiveOperatorsCheck,
149  // ( Concept::AdditiveOperators< OperatorValueType > ) );
150 
152 #endif
153 
154 protected:
157  }
158 
173  void GPUGenerateData();
174 
175  void PrintSelf(std::ostream & os, Indent indent) const
176  {
177  GPUSuperclass::PrintSelf(os, indent);
178  }
179 
180 private:
181  GPUNeighborhoodOperatorImageFilter(const Self &); //purposely not implemented
182  void operator=(const Self &); //purposely not implemented
183 
195 
197 };
198 } // end namespace itk
199 
200 #ifndef ITK_MANUAL_INSTANTIATION
201 #include "itkGPUNeighborhoodOperatorImageFilter.hxx"
202 #endif
203 
204 #endif
205