Loading...
Searching...
No Matches
itkGPUTransformCopier.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 itkGPUTransformCopier_h
#define itkGPUTransformCopier_h
#include "itkTransform.h"
namespace itk
{
template <typename TTypeList, typename NDimensions, typename TTransform, typename TOutputTransformPrecisionType>
class ITK_TEMPLATE_EXPORT GPUTransformCopier : public Object
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GPUTransformCopier);
using Self = GPUTransformCopier;
using Superclass = Object;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(GPUTransformCopier, Object);
using CPUTransformType = TTransform;
using CPUTransformConstPointer = typename CPUTransformType::ConstPointer;
using CPUParametersType = typename CPUTransformType::ParametersType;
using CPUFixedParametersType = typename CPUTransformType::FixedParametersType;
using CPUScalarType = typename CPUTransformType::ScalarType;
itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension);
itkStaticConstMacro(OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension);
using GPUScalarType = TOutputTransformPrecisionType;
using GPUTransformType = Transform<GPUScalarType, InputSpaceDimension, OutputSpaceDimension>;
using GPUTransformPointer = typename GPUTransformType::Pointer;
using GPUParametersType = typename GPUTransformType::ParametersType;
using GPUFixedParametersType = typename GPUTransformType::FixedParametersType;
itkSetConstObjectMacro(InputTransform, CPUTransformType);
itkGetModifiableObjectMacro(Output, GPUTransformType);
itkGetConstMacro(ExplicitMode, bool);
itkSetMacro(ExplicitMode, bool);
void
Update();
#ifdef ITK_USE_CONCEPT_CHECKING
// Begin concept checking
itkConceptMacro(OutputTransformPrecisionTypeIsFloatingPointCheck,
(Concept::IsFloatingPoint<TOutputTransformPrecisionType>));
// End concept checking
#endif
protected:
GPUTransformCopier();
~GPUTransformCopier() override {}
void
PrintSelf(std::ostream & os, Indent indent) const override;
bool
CopyTransform(const CPUTransformConstPointer & fromTransform, GPUTransformPointer & toTransform);
void
CastCopyTransformParameters(const CPUTransformConstPointer & fromTransform, GPUTransformPointer & toTransform);
void
CastCopyParameters(const CPUParametersType & from, GPUParametersType & to);
void
CastCopyFixedParameters(const CPUFixedParametersType & from, GPUFixedParametersType & to);
private:
bool
CopyBSplineTransform(const CPUTransformConstPointer & fromTransform, GPUTransformPointer & toTransform);
template <unsigned int Dimension>
struct ITK_TEMPLATE_EXPORT TransformSpaceDimensionToType
{};
template <unsigned int InputSpaceDimension>
bool
CopyEuler2DTransform(const CPUTransformConstPointer &,
GPUTransformPointer &,
TransformSpaceDimensionToType<InputSpaceDimension>)
{
return false;
}
template <unsigned int InputSpaceDimension>
bool
CopyEuler3DTransform(const CPUTransformConstPointer &,
GPUTransformPointer &,
TransformSpaceDimensionToType<InputSpaceDimension>)
{
return false;
}
bool
CopyEuler2DTransform(const CPUTransformConstPointer & fromTransform,
GPUTransformPointer & toTransform,
TransformSpaceDimensionToType<2>);
bool
CopyEuler3DTransform(const CPUTransformConstPointer & fromTransform,
GPUTransformPointer & toTransform,
TransformSpaceDimensionToType<3>);
template <unsigned int InputSpaceDimension>
bool
CopySimilarity2DTransform(const CPUTransformConstPointer &,
GPUTransformPointer &,
TransformSpaceDimensionToType<InputSpaceDimension>)
{
return false;
}
template <unsigned int InputSpaceDimension>
bool
CopySimilarity3DTransform(const CPUTransformConstPointer &,
GPUTransformPointer &,
TransformSpaceDimensionToType<InputSpaceDimension>)
{
return false;
}
bool
CopySimilarity2DTransform(const CPUTransformConstPointer & fromTransform,
GPUTransformPointer & toTransform,
TransformSpaceDimensionToType<2>);
bool
CopySimilarity3DTransform(const CPUTransformConstPointer & fromTransform,
GPUTransformPointer & toTransform,
TransformSpaceDimensionToType<3>);
private:
CPUTransformConstPointer m_InputTransform{};
GPUTransformPointer m_Output{};
ModifiedTimeType m_InternalTransformTime{};
bool m_ExplicitMode{};
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkGPUTransformCopier.hxx"
#endif
#endif /* itkGPUTransformCopier_h */
itk::GPUTransformCopier::GPUTransformCopier
GPUTransformCopier()
itk::GPUTransformCopier::CopySimilarity2DTransform
bool CopySimilarity2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
itk::GPUTransformCopier::CastCopyParameters
void CastCopyParameters(const CPUParametersType &from, GPUParametersType &to)
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::Self
GPUTransformCopier Self
Definition itkGPUTransformCopier.h:68
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::GPUScalarType
GPUScalarType GPUScalarType
Definition itkGPUTransformCopier.h:91
itk::GPUTransformCopier::CopyEuler2DTransform
bool CopyEuler2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
itk::GPUTransformCopier::CopySimilarity3DTransform
bool CopySimilarity3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
itk::GPUTransformCopier::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(GPUTransformCopier)
itk::GPUTransformCopier::CopyEuler3DTransform
bool CopyEuler3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition itkGPUTransformCopier.h:171
itk::GPUTransformCopier::CastCopyTransformParameters
void CastCopyTransformParameters(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itk::GPUTransformCopier::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension)
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::GPUParametersType
typename GPUTransformType::ParametersType GPUParametersType
Definition itkGPUTransformCopier.h:94
itk::GPUTransformCopier::CopyEuler2DTransform
bool CopyEuler2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition itkGPUTransformCopier.h:160
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::m_InternalTransformTime
ModifiedTimeType m_InternalTransformTime
Definition itkGPUTransformCopier.h:228
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::GPUTransformType
Transform< GPUScalarType, InputSpaceDimension, OutputSpaceDimension > GPUTransformType
Definition itkGPUTransformCopier.h:92
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::CPUFixedParametersType
typename CPUTransformType::FixedParametersType CPUFixedParametersType
Definition itkGPUTransformCopier.h:83
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::Superclass
Object Superclass
Definition itkGPUTransformCopier.h:69
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::Pointer
SmartPointer< Self > Pointer
Definition itkGPUTransformCopier.h:70
itk::GPUTransformCopier::CopySimilarity3DTransform
bool CopySimilarity3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition itkGPUTransformCopier.h:205
itk::GPUTransformCopier::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Output, GPUTransformType)
itk::GPUTransformCopier::CopyBSplineTransform
bool CopyBSplineTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itk::GPUTransformCopier::CastCopyFixedParameters
void CastCopyFixedParameters(const CPUFixedParametersType &from, GPUFixedParametersType &to)
itk::GPUTransformCopier::CopySimilarity2DTransform
bool CopySimilarity2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition itkGPUTransformCopier.h:194
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::m_InputTransform
CPUTransformConstPointer m_InputTransform
Definition itkGPUTransformCopier.h:226
itk::GPUTransformCopier::Update
void Update()
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::m_ExplicitMode
bool m_ExplicitMode
Definition itkGPUTransformCopier.h:229
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::CPUParametersType
typename CPUTransformType::ParametersType CPUParametersType
Definition itkGPUTransformCopier.h:82
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkGPUTransformCopier.h:71
itk::GPUTransformCopier::CopyTransform
bool CopyTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::CPUScalarType
typename CPUTransformType::ScalarType CPUScalarType
Definition itkGPUTransformCopier.h:84
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::GPUTransformPointer
typename GPUTransformType::Pointer GPUTransformPointer
Definition itkGPUTransformCopier.h:93
itk::GPUTransformCopier::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::GPUFixedParametersType
typename GPUTransformType::FixedParametersType GPUFixedParametersType
Definition itkGPUTransformCopier.h:95
itk::GPUTransformCopier::~GPUTransformCopier
~GPUTransformCopier() override
Definition itkGPUTransformCopier.h:127
itk::GPUTransformCopier::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension)
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::CPUTransformType
CPUTransformType CPUTransformType
Definition itkGPUTransformCopier.h:80
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::CPUTransformConstPointer
typename CPUTransformType::ConstPointer CPUTransformConstPointer
Definition itkGPUTransformCopier.h:81
itk::GPUTransformCopier< TTypeList, NDimensions, CPUTransformType, GPUScalarType >::m_Output
GPUTransformPointer m_Output
Definition itkGPUTransformCopier.h:227
itk::GPUTransformCopier::CopyEuler3DTransform
bool CopyEuler3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
itk
Definition itkAdvancedImageToImageMetric.h:43
itk::GPUTransformCopier::TransformSpaceDimensionToType
Definition itkGPUTransformCopier.h:155

Generated on 1768596610 for elastix by 1.15.0 |