STIR
6.2.0
|
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... | |
|
inline |
find width at a level
[in] | begin_iterator | start of sequence to check |
[in] | max_iterator | location from where the search will start, should be close to the location of the (local) maximum you want to investigate |
[in] | end_iterator | end of sequence to check |
[in] | level_height | intensity level at which to find the width |
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().
|
inline |
find width at a level
[in] | begin_iterator | start of sequence to check |
[in] | end_iterator | end of sequence to check |
[in] | level_height | intensity level at which to find the width |
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().
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().
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.
[in] | input_image | |
[in] | num_maxima | the number of maxima to find (see below) |
[in] | level | level at which to compute the width (2 for half maximum, 10 for tenth maximum etc.) |
[in] | dimension | the dimension along which the line source is oriented, or 0 for point sources |
[in] | nema | enables the calculation based on the NEMA Standards Publication NU 2-2001. |
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().