ITK  5.4.0
Insight Toolkit
itkGPUInPlaceImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 
19 #ifndef itkGPUInPlaceImageFilter_h
20 #define itkGPUInPlaceImageFilter_h
21 
22 #include "itkInPlaceImageFilter.h"
24 
25 namespace itk
26 {
36 template <typename TInputImage,
37  typename TOutputImage = TInputImage,
38  typename TParentImageFilter = InPlaceImageFilter<TInputImage, TOutputImage>>
39 class ITK_TEMPLATE_EXPORT GPUInPlaceImageFilter
40  : public GPUImageToImageFilter<TInputImage, TOutputImage, TParentImageFilter>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(GPUInPlaceImageFilter);
44 
48  using CPUSuperclass = TParentImageFilter;
51 
53  itkOverrideGetNameOfClassMacro(GPUInPlaceImageFilter);
54 
60 
62  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
63  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
64 
66  using InputImageType = TInputImage;
70  using InputImagePixelType = typename InputImageType::PixelType;
71 
72 protected:
74  ~GPUInPlaceImageFilter() override;
75 
76  void
77  PrintSelf(std::ostream & os, Indent indent) const override;
78 
91  void
92  AllocateOutputs() override;
93 
103  void
104  ReleaseInputs() override;
105 };
108 } // end namespace itk
109 
110 #ifndef ITK_MANUAL_INSTANTIATION
111 # include "itkGPUInPlaceImageFilter.hxx"
112 #endif
113 
114 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::CastImageFilter
Casts input pixels to output pixel type.
Definition: itkCastImageFilter.h:100
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::GPUInPlaceImageFilter
Base class for GPU filters that take an image as input and overwrite that image as the output.
Definition: itkGPUInPlaceImageFilter.h:39
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itkGPUImageToImageFilter.h
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::GPUImageToImageFilter
class to abstract the behaviour of the GPU filters.
Definition: itkGPUImageToImageFilter.h:41
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkInPlaceImageFilter.h
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ImageToImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToImageFilter.h:131
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90