Developer documentation
Version 3.0.3-105-gd3941f44
MR::Interp::Sinc< ImageType > Class Template Reference

This class provides access to the voxel intensities of an image, using sinc interpolation. More...

#include "interp/sinc.h"

Inheritance diagram for MR::Interp::Sinc< ImageType >:
MR::Interp::Base< ImageType > MR::Transform

Protected Attributes

const size_t window_size
 
const int kernel_width
 
Math::Sinc< value_type > Sinc_x
 
Math::Sinc< value_type > Sinc_y
 
Math::Sinc< value_type > Sinc_z
 
vector< value_type > y_values
 
vector< value_type > z_values
 
- Protected Attributes inherited from MR::Interp::Base< ImageType >
default_type bounds [3]
 
bool out_of_bounds
 

Additional Inherited Members

- Public Member Functions inherited from MR::Transform
void * operator new (std::size_t size)
 
void * operator new[] (std::size_t size)
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
template<class HeaderType >
 Transform (const HeaderType &header)
 An object for transforming between voxel, scanner and image coordinate spaces. More...
 
 Transform (const Transform &)=default
 
 Transform (Transform &&)=default
 
Transformoperator= (const Transform &)=delete
 
Transformoperator= (Transform &&)=delete
 
- Static Public Member Functions inherited from MR::Transform
template<class HeaderType >
static transform_type get_default (const HeaderType &header)
 
- Public Attributes inherited from MR::Transform
const Eigen::DiagonalMatrix< default_type, 3 > voxelsize
 
const transform_type voxel2scanner
 
const transform_type scanner2voxel
 
const transform_type image2scanner
 
const transform_type scanner2image
 
- Protected Member Functions inherited from MR::Interp::Base< ImageType >
template<class VectorType >
bool set_out_of_bounds (const VectorType &pos)
 
void set_out_of_bounds (const bool value)
 
template<class VectorType >
Eigen::Vector3d intravoxel_offset (const VectorType &pos)
 

Detailed Description

template<class ImageType>
class MR::Interp::Sinc< ImageType >

This class provides access to the voxel intensities of an image, using sinc interpolation.

Interpolation is only performed along the first 3 (spatial) axes. The (integer) position along the remaining axes should be set using the template Image class. The spatial coordinates can be set using the functions voxel(), image(), and scanner(). For example:

auto input = Image<float>::create (Argument[0]);
// create an Interp::Sinc object using input as the parent data set:
Interp::Sinc<decltype(input) > interp (input);
// set the scanner-space position to [ 10.2 3.59 54.1 ]:
interp.scanner (10.2, 3.59, 54.1);
// get the value at this position:
float value = interp.value();
static Image create(const std::string &image_name, const Header &template_header, bool add_to_command_history=true)
Definition: image.h:192

The template input class must be usable with this type of syntax:

int xsize = input.size(0); // return the dimension
int ysize = input.size(1); // along the x, y & z dimensions
int zsize = input.size(2);
float v[] = { input.spacing(0), input.spacing(1), input.spacing(2) }; // return voxel dimensions
input.index(0) = 0; // these lines are used to
input.index(1)--; // set the current position
input.index(2)++; // within the data set
float f = input.value();
transform_type M = input.transform(); // a valid 4x4 transformation matrix
Eigen::Transform< default_type, 3, Eigen::AffineCompact > transform_type
the type for the affine transform of an image:
Definition: types.h:234

Definition at line 70 of file sinc.h.

Member Data Documentation

◆ kernel_width

template<class ImageType >
const int MR::Interp::Sinc< ImageType >::kernel_width
protected

Definition at line 159 of file sinc.h.

◆ Sinc_x

template<class ImageType >
Math::Sinc<value_type> MR::Interp::Sinc< ImageType >::Sinc_x
protected

Definition at line 160 of file sinc.h.

◆ Sinc_y

template<class ImageType >
Math::Sinc<value_type> MR::Interp::Sinc< ImageType >::Sinc_y
protected

Definition at line 160 of file sinc.h.

◆ Sinc_z

template<class ImageType >
Math::Sinc<value_type> MR::Interp::Sinc< ImageType >::Sinc_z
protected

Definition at line 160 of file sinc.h.

◆ window_size

template<class ImageType >
const size_t MR::Interp::Sinc< ImageType >::window_size
protected

Definition at line 158 of file sinc.h.

◆ y_values

template<class ImageType >
vector<value_type> MR::Interp::Sinc< ImageType >::y_values
protected

Definition at line 161 of file sinc.h.

◆ z_values

template<class ImageType >
vector<value_type> MR::Interp::Sinc< ImageType >::z_values
protected

Definition at line 161 of file sinc.h.


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