Developer documentation
Version 3.0.3-105-gd3941f44
MR::Interp::value_type_of< C > Struct Template Reference

This class provides access to the voxel intensities of a data set, using tri-linear interpolation. More...

#include "interp/linear.h"

Public Types

using type = C
 

Detailed Description

template<class C>
struct MR::Interp::value_type_of< C >

This class provides access to the voxel intensities of a data set, using tri-linear interpolation.

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

auto voxel = image_buffer.voxel();
auto input = Image<float>::create (argument[0]);
// create an Interp::Linear object using input as the parent data set:
Interp::Linear<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
VectorType::Scalar value(const VectorType &coefs, typename VectorType::Scalar cos_elevation, typename VectorType::Scalar cos_azimuth, typename VectorType::Scalar sin_azimuth, int lmax)
Definition: SH.h:233
vector< ParsedArgument > argument
the list of arguments parsed from the command-line
LinearInterp< ImageType, LinearInterpProcessingType::Value > Linear
Definition: linear.h:586

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 73 of file linear.h.

Member Typedef Documentation

◆ type

template<class C >
using MR::Interp::value_type_of< C >::type = C

Definition at line 75 of file linear.h.


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