STIR  6.2.0
Files | Classes | Functions
Items related to finding image resolution based on point or line sources
Collaboration diagram for Items related to finding image resolution based on point or line sources:

Files

file  find_fwhm_in_image.cxx
 Implementations of functions defined in find_fwhm_in_image.h.
 
file  find_fwhm_in_image.h
 A collection of functions to measure resolution.
 
file  find_fwhm_in_image.inl
 A collection of functions to measure resolution.
 

Classes

struct  stir::ResolutionIndex< num_dimensions, elemT >
 a structure that is used to hold the output of the function find_fwhm_in_image. More...
 

Functions

template<class RandomAccessIterType >
float stir::find_level_width (const RandomAccessIterType &begin_iterator, const RandomAccessIterType &max_iterator, const RandomAccessIterType &end_iterator, const float level_height)
 find width at a level More...
 
template<class RandomAccessIterType >
float stir::find_level_width (const RandomAccessIterType &begin_iterator, const RandomAccessIterType &end_iterator, const float level_height)
 find width at a level More...
 
template<class elemT >
BasicCoordinate< 3, int > stir::maximum_location_per_slice (const Array< 3, elemT > &input_array, const int slice, const int dimension)
 finds the maximum of the Input_Array in the given slice at the given dimension (z=1, y=2, x=3), and returns its location as a vector in BasicCoordinate Field (only 3D implementation).
 
template<class elemT >
Array< 1, elemT > stir::interpolate_line (const Array< 3, elemT > &input_array, const BasicCoordinate< 3, int > &max_location, const BasicCoordinate< 3, bool > &do_direction, const int dimension)
 extract a line from the given array after determining its locatin with a parabolic fit More...
 
template<class elemT >
std::list< ResolutionIndex< 3, float > > stir::find_fwhm_in_image (DiscretisedDensity< 3, elemT > &input_image, const unsigned int num_maxima, const float level, const int dimension, const bool nema)
 Finds FWHM, FWTM etc (in mm) for a number of point sources or a line source. More...
 

Detailed Description

Function Documentation

◆ find_level_width() [1/2]

template<class RandomAccessIterType >
float stir::find_level_width ( const RandomAccessIterType &  begin_iterator,
const RandomAccessIterType &  max_iterator,
const RandomAccessIterType &  end_iterator,
const float  level_height 
)
inline

find width at a level

Parameters
[in]begin_iteratorstart of sequence to check
[in]max_iteratorlocation from where the search will start, should be close to the location of the (local) maximum you want to investigate
[in]end_iteratorend of sequence to check
[in]level_heightintensity level at which to find the width
Returns
width of the level set (in pixel units)

The implementation assumes uniform spacing between the samples.

We use linear interpolation between samples to estimate where the function value reaches the level_height value.

If the search runs to the end/start of the sequence, a warning is issued, and the width is estimated using linear extrapolation.

References stir::warning().

Referenced by stir::find_level_width().

◆ find_level_width() [2/2]

template<class RandomAccessIterType >
float stir::find_level_width ( const RandomAccessIterType &  begin_iterator,
const RandomAccessIterType &  end_iterator,
const float  level_height 
)
inline

find width at a level

Parameters
[in]begin_iteratorstart of sequence to check
[in]end_iteratorend of sequence to check
[in]level_heightintensity level at which to find the width
Returns
width of the level set (in pixel units)

This function finds the maximum in the sequence and calls find_level_width(const RandomAccessIterType& begin_iterator, const RandomAccessIterType& max_iterator, const RandomAccessIterType& end_iterator, const float level_height)

References stir::find_level_width().

◆ interpolate_line()

template<class elemT >
Array< 1, elemT > stir::interpolate_line ( const Array< 3, elemT > &  input_array,
const BasicCoordinate< 3, int > &  max_location,
const BasicCoordinate< 3, bool > &  do_direction,
const int  dimension 
)

extract a line from the given array after determining its locatin with a parabolic fit

It finds the real maximum location, using the 3 points parabolic fit. Then, tri-linear interpolation is used to find the whole line at the given dimension (z:1,y:2,x:3) taking into account the voxels that intersects the voxel which has in its center the point with the real maximum_value.

References stir::error(), stir::extract_line(), and stir::Array< num_dimensions, elemT >::get_regular_range().

◆ find_fwhm_in_image()

template<class elemT >
std::list< ResolutionIndex< 3, float > > stir::find_fwhm_in_image ( DiscretisedDensity< 3, elemT > &  input_image,
const unsigned int  num_maxima,
const float  level,
const int  dimension,
const bool  nema 
)

Finds FWHM, FWTM etc (in mm) for a number of point sources or a line source.

Parameters
[in]input_image
[in]num_maximathe number of maxima to find (see below)
[in]levellevel at which to compute the width (2 for half maximum, 10 for tenth maximum etc.)
[in]dimensionthe dimension along which the line source is oriented, or 0 for point sources
[in]nemaenables the calculation based on the NEMA Standards Publication NU 2-2001.
Returns
a list containing the maximum_value, its location per slice and resolution. For line sources, sorted by minimum to maximum slice of the requested dimension, or for point sources, sorted by maximum to minimum value.

For line sources, num_maxima slices are sampled (from first to last slice, with steps given by num_slices/(num_maxima+1)

For point sources, if num_maxima is larger than 1, after finding a maximum and the resolution, the data is masked out in a neigbhourhood of half-size (resolution*2/level). This will only ork properly if the point sources are not too close to eachother and have roughly the maximum.

The value of the maximum is computed using a parabolic fit through the 3 points around the maximum as specified in NEMA 2001.

If nema=false, the interpolate_line() function is used to find a line, otherwise we use extract_line().