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

#include <Radon3D.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 &volume, const at::Tensor &volumeSpacing, const at::Tensor &phiValues, const at::Tensor &thetaValues, const at::Tensor &rValues, int64_t samplesPerDirection, at::DeviceType device)
 
__host__ static __device__ Linear< VectorTypeGetMappingIToOffset (FloatType planeSize, int64_t samplesPerDirection)
 
__host__ static __device__ Linear2< VectorTypeGetMappingIndexToTexCoord (const texture_t &textureIn, FloatType phi, FloatType theta, FloatType r, const Linear< VectorType > &mappingIToOffset)
 
__host__ static __device__ VectorType GetDTexCoordDR (const texture_t &textureIn, FloatType phi, FloatType theta, FloatType r)
 
__host__ static __device__ float IntegrateLooped (const texture_t &texture, const Linear2< VectorType > &mappingIndexToTexCoord, int64_t samplesPerDirection)
 
__host__ static __device__ float DIntegrateLoopedDMappingParameter (const texture_t &texture, const Linear2< VectorType > &mappingIndexToTexCoord, const VectorType &dTexCoordDMappingParameter, int64_t samplesPerDirection)
 

Detailed Description

template<typename texture_t>
struct reg23::Radon3D< 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 Radon3D_... and DRadon3DDR_... functions

Member Typedef Documentation

◆ AddressModeType

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

◆ FloatType

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

◆ IntType

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

◆ SizeType

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

◆ VectorType

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

Member Function Documentation

◆ Common()

template<typename texture_t >
static __host__ CommonData reg23::Radon3D< texture_t >::Common ( const at::Tensor &  volume,
const at::Tensor &  volumeSpacing,
const at::Tensor &  phiValues,
const at::Tensor &  thetaValues,
const at::Tensor &  rValues,
int64_t  samplesPerDirection,
at::DeviceType  device 
)
inlinestatic

◆ DIntegrateLoopedDMappingParameter()

template<typename texture_t >
__host__ static __device__ float reg23::Radon3D< texture_t >::DIntegrateLoopedDMappingParameter ( const texture_t &  texture,
const Linear2< VectorType > &  mappingIndexToTexCoord,
const VectorType dTexCoordDMappingParameter,
int64_t  samplesPerDirection 
)
inlinestatic
Parameters
textureThe texture object to sample
mappingIndexToTexCoordThe mapping from integration iteration index to 3D cartesian texture coordinate (this determines the integration plane)
dTexCoordDMappingParameterThe derivative of the sampling locations with respect to some parameter. This is assumed to be constant over the plane.
samplesPerDirectionThe square-root of the number of samples to make
Returns
The derivative of the approximation of a plane 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::Radon3D< texture_t >::GetDTexCoordDR ( const texture_t &  textureIn,
FloatType  phi,
FloatType  theta,
FloatType  r 
)
inlinestatic
Parameters
textureInThe texture object which is being accessed
phiThe phi spherical coordinate at which the result should be evaluated
thetaThe theta spherical coordinate at which the result should be evaluated
rThe r spherical coordinate at which the result should be evaluated
Returns
The derivative of the 3D cartesian texture coordinate in the given texture at the given world position defined in spherical coordinates, with respect to the unsigned r spherical coordinate

The spherical 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 plane.

◆ GetMappingIndexToTexCoord()

template<typename texture_t >
__host__ static __device__ Linear2< VectorType > reg23::Radon3D< texture_t >::GetMappingIndexToTexCoord ( const texture_t &  textureIn,
FloatType  phi,
FloatType  theta,
FloatType  r,
const Linear< VectorType > &  mappingIToOffset 
)
inlinestatic
Parameters
textureInThe texture object which the returned mapping will be used to access.
phiThe phi spherical coordinate of the plane this mapping should correspond to
thetaThe theta spherical coordinate of the plane this mapping should correspond to
rThe r spherical 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 3D cartesian texture coordinate sampling location, according to the given texture object and integration plane (parameterised in spherical coordinates)

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

◆ GetMappingIToOffset()

template<typename texture_t >
__host__ static __device__ Linear< VectorType > reg23::Radon3D< texture_t >::GetMappingIToOffset ( FloatType  planeSize,
int64_t  samplesPerDirection 
)
inlinestatic
Parameters
planeSize
samplesPerDirection
Returns
The Linear mapping from integration iteration index to world sample distance, according to the given plane size and sample count

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

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

◆ IntegrateLooped()

template<typename texture_t >
__host__ static __device__ float reg23::Radon3D< texture_t >::IntegrateLooped ( const texture_t &  texture,
const Linear2< VectorType > &  mappingIndexToTexCoord,
int64_t  samplesPerDirection 
)
inlinestatic
Parameters
textureThe texture object to sample
mappingIndexToTexCoordThe mapping from integration iteration index to 3D cartesian texture coordinate (this determines the integration plane)
samplesPerDirectionThe square-root of the number of samples to make
Returns
An approximation of the plane integral through the given texture, determined by the given index -> texture coordinate mapping. Samples are taken in a [samplesPerDirection x samplesPerDirection] square grid over the plane.

mappingIndexToTexCoord can be determined using GetMappingIndexToTexCoord (here the plane to be integrated is defined in spherical 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: