Loading...
Searching...
No Matches
itkGPUImageToImageFilter.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkGPUImageToImageFilter_h
#define itkGPUImageToImageFilter_h
#include "itkImageToImageFilter.h"
#include "itkOpenCLKernelManager.h"
namespace itk
{
template <typename TInputImage,
typename TOutputImage,
typename TParentImageFilter = ImageToImageFilter<TInputImage, TOutputImage>>
class ITK_TEMPLATE_EXPORT ITKOpenCL_EXPORT GPUImageToImageFilter : public TParentImageFilter
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GPUImageToImageFilter);
using Self = GPUImageToImageFilter;
using Superclass = TParentImageFilter;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(GPUImageToImageFilter, TParentImageFilter);
using typename Superclass::DataObjectIdentifierType;
using typename Superclass::OutputImageRegionType;
using typename Superclass::OutputImagePixelType;
using InputImageType = TInputImage;
using InputImagePointer = typename InputImageType::Pointer;
using InputImageConstPointer = typename InputImageType::ConstPointer;
using InputImageRegionType = typename InputImageType::RegionType;
using InputImagePixelType = typename InputImageType::PixelType;
using OutputImageType = TOutputImage;
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
// macro to set if GPU is used
itkSetMacro(GPUEnabled, bool);
itkGetConstMacro(GPUEnabled, bool);
itkBooleanMacro(GPUEnabled);
void
GraftOutput(DataObject * graft) override;
void
GraftOutput(const DataObjectIdentifierType & key, DataObject * graft) override;
void
SetNumberOfWorkUnits(ThreadIdType _arg) override;
protected:
GPUImageToImageFilter();
~GPUImageToImageFilter() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
void
GenerateData() override;
virtual void
GPUGenerateData()
{}
// GPU kernel manager
typename OpenCLKernelManager::Pointer m_GPUKernelManager{};
private:
bool m_GPUEnabled{};
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkGPUImageToImageFilter.hxx"
#endif
#endif
itk::GPUImageToImageFilter::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
itk::GPUImageToImageFilter::GenerateData
void GenerateData() override
itk::GPUImageToImageFilter::itkStaticConstMacro
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition itkGPUImageToImageFilter.h:91
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::m_GPUEnabled
bool m_GPUEnabled
Definition itkGPUImageToImageFilter.h:131
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::m_GPUKernelManager
OpenCLKernelManager::Pointer m_GPUKernelManager
Definition itkGPUImageToImageFilter.h:128
itk::GPUImageToImageFilter::~GPUImageToImageFilter
~GPUImageToImageFilter() override=default
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::Pointer
SmartPointer< Self > Pointer
Definition itkGPUImageToImageFilter.h:73
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::OutputImageType
TOutputImage OutputImageType
Definition itkGPUImageToImageFilter.h:93
itk::GPUImageToImageFilter::GraftOutput
void GraftOutput(DataObject *graft) override
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition itkGPUImageToImageFilter.h:90
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkGPUImageToImageFilter.h:74
itk::GPUImageToImageFilter::SetNumberOfWorkUnits
void SetNumberOfWorkUnits(ThreadIdType _arg) override
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::InputImageType
TInputImage InputImageType
Definition itkGPUImageToImageFilter.h:88
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::Self
GPUImageToImageFilter Self
Definition itkGPUImageToImageFilter.h:71
itk::GPUImageToImageFilter::GraftOutput
void GraftOutput(const DataObjectIdentifierType &key, DataObject *graft) override
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition itkGPUImageToImageFilter.h:92
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::Superclass
CPUSuperclass Superclass
Definition itkGPUImageToImageFilter.h:72
itk::GPUImageToImageFilter< TInputImage, TOutputImage, CPUSuperclass >::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition itkGPUImageToImageFilter.h:89
itk::GPUImageToImageFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::GPUImageToImageFilter::GPUGenerateData
virtual void GPUGenerateData()
Definition itkGPUImageToImageFilter.h:124
itk::GPUImageToImageFilter::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(GPUImageToImageFilter)
itk::GPUImageToImageFilter::GPUImageToImageFilter
GPUImageToImageFilter()
itk::OpenCLKernelManager::Pointer
SmartPointer< Self > Pointer
Definition itkOpenCLKernelManager.h:75
ITKOpenCL_EXPORT
#define ITKOpenCL_EXPORT
Definition itkOpenCLExport.h:33
itkOpenCLKernelManager.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |