plastimatch
Loading...
Searching...
No Matches
Bspline_header Class Reference

The Bspline_header class encapsulates the B-spline grid geometry. More...

#include <bspline_header.h>

Inheritance diagram for Bspline_header:
Bspline_xform

Public Member Functions

 Bspline_header ()
 
void set (const float img_origin[3], const float img_spacing[3], const plm_long img_dim[3], const plm_long roi_offset[3], const plm_long roi_dim[3], const plm_long vox_per_rgn[3], const float direction_cosines[9])
 
void set (const Plm_image_header *pih, const float grid_spac[3])
 
void set_unaligned (const float img_origin[3], const float img_spacing[3], const plm_long img_dim[3], const plm_long roi_offset[3], const plm_long roi_dim[3], const float grid_spac[3], const float direction_cosines[9])
 
void set_unaligned (const Plm_image_header *pih, const float grid_spac[3])
 
void get_volume_header (Volume_header *vh)
 

Public Attributes

float img_origin [3]
 
float img_spacing [3]
 
plm_long img_dim [3]
 
Direction_cosines dc
 
plm_long roi_offset [3]
 
plm_long roi_dim [3]
 
plm_long vox_per_rgn [3]
 
float grid_spac [3]
 
plm_long rdims [3]
 
plm_long cdims [3]
 
int num_knots
 
int num_coeff
 

Detailed Description

The Bspline_header class encapsulates the B-spline grid geometry.

Constructor & Destructor Documentation

◆ Bspline_header()

Bspline_header::Bspline_header ( )

Member Function Documentation

◆ get_volume_header()

void Bspline_header::get_volume_header ( Volume_header * vh)

◆ set() [1/2]

void Bspline_header::set ( const float img_origin[3],
const float img_spacing[3],
const plm_long img_dim[3],
const plm_long roi_offset[3],
const plm_long roi_dim[3],
const plm_long vox_per_rgn[3],
const float direction_cosines[9] )

Set the internal geometry.
This version of the function gets used when loading a B-Spline from file.

Parameters
img_originImage origin (in mm)
img_spacingImage spacing (in mm)
img_dimImage size (in vox)
roi_offsetPosition of first vox in ROI (in vox)
roi_dimDimension of ROI (in vox)
vox_per_rgnKnot spacing (in vox)
direction_cosinesDirection cosines

◆ set() [2/2]

void Bspline_header::set ( const Plm_image_header * pih,
const float grid_spac[3] )

Set the internal geometry.
This version of the function gets used to calculate the geometry of an ALIGNED B-Spline with a specified grid spacing.

Parameters
pihThe image geometry associated with B-spline
grid_spacThe B-Spline grid spacing (in mm)

◆ set_unaligned() [1/2]

void Bspline_header::set_unaligned ( const float img_origin[3],
const float img_spacing[3],
const plm_long img_dim[3],
const plm_long roi_offset[3],
const plm_long roi_dim[3],
const float grid_spac[3],
const float direction_cosines[9] )

Set the internal geometry.
This version of the function gets used to calculate the geometry of an UNALIGNED B-Spline with a specified grid spacing.

Parameters
pihThe image geometry associated with B-spline
grid_spacThe B-Spline grid spacing (in mm)

◆ set_unaligned() [2/2]

void Bspline_header::set_unaligned ( const Plm_image_header * pih,
const float grid_spac[3] )

Set the internal geometry.
This version of the function gets used to calculate the geometry of an UNALIGNED B-Spline with a specified grid spacing.

Parameters
pihThe image geometry associated with B-spline
grid_spacThe B-Spline grid spacing (in mm)

Member Data Documentation

◆ cdims

plm_long Bspline_header::cdims[3]

◆ dc

Direction_cosines Bspline_header::dc

◆ grid_spac

float Bspline_header::grid_spac[3]

◆ img_dim

plm_long Bspline_header::img_dim[3]

◆ img_origin

float Bspline_header::img_origin[3]

◆ img_spacing

float Bspline_header::img_spacing[3]

◆ num_coeff

int Bspline_header::num_coeff

Total number of coefficents (= product(cdims) * 3)

◆ num_knots

int Bspline_header::num_knots

Total number of knots (= product(cdims))

◆ rdims

plm_long Bspline_header::rdims[3]

◆ roi_dim

plm_long Bspline_header::roi_dim[3]

◆ roi_offset

plm_long Bspline_header::roi_offset[3]

◆ vox_per_rgn

plm_long Bspline_header::vox_per_rgn[3]

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