Skip to content

Commit

Permalink
STYLE: Rename TCoordRep template parameters to TCoordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker committed Jan 9, 2025
1 parent 26abd4f commit 6517f22
Show file tree
Hide file tree
Showing 24 changed files with 201 additions and 198 deletions.
14 changes: 7 additions & 7 deletions Common/OpenCL/Filters/itkGPUBSplineInterpolateImageFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ itkGPUKernelClassMacro(GPUBSplineInterpolateImageFunctionKernel);
*
* \ingroup GPUCommon
*/
template <typename TInputImage, typename TCoordRep = float, typename TCoefficientType = float>
template <typename TInputImage, typename TCoordinate = float, typename TCoefficientType = float>
class ITK_EXPORT GPUBSplineInterpolateImageFunction
: public GPUInterpolateImageFunction<TInputImage,
TCoordRep,
BSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>>
TCoordinate,
BSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GPUBSplineInterpolateImageFunction);
Expand All @@ -54,12 +54,12 @@ class ITK_EXPORT GPUBSplineInterpolateImageFunction
using Self = GPUBSplineInterpolateImageFunction;
using GPUSuperclass =
GPUInterpolateImageFunction<TInputImage,
TCoordRep,
BSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>>;
TCoordinate,
BSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>>;
using CPUSuperclass =
BSplineInterpolateImageFunction<TInputImage,
TCoordRep,
BSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>>;
TCoordinate,
BSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>>;
using Superclass = GPUSuperclass;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
Expand Down
27 changes: 14 additions & 13 deletions Common/OpenCL/Filters/itkGPUBSplineInterpolateImageFunction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

namespace itk
{
template <typename TInputImage, typename TCoordRep, typename TCoefficientType>
GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::GPUBSplineInterpolateImageFunction()
template <typename TInputImage, typename TCoordinate, typename TCoefficientType>
GPUBSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>::GPUBSplineInterpolateImageFunction()
{
// Create GPU coefficients image
this->m_GPUCoefficients = GPUCoefficientImageType::New();
Expand All @@ -42,9 +42,9 @@ GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::GP


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TCoefficientType>
template <typename TInputImage, typename TCoordinate, typename TCoefficientType>
void
GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::SetInputImage(
GPUBSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>::SetInputImage(
const TInputImage * inputData)
{
Superclass::SetInputImage(inputData);
Expand All @@ -53,29 +53,30 @@ GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::Se


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TCoefficientType>
template <typename TInputImage, typename TCoordinate, typename TCoefficientType>
auto
GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::GetGPUCoefficients() const
GPUBSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>::GetGPUCoefficients() const
-> const GPUCoefficientImagePointer
{
return this->m_GPUCoefficients;
}


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TCoefficientType>
template <typename TInputImage, typename TCoordinate, typename TCoefficientType>
auto
GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::GetGPUCoefficientsImageBase() const
GPUBSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>::GetGPUCoefficientsImageBase() const
-> const GPUDataManagerPointer
{
return this->m_GPUCoefficientsImageBase;
}


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TCoefficientType>
template <typename TInputImage, typename TCoordinate, typename TCoefficientType>
bool
GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::GetSourceCode(std::string & source) const
GPUBSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>::GetSourceCode(
std::string & source) const
{
if (this->m_Sources.empty())
{
Expand All @@ -97,10 +98,10 @@ GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::Ge


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TCoefficientType>
template <typename TInputImage, typename TCoordinate, typename TCoefficientType>
void
GPUBSplineInterpolateImageFunction<TInputImage, TCoordRep, TCoefficientType>::PrintSelf(std::ostream & os,
Indent indent) const
GPUBSplineInterpolateImageFunction<TInputImage, TCoordinate, TCoefficientType>::PrintSelf(std::ostream & os,
Indent indent) const
{
GPUSuperclass::PrintSelf(os, indent);
}
Expand Down
4 changes: 2 additions & 2 deletions Common/OpenCL/Filters/itkGPUInterpolateImageFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace itk
* \ingroup GPUCommon
*/
template <typename TInputImage,
typename TCoordRep = float,
typename TParentInterpolateImageFunction = InterpolateImageFunction<TInputImage, TCoordRep>>
typename TCoordinate = float,
typename TParentInterpolateImageFunction = InterpolateImageFunction<TInputImage, TCoordinate>>
class ITK_TEMPLATE_EXPORT GPUInterpolateImageFunction
: public TParentInterpolateImageFunction
, public GPUInterpolatorBase
Expand Down
14 changes: 7 additions & 7 deletions Common/OpenCL/Filters/itkGPUInterpolateImageFunction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ SetContinuousIndex(const TContinuousIndex & cindex, cl_float4 & oclindex)
//------------------------------------------------------------------------------
namespace itk
{
template <typename TInputImage, typename TCoordRep, typename TParentInterpolateImageFunction>
GPUInterpolateImageFunction<TInputImage, TCoordRep, TParentInterpolateImageFunction>::GPUInterpolateImageFunction()
template <typename TInputImage, typename TCoordinate, typename TParentInterpolateImageFunction>
GPUInterpolateImageFunction<TInputImage, TCoordinate, TParentInterpolateImageFunction>::GPUInterpolateImageFunction()
{
const unsigned int ImageDim = InputImageType::ImageDimension;

Expand All @@ -151,9 +151,9 @@ GPUInterpolateImageFunction<TInputImage, TCoordRep, TParentInterpolateImageFunct


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TParentInterpolateImageFunction>
template <typename TInputImage, typename TCoordinate, typename TParentInterpolateImageFunction>
GPUDataManager::Pointer
GPUInterpolateImageFunction<TInputImage, TCoordRep, TParentInterpolateImageFunction>::GetParametersDataManager() const
GPUInterpolateImageFunction<TInputImage, TCoordinate, TParentInterpolateImageFunction>::GetParametersDataManager() const
{
const unsigned int ImageDim = InputImageType::ImageDimension;

Expand Down Expand Up @@ -204,10 +204,10 @@ GPUInterpolateImageFunction<TInputImage, TCoordRep, TParentInterpolateImageFunct


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep, typename TParentInterpolateImageFunction>
template <typename TInputImage, typename TCoordinate, typename TParentInterpolateImageFunction>
void
GPUInterpolateImageFunction<TInputImage, TCoordRep, TParentInterpolateImageFunction>::PrintSelf(std::ostream & os,
Indent indent) const
GPUInterpolateImageFunction<TInputImage, TCoordinate, TParentInterpolateImageFunction>::PrintSelf(std::ostream & os,
Indent indent) const
{
CPUSuperclass::PrintSelf(os, indent);
}
Expand Down
10 changes: 6 additions & 4 deletions Common/OpenCL/Filters/itkGPULinearInterpolateImageFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ itkGPUKernelClassMacro(GPULinearInterpolateImageFunctionKernel);
*
* \ingroup GPUCommon
*/
template <typename TInputImage, typename TCoordRep = float>
template <typename TInputImage, typename TCoordinate = float>
class ITK_EXPORT GPULinearInterpolateImageFunction
: public GPUInterpolateImageFunction<TInputImage, TCoordRep, LinearInterpolateImageFunction<TInputImage, TCoordRep>>
: public GPUInterpolateImageFunction<TInputImage,
TCoordinate,
LinearInterpolateImageFunction<TInputImage, TCoordinate>>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GPULinearInterpolateImageFunction);

/** Standard class typedefs. */
using Self = GPULinearInterpolateImageFunction;
using CPUSuperclass = LinearInterpolateImageFunction<TInputImage, TCoordRep>;
using GPUSuperclass = GPUInterpolateImageFunction<TInputImage, TCoordRep, CPUSuperclass>;
using CPUSuperclass = LinearInterpolateImageFunction<TInputImage, TCoordinate>;
using GPUSuperclass = GPUInterpolateImageFunction<TInputImage, TCoordinate, CPUSuperclass>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

Expand Down
12 changes: 6 additions & 6 deletions Common/OpenCL/Filters/itkGPULinearInterpolateImageFunction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

namespace itk
{
template <typename TInputImage, typename TCoordRep>
GPULinearInterpolateImageFunction<TInputImage, TCoordRep>::GPULinearInterpolateImageFunction()
template <typename TInputImage, typename TCoordinate>
GPULinearInterpolateImageFunction<TInputImage, TCoordinate>::GPULinearInterpolateImageFunction()
{
// Add GPUImageFunction implementation
const std::string sourcePath0(GPUImageFunctionKernel::GetOpenCLSource());
Expand All @@ -38,9 +38,9 @@ GPULinearInterpolateImageFunction<TInputImage, TCoordRep>::GPULinearInterpolateI


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep>
template <typename TInputImage, typename TCoordinate>
bool
GPULinearInterpolateImageFunction<TInputImage, TCoordRep>::GetSourceCode(std::string & source) const
GPULinearInterpolateImageFunction<TInputImage, TCoordinate>::GetSourceCode(std::string & source) const
{
if (this->m_Sources.empty())
{
Expand All @@ -60,9 +60,9 @@ GPULinearInterpolateImageFunction<TInputImage, TCoordRep>::GetSourceCode(std::st


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep>
template <typename TInputImage, typename TCoordinate>
void
GPULinearInterpolateImageFunction<TInputImage, TCoordRep>::PrintSelf(std::ostream & os, Indent indent) const
GPULinearInterpolateImageFunction<TInputImage, TCoordinate>::PrintSelf(std::ostream & os, Indent indent) const
{
CPUSuperclass::PrintSelf(os, indent);
GPUSuperclass::PrintSelf(os, indent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ itkGPUKernelClassMacro(GPUNearestNeighborInterpolateImageFunctionKernel);
*
* \ingroup GPUCommon
*/
template <typename TInputImage, typename TCoordRep = float>
template <typename TInputImage, typename TCoordinate = float>
class ITK_TEMPLATE_EXPORT GPUNearestNeighborInterpolateImageFunction
: public GPUInterpolateImageFunction<TInputImage,
TCoordRep,
NearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>>
TCoordinate,
NearestNeighborInterpolateImageFunction<TInputImage, TCoordinate>>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GPUNearestNeighborInterpolateImageFunction);

/** Standard class typedefs. */
using Self = GPUNearestNeighborInterpolateImageFunction;
using CPUSuperclass = NearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>;
using GPUSuperclass = GPUInterpolateImageFunction<TInputImage, TCoordRep, CPUSuperclass>;
using CPUSuperclass = NearestNeighborInterpolateImageFunction<TInputImage, TCoordinate>;
using GPUSuperclass = GPUInterpolateImageFunction<TInputImage, TCoordinate, CPUSuperclass>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

namespace itk
{
template <typename TInputImage, typename TCoordRep>
GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>::GPUNearestNeighborInterpolateImageFunction()
template <typename TInputImage, typename TCoordinate>
GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordinate>::GPUNearestNeighborInterpolateImageFunction()
{
// Add GPUImageFunction implementation
const std::string sourcePath0(GPUImageFunctionKernel::GetOpenCLSource());
Expand All @@ -38,9 +38,9 @@ GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>::GPUNearestNe


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep>
template <typename TInputImage, typename TCoordinate>
bool
GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>::GetSourceCode(std::string & source) const
GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordinate>::GetSourceCode(std::string & source) const
{
if (this->m_Sources.empty())
{
Expand All @@ -60,9 +60,9 @@ GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>::GetSourceCod


//------------------------------------------------------------------------------
template <typename TInputImage, typename TCoordRep>
template <typename TInputImage, typename TCoordinate>
void
GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordRep>::PrintSelf(std::ostream & os, Indent indent) const
GPUNearestNeighborInterpolateImageFunction<TInputImage, TCoordinate>::PrintSelf(std::ostream & os, Indent indent) const
{
CPUSuperclass::PrintSelf(os, indent);
GPUSuperclass::PrintSelf(os, indent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ namespace itk
* \ingroup Functions ImageInterpolators
*/

template <typename TCoordRep = float, unsigned int VSpaceDimension = 2, unsigned int VSplineOrder = 3>
template <typename TCoordinate = float, unsigned int VSpaceDimension = 2, unsigned int VSplineOrder = 3>
class ITK_TEMPLATE_EXPORT BSplineInterpolationDerivativeWeightFunction
: public BSplineInterpolationWeightFunctionBase<TCoordRep, VSpaceDimension, VSplineOrder>
: public BSplineInterpolationWeightFunctionBase<TCoordinate, VSpaceDimension, VSplineOrder>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(BSplineInterpolationDerivativeWeightFunction);

/** Standard class typedefs. */
using Self = BSplineInterpolationDerivativeWeightFunction;
using Superclass = BSplineInterpolationWeightFunctionBase<TCoordRep, VSpaceDimension, VSplineOrder>;
using Superclass = BSplineInterpolationWeightFunctionBase<TCoordinate, VSpaceDimension, VSplineOrder>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace itk
* ****************** Constructor *******************************
*/

template <typename TCoordRep, unsigned int VSpaceDimension, unsigned int VSplineOrder>
BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSplineOrder>::
template <typename TCoordinate, unsigned int VSpaceDimension, unsigned int VSplineOrder>
BSplineInterpolationDerivativeWeightFunction<TCoordinate, VSpaceDimension, VSplineOrder>::
BSplineInterpolationDerivativeWeightFunction()
{
/** Initialize members. */
Expand All @@ -41,9 +41,9 @@ BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSpline
* ******************* SetDerivativeDirection *******************
*/

template <typename TCoordRep, unsigned int VSpaceDimension, unsigned int VSplineOrder>
template <typename TCoordinate, unsigned int VSpaceDimension, unsigned int VSplineOrder>
void
BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSplineOrder>::SetDerivativeDirection(
BSplineInterpolationDerivativeWeightFunction<TCoordinate, VSpaceDimension, VSplineOrder>::SetDerivativeDirection(
unsigned int dir)
{
if (dir != this->m_DerivativeDirection)
Expand All @@ -63,10 +63,10 @@ BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSpline
* ******************* PrintSelf *******************
*/

template <typename TCoordRep, unsigned int VSpaceDimension, unsigned int VSplineOrder>
template <typename TCoordinate, unsigned int VSpaceDimension, unsigned int VSplineOrder>
void
BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSplineOrder>::PrintSelf(std::ostream & os,
Indent indent) const
BSplineInterpolationDerivativeWeightFunction<TCoordinate, VSpaceDimension, VSplineOrder>::PrintSelf(std::ostream & os,
Indent indent) const
{
this->Superclass::PrintSelf(os, indent);

Expand All @@ -77,9 +77,9 @@ BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSpline
* ******************* Compute1DWeights *******************
*/

template <typename TCoordRep, unsigned int VSpaceDimension, unsigned int VSplineOrder>
template <typename TCoordinate, unsigned int VSpaceDimension, unsigned int VSplineOrder>
void
BSplineInterpolationDerivativeWeightFunction<TCoordRep, VSpaceDimension, VSplineOrder>::Compute1DWeights(
BSplineInterpolationDerivativeWeightFunction<TCoordinate, VSpaceDimension, VSplineOrder>::Compute1DWeights(
const ContinuousIndexType & cindex,
const IndexType & startIndex,
OneDWeightsType & weights1D) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ namespace itk
* \ingroup Functions ImageInterpolators
*/

template <typename TCoordRep = float, unsigned int VSpaceDimension = 2, unsigned int VSplineOrder = 3>
template <typename TCoordinate = float, unsigned int VSpaceDimension = 2, unsigned int VSplineOrder = 3>
class ITK_TEMPLATE_EXPORT BSplineInterpolationSecondOrderDerivativeWeightFunction
: public BSplineInterpolationWeightFunctionBase<TCoordRep, VSpaceDimension, VSplineOrder>
: public BSplineInterpolationWeightFunctionBase<TCoordinate, VSpaceDimension, VSplineOrder>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(BSplineInterpolationSecondOrderDerivativeWeightFunction);

/** Standard class typedefs. */
using Self = BSplineInterpolationSecondOrderDerivativeWeightFunction;
using Superclass = BSplineInterpolationWeightFunctionBase<TCoordRep, VSpaceDimension, VSplineOrder>;
using Superclass = BSplineInterpolationWeightFunctionBase<TCoordinate, VSpaceDimension, VSplineOrder>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

Expand Down
Loading

0 comments on commit 6517f22

Please sign in to comment.