Grangeat-based 2D/3D image registration
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Member Functions | List of all members
reg23::Radon2D< texture_t > Struct Template Reference

#include <Radon2D.h>

Classes

struct  CommonData
 

Public Types

using IntType = typename texture_t::IntType
 
using FloatType = typename texture_t::FloatType
 
using SizeType = typename texture_t::SizeType
 
using VectorType = typename texture_t::VectorType
 
using AddressModeType = typename texture_t::AddressModeType
 

Static Public Member Functions

static __host__ CommonData Common (const at::Tensor &image, const at::Tensor &imageSpacing, const at::Tensor &phiValues, const at::Tensor &rValues, int64_t samplesPerLine, at::DeviceType device)
 
__host__ static __device__ Linear< VectorTypeGetMappingIToOffset (FloatType lineLength, int64_t samplesPerLine)
 
__host__ static __device__ Linear< VectorTypeGetMappingIndexToTexCoord (const texture_t &textureIn, FloatType phi, FloatType r, const Linear< VectorType > &mappingIToOffset)
 
__host__ static __device__ VectorType GetDTexCoordDR (const texture_t &textureIn, FloatType phi, FloatType r)
 
__host__ static __device__ float IntegrateLooped (const texture_t &texture, const Linear< VectorType > &mappingIndexToTexCoord, int64_t samplesPerLine)
 
__host__ static __device__ float DIntegrateLoopedDMappingParameter (const texture_t &texture, const Linear< VectorType > &mappingIndexToTexCoord, const VectorType &dTexCoordDMappingParameter, int64_t samplesPerLine)
 

Detailed Description

template<typename texture_t>
struct reg23::Radon2D< texture_t >
Template Parameters
texture_tType of the texture object that input data will be converted to for sampling.

This struct is used as a namespace for code that is shared between different implementations of Radon2D_... and DRadon2DDR_... functions

Member Typedef Documentation

◆ AddressModeType

template<typename texture_t >
using reg23::Radon2D< texture_t >::AddressModeType = typename texture_t::AddressModeType

◆ FloatType

template<typename texture_t >
using reg23::Radon2D< texture_t >::FloatType = typename texture_t::FloatType

◆ IntType

template<typename texture_t >
using reg23::Radon2D< texture_t >::IntType = typename texture_t::IntType

◆ SizeType

template<typename texture_t >
using reg23::Radon2D< texture_t >::SizeType = typename texture_t::SizeType

◆ VectorType

template<typename texture_t >
using reg23::Radon2D< texture_t >::VectorType = typename texture_t::VectorType

Member Function Documentation

◆ Common()

template<typename texture_t >
static __host__ CommonData reg23::Radon2D< texture_t >::Common ( const at::Tensor &  image,
const at::Tensor &  imageSpacing,
const at::Tensor &  phiValues,
const at::Tensor &  rValues,
int64_t  samplesPerLine,
at::DeviceType  device 
)
inlinestatic

◆ DIntegrateLoopedDMappingParameter()

template<typename texture_t >
__host__ static __device__ float reg23::Radon2D< texture_t >::DIntegrateLoopedDMappingParameter ( const texture_t &  texture,
const Linear< VectorType > &  mappingIndexToTexCoord,
const VectorType dTexCoordDMappingParameter,
int64_t  samplesPerLine 
)
inlinestatic
Parameters
textureThe texture object to sample
mappingIndexToTexCoordThe mapping from integration iteration index to 2D cartesian texture coordinate (this determines the integration line)
dTexCoordDMappingParameterThe derivative of the sampling locations with respect to some parameter. This is assumed to be constant along the line.
samplesPerLineThe number of samples to make
Returns
The derivative of the approximation of a line integral as in IntegrateLooped, with respect to some parameter (according to the value of dTexCoordDMappingParameter).

◆ GetDTexCoordDR()

template<typename texture_t >
__host__ static __device__ VectorType reg23::Radon2D< texture_t >::GetDTexCoordDR ( const texture_t &  textureIn,
FloatType  phi,
FloatType  r 
)
inlinestatic
Parameters
textureInThe texture object which is being accessed
phiThe phi polar coordinate at which the result should be evaluated
rThe r polar coordinate at which the result should be evaluated
Returns
The derivative of the 2D cartesian texture coordinate in the given texture at the given world position defined in polar coordinates, with respect to the unsigned r polar coordinate

The polar coordinates should be defined according to the convention stated in reg23/Conventions.md, however the parameter with respect to which this is evaluating the derivative is the unsigned version of r, i.e. the unsigned distance between the orign and the line.

◆ GetMappingIndexToTexCoord()

template<typename texture_t >
__host__ static __device__ Linear< VectorType > reg23::Radon2D< texture_t >::GetMappingIndexToTexCoord ( const texture_t &  textureIn,
FloatType  phi,
FloatType  r,
const Linear< VectorType > &  mappingIToOffset 
)
inlinestatic
Parameters
textureInThe texture object which the returned mapping will be used to access.
phiThe phi polar coordinate of the plane this mapping should correspond to
rThe r polar coordinate of the plane this mapping should correspond to
mappingIToOffsetThe mapping from integration iteration index to untransformed sampling offset
Returns
The Linear mapping from integration iteration index to 2D cartesian texture coordinate sampling location, according to the given texture object and integration line (parameterised in polar coordinates)

The polar coordinates should be defined according to the convention stated in reg23/Conventions.md

◆ GetMappingIToOffset()

template<typename texture_t >
__host__ static __device__ Linear< VectorType > reg23::Radon2D< texture_t >::GetMappingIToOffset ( FloatType  lineLength,
int64_t  samplesPerLine 
)
inlinestatic
Parameters
lineLength
samplesPerLine
Returns
The Linear mapping from integration iteration index to world sample distance, according to the given line length and sample count

This is used as part of the approximation of a line integral: for each sample taken to contribute to the line integral, the returned functor maps the sample index to the (untransformed) world offset.

The mapping is generated for 2-vectors, as it will ultimately be applied to 2-vectors.

◆ IntegrateLooped()

template<typename texture_t >
__host__ static __device__ float reg23::Radon2D< texture_t >::IntegrateLooped ( const texture_t &  texture,
const Linear< VectorType > &  mappingIndexToTexCoord,
int64_t  samplesPerLine 
)
inlinestatic
Parameters
textureThe texture object to sample
mappingIndexToTexCoordThe mapping from integration iteration index to 2D cartesian texture coordinate (this determines the integration line)
samplesPerLineThe number of samples to make
Returns
An approximation of the line integral through the given texture, determined by the given index -> texture coordinate mapping. samplesPerLine samples are taken evenly spaced along the line.

mappingIndexToTexCoord can be determined using GetMappingIndexToTexCoord (here the line to be integrated is defined in polar coordinates). This function is separate as it is often more efficient to precalculate the value of mappingIndexToTexCoord.


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