Grangeat-based 2D/3D image registration
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
reg23::Texture< dimensionality, intType, floatType > Class Template Reference

A parent texture class containing template data and functionality. More...

#include <Texture.h>

Public Types

using IntType = intType
 
using FloatType = floatType
 
using SizeType = Vec< intType, dimensionality >
 
using VectorType = Vec< floatType, dimensionality >
 
using AddressModeType = Vec< TextureAddressMode, dimensionality >
 

Public Member Functions

__host__ __device__ const SizeTypeSize () const
 
__host__ __device__ const VectorTypeSpacing () const
 Get the spacing of the texture's values in world coordinates as (X, Y, Z)
 
__host__ __device__ const VectorTypeCentrePosition () const
 Get the position of the centre of the texture in world coordinates as (X, Y, Z)
 
__host__ __device__ VectorType SizeWorld () const
 
__host__ __device__ bool In (const SizeType &index) const
 
__host__ __device__ Linear< VectorTypeMappingWorldToTexCoord () const
 

Static Public Attributes

static constexpr std::size_t DIMENSIONALITY = dimensionality
 

Protected Member Functions

 Texture ()=default
 
 Texture (SizeType _size, VectorType _spacing, VectorType _centrePosition={})
 
 Texture (const Texture &)=default
 
Textureoperator= (const Texture &)=default
 
 Texture (Texture &&) noexcept=default
 
Textureoperator= (Texture &&) noexcept=default
 

Detailed Description

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
class reg23::Texture< dimensionality, intType, floatType >

A parent texture class containing template data and functionality.

Template Parameters
dimensionalityThe integer dimensionality of the texture
intTypeThe type used to express integer values like the dimensions of the texture
floatTypeThe type used to express floating-point values like the spacing of the texture's values in world coordinates

This class is not an interface, rather it is templated to store some values and implement some functionality common to all texture objects. It is intended to be used as a fully template-specified base class for any texture object.

Member Typedef Documentation

◆ AddressModeType

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
using reg23::Texture< dimensionality, intType, floatType >::AddressModeType = Vec<TextureAddressMode, dimensionality>

◆ FloatType

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
using reg23::Texture< dimensionality, intType, floatType >::FloatType = floatType

◆ IntType

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
using reg23::Texture< dimensionality, intType, floatType >::IntType = intType

◆ SizeType

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
using reg23::Texture< dimensionality, intType, floatType >::SizeType = Vec<intType, dimensionality>

◆ VectorType

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
using reg23::Texture< dimensionality, intType, floatType >::VectorType = Vec<floatType, dimensionality>

Constructor & Destructor Documentation

◆ Texture() [1/4]

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
reg23::Texture< dimensionality, intType, floatType >::Texture ( )
protecteddefault

◆ Texture() [2/4]

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
reg23::Texture< dimensionality, intType, floatType >::Texture ( SizeType  _size,
VectorType  _spacing,
VectorType  _centrePosition = {} 
)
inlineprotected

◆ Texture() [3/4]

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
reg23::Texture< dimensionality, intType, floatType >::Texture ( const Texture< dimensionality, intType, floatType > &  )
protecteddefault

◆ Texture() [4/4]

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
reg23::Texture< dimensionality, intType, floatType >::Texture ( Texture< dimensionality, intType, floatType > &&  )
protecteddefaultnoexcept

Member Function Documentation

◆ CentrePosition()

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
__host__ __device__ const VectorType & reg23::Texture< dimensionality, intType, floatType >::CentrePosition ( ) const
inline

Get the position of the centre of the texture in world coordinates as (X, Y, Z)

◆ In()

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
__host__ __device__ bool reg23::Texture< dimensionality, intType, floatType >::In ( const SizeType index) const
inline
Parameters
indexA location in the texture data
Returns
Whether the location is within the bounds of the texture's data's size

◆ MappingWorldToTexCoord()

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
__host__ __device__ Linear< VectorType > reg23::Texture< dimensionality, intType, floatType >::MappingWorldToTexCoord ( ) const
inline
Returns
The Linear mapping from world coordinates to texture coordinates, according to the texture's world position and value spacing.

◆ operator=() [1/2]

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
Texture & reg23::Texture< dimensionality, intType, floatType >::operator= ( const Texture< dimensionality, intType, floatType > &  )
protecteddefault

◆ operator=() [2/2]

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
Texture & reg23::Texture< dimensionality, intType, floatType >::operator= ( Texture< dimensionality, intType, floatType > &&  )
protecteddefaultnoexcept

◆ Size()

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
__host__ __device__ const SizeType & reg23::Texture< dimensionality, intType, floatType >::Size ( ) const
inline

Get the dimensions of the texture as (X size, Y size, Z size); this will be the reverse order to the values returned by at::Tensor::sizes()

◆ SizeWorld()

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
__host__ __device__ VectorType reg23::Texture< dimensionality, intType, floatType >::SizeWorld ( ) const
inline
Returns
The size of the texture in world coordinates as (X size, Y size, Z size)

◆ Spacing()

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
__host__ __device__ const VectorType & reg23::Texture< dimensionality, intType, floatType >::Spacing ( ) const
inline

Get the spacing of the texture's values in world coordinates as (X, Y, Z)

Member Data Documentation

◆ DIMENSIONALITY

template<std::size_t dimensionality, typename intType = int, typename floatType = float>
constexpr std::size_t reg23::Texture< dimensionality, intType, floatType >::DIMENSIONALITY = dimensionality
staticconstexpr

The documentation for this class was generated from the following file: