Loading...
Searching...
No Matches
elxOpenCLFixedGenericPyramid.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.
*
*=========================================================================*/
#ifndef elxOpenCLOpenCLFixedGenericPyramid_h
#define elxOpenCLOpenCLFixedGenericPyramid_h
#include "elxIncludes.h" // include first to avoid MSVS warning
#include "elxFixedGenericPyramid.h"
#include "itkGPUImage.h"
namespace elastix
{
template <class TElastix>
class ITK_TEMPLATE_EXPORT OpenCLFixedGenericPyramid : public FixedGenericPyramid<TElastix>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(OpenCLFixedGenericPyramid);
using Self = OpenCLFixedGenericPyramid;
using Superclass = FixedGenericPyramid<TElastix>;
using Superclass1 = typename FixedGenericPyramid<TElastix>::Superclass1;
using Superclass2 = typename FixedGenericPyramid<TElastix>::Superclass2;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(OpenCLFixedGenericPyramid, FixedGenericPyramid);
elxClassNameMacro("OpenCLFixedGenericImagePyramid");
itkStaticConstMacro(ImageDimension, unsigned int, Superclass1::ImageDimension);
using typename Superclass1::InputImageType;
using typename Superclass1::OutputImageType;
using InputImagePixelType = typename Superclass1::InputImageType::PixelType;
using OutputImagePixelType = typename Superclass1::OutputImageType::PixelType;
using ObjectFactoryBasePointer = typename itk::ObjectFactoryBase::Pointer;
using GPUInputImageType = itk::GPUImage<InputImagePixelType, InputImageType::ImageDimension>;
using GPUInputImagePointer = typename GPUInputImageType::Pointer;
using GPUOutputImageType = itk::GPUImage<OutputImagePixelType, OutputImageType::ImageDimension>;
using GPUPyramidType = itk::GenericMultiResolutionPyramidImageFilter<GPUInputImageType, GPUOutputImageType, float>;
using GPUPyramidPointer = typename GPUPyramidType::Pointer;
void
BeforeRegistration() override;
virtual void
ReadFromFile();
protected:
void
BeforeGenerateData();
void
GenerateData() override;
OpenCLFixedGenericPyramid();
~OpenCLFixedGenericPyramid() override = default;
private:
elxOverrideGetSelfMacro;
void
RegisterFactories();
void
UnregisterFactories();
void
SwitchingToCPUAndReport(const bool configError);
void
ReportToLog();
GPUPyramidPointer m_GPUPyramid;
bool m_GPUPyramidReady;
bool m_GPUPyramidCreated;
bool m_ContextCreated;
bool m_UseOpenCL;
std::vector<ObjectFactoryBasePointer> m_Factories;
};
} // end namespace elastix
#ifndef ITK_MANUAL_INSTANTIATION
# include "elxOpenCLFixedGenericPyramid.hxx"
#endif
#endif // end #ifndef elxOpenCLOpenCLFixedGenericPyramid_h
elastix::FixedGenericPyramid::Superclass2
FixedImagePyramidBase< TElastix > Superclass2
Definition elxFixedGenericPyramid.h:81
elastix::FixedGenericPyramid::Superclass1
itk::GenericMultiResolutionPyramidImageFilter< typename FixedImagePyramidBase< TElastix >::InputImageType, typename FixedImagePyramidBase< TElastix >::OutputImageType > Superclass1
Definition elxFixedGenericPyramid.h:78
elastix::FixedGenericPyramid::FixedGenericPyramid
FixedGenericPyramid()=default
elastix::OpenCLFixedGenericPyramid::GPUInputImageType
itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension > GPUInputImageType
Definition elxOpenCLFixedGenericPyramid.h:86
elastix::OpenCLFixedGenericPyramid::m_GPUPyramidCreated
bool m_GPUPyramidCreated
Definition elxOpenCLFixedGenericPyramid.h:135
elastix::OpenCLFixedGenericPyramid::Self
OpenCLFixedGenericPyramid Self
Definition elxOpenCLFixedGenericPyramid.h:54
elastix::OpenCLFixedGenericPyramid::ReportToLog
void ReportToLog()
elastix::OpenCLFixedGenericPyramid::m_Factories
std::vector< ObjectFactoryBasePointer > m_Factories
Definition elxOpenCLFixedGenericPyramid.h:138
elastix::OpenCLFixedGenericPyramid::RegisterFactories
void RegisterFactories()
elastix::OpenCLFixedGenericPyramid::m_ContextCreated
bool m_ContextCreated
Definition elxOpenCLFixedGenericPyramid.h:136
elastix::OpenCLFixedGenericPyramid::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition elxOpenCLFixedGenericPyramid.h:59
elastix::OpenCLFixedGenericPyramid::OpenCLFixedGenericPyramid
OpenCLFixedGenericPyramid()
elastix::OpenCLFixedGenericPyramid::ObjectFactoryBasePointer
typename itk::ObjectFactoryBase::Pointer ObjectFactoryBasePointer
Definition elxOpenCLFixedGenericPyramid.h:83
elastix::OpenCLFixedGenericPyramid::InputImagePixelType
typename Superclass1::InputImageType::PixelType InputImagePixelType
Definition elxOpenCLFixedGenericPyramid.h:79
elastix::OpenCLFixedGenericPyramid::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, Superclass1::ImageDimension)
elastix::OpenCLFixedGenericPyramid::SwitchingToCPUAndReport
void SwitchingToCPUAndReport(const bool configError)
elastix::OpenCLFixedGenericPyramid::m_GPUPyramid
GPUPyramidPointer m_GPUPyramid
Definition elxOpenCLFixedGenericPyramid.h:133
elastix::OpenCLFixedGenericPyramid::m_GPUPyramidReady
bool m_GPUPyramidReady
Definition elxOpenCLFixedGenericPyramid.h:134
elastix::OpenCLFixedGenericPyramid::GPUInputImagePointer
typename GPUInputImageType::Pointer GPUInputImagePointer
Definition elxOpenCLFixedGenericPyramid.h:87
elastix::OpenCLFixedGenericPyramid::GPUPyramidType
itk::GenericMultiResolutionPyramidImageFilter< GPUInputImageType, GPUOutputImageType, float > GPUPyramidType
Definition elxOpenCLFixedGenericPyramid.h:90
elastix::OpenCLFixedGenericPyramid::BeforeRegistration
void BeforeRegistration() override
elastix::OpenCLFixedGenericPyramid::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(OpenCLFixedGenericPyramid)
elastix::OpenCLFixedGenericPyramid::GenerateData
void GenerateData() override
elastix::OpenCLFixedGenericPyramid::ReadFromFile
virtual void ReadFromFile()
elastix::OpenCLFixedGenericPyramid::GPUOutputImageType
itk::GPUImage< OutputImagePixelType, OutputImageType::ImageDimension > GPUOutputImageType
Definition elxOpenCLFixedGenericPyramid.h:88
elastix::OpenCLFixedGenericPyramid::BeforeGenerateData
void BeforeGenerateData()
elastix::OpenCLFixedGenericPyramid::Superclass1
typename FixedGenericPyramid< TElastix >::Superclass1 Superclass1
Definition elxOpenCLFixedGenericPyramid.h:56
elastix::OpenCLFixedGenericPyramid::Pointer
itk::SmartPointer< Self > Pointer
Definition elxOpenCLFixedGenericPyramid.h:58
elastix::OpenCLFixedGenericPyramid::Superclass
FixedGenericPyramid< TElastix > Superclass
Definition elxOpenCLFixedGenericPyramid.h:55
elastix::OpenCLFixedGenericPyramid::elxOverrideGetSelfMacro
elxOverrideGetSelfMacro
Definition elxOpenCLFixedGenericPyramid.h:116
elastix::OpenCLFixedGenericPyramid::Superclass2
typename FixedGenericPyramid< TElastix >::Superclass2 Superclass2
Definition elxOpenCLFixedGenericPyramid.h:57
elastix::OpenCLFixedGenericPyramid::elxClassNameMacro
elxClassNameMacro("OpenCLFixedGenericImagePyramid")
elastix::OpenCLFixedGenericPyramid::m_UseOpenCL
bool m_UseOpenCL
Definition elxOpenCLFixedGenericPyramid.h:137
elastix::OpenCLFixedGenericPyramid::UnregisterFactories
void UnregisterFactories()
elastix::OpenCLFixedGenericPyramid::GPUPyramidPointer
typename GPUPyramidType::Pointer GPUPyramidPointer
Definition elxOpenCLFixedGenericPyramid.h:91
elastix::OpenCLFixedGenericPyramid::OutputImagePixelType
typename Superclass1::OutputImageType::PixelType OutputImagePixelType
Definition elxOpenCLFixedGenericPyramid.h:80
elastix::OpenCLFixedGenericPyramid::~OpenCLFixedGenericPyramid
~OpenCLFixedGenericPyramid() override=default
itk::GPUImage
Templated n-dimensional image class for the GPU.
Definition itkGPUImage.h:64
itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension >::Pointer
SmartPointer< Self > Pointer
Definition itkGPUImage.h:70
itk::GenericMultiResolutionPyramidImageFilter
Framework for creating images in a multi-resolution pyramid.
Definition itkGenericMultiResolutionPyramidImageFilter.h:119
itk::GenericMultiResolutionPyramidImageFilter< GPUInputImageType, GPUOutputImageType, float >::Pointer
SmartPointer< Self > Pointer
Definition itkGenericMultiResolutionPyramidImageFilter.h:127
elxFixedGenericPyramid.h
elxIncludes.h
itkGPUImage.h
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |