plastimatch
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Gamma_dose_comparison Class Reference

The Gamma_dose_comparison class executes a comparison between two dose distributions based on the "gamma index" defined by Dan Low et al. in the following reference:

Low et al, A technique for the quantitative evaluation of dose distributions, Med Phys. 1998 May;25(5):656-61.

The comparison is based on searching a local neighborhood for the most similar dose. The similarity is computed as the geometric mean of the dose difference and spatial distance. The gamma value at a point is then the minimum of this similarity value over the the neighborhood. Generally, the gamma value is normalized based on a spatial tolerance and a dose difference tolerance such that gamma values of less than 1.0 are acceptable, and gamma values greater than 1.0 are unacceptable. More...

#include <gamma_dose_comparison.h>

Public Member Functions

 Gamma_dose_comparison ()
 
 ~Gamma_dose_comparison ()
 
std::string get_report_string ()
 
void set_report_string (std::string &report_str)
 
bool is_local_gamma ()
 
void set_local_gamma (bool bLocalGamma)
 
bool is_compute_full_region ()
 
void set_compute_full_region (bool b_compute_full_region)
 
float get_inherent_resample_mm ()
 
void set_inherent_resample_mm (float inherent_spacing_mm)
 
bool is_resample_nn ()
 
void set_resample_nn (bool b_resample_nn)
 
bool is_interp_search ()
 
void set_interp_search (bool b_interp_search)
 
bool is_ref_only_threshold ()
 
void set_ref_only_threshold (bool b_ref_only_threshold)
 By default, when analysis is limited to areas with dose higher than a percent threshold, this threshold is based on the dose in either reference or compare image.
If set_ref_only_threshold() is called with a value of true, the analysis will only consider dose higher than the threshold in the compare image.
 
Inputs
void set_reference_image (const char *image_fn)
 Set the reference image. The image will be loaded from the specified filename.
 
void set_reference_image (const Plm_image::Pointer &image)
 Set the reference image as a Plm image.
 
void set_reference_image (const FloatImageType::Pointer image)
 Set the reference image as an ITK image.
 
void set_compare_image (const char *image_fn)
 Set the compare image. The image will be loaded from the specified filename.
 
void set_compare_image (const Plm_image::Pointer &image)
 Set the compare image as a Plm image.
 
void set_compare_image (const FloatImageType::Pointer image)
 Set the compare image as an ITK image.
 
void set_mask_image (const char *image_fn)
 Set the mask image. The image will be loaded from the specified filename.
 
void set_mask_image (const std::string &image_fn)
 
void set_mask_image (const Plm_image::Pointer &image)
 Set the mask image as a Plm image.
 
void set_mask_image (const UCharImageType::Pointer image)
 Set the mask image as an ITK image.
 
float get_spatial_tolerance ()
 Get the distance to agreement (DTA) tolerance, in mm.
 
void set_spatial_tolerance (float spatial_tol)
 Set the distance to agreement (DTA) tolerance, in mm.
 
float get_dose_difference_tolerance ()
 Get the dose difference tolerance, in float (fraction of reference dose).
 
void set_dose_difference_tolerance (float dose_tol)
 Set the dose difference tolerance, in float type. If a reference dose (prescription dose) is specified, the dose difference tolerance is treated as a fraction of the reference dose. Otherwise it is treated as a fraction of the maximum dose in the reference volume. With local-gamma option, it is treated as a fraction of the local dose in the reference image To use a 3% dose tolerance, you would set this value to 0.03.

 
void set_reference_dose (float dose)
 Set the reference dose (prescription dose).
The reference dose is used for dose comparison and analysis threshold. If the reference dose is not set, the maximum dose in the reference dose volume is used as the reference dose.
 
void unset_reference_dose ()
 Unset the reference dose (prescription dose).
The reference dose is used for dose comparison and analysis threshold. If the reference dose is not set, the maximum dose in the reference dose volume is used as the reference dose.
 
void set_analysis_threshold (float thresh)
 Set a dose threshold for gamma analysis, as a fraction of the reference dose. This is used to ignore voxels which have dose below a certain value.
For example, to consider only voxels which have dose greater than 10% of the maximum dose, you would call set_analysis_threshold (0.1). The threshold is applied to dose voxels in the reference dose volume.
 
void set_gamma_max (float gamma_max)
 Set the maximum gamma computed by the class. This is used to speed up computation. A typical value is 2 or 3.

 
void set_progress_callback (void(*progress_callback)(float))
 Set a callback routine for reporting progress.
 
Execution
void run ()
 Compute gamma value at each location in the input image.
 
Outputs
Plm_image::Pointer get_gamma_image ()
 Return the gamma image as a Plm_image.

 
FloatImageType::Pointer get_gamma_image_itk ()
 Return the gamma image as an ITK image.

 
Plm_imageget_pass_image ()
 Return a binary image of passing voxels as a Plm image.
 
UCharImageType::Pointer get_pass_image_itk ()
 Return a binary image of passing voxels as an ITK image.
 
Plm_imageget_fail_image ()
 Return a binary image of failing voxels as a Plm image.
 
UCharImageType::Pointer get_fail_image_itk ()
 Return a binary image of failing voxels as an ITK image.
 
Plm_imageget_ref_image ()
 Return ref. image used for gamma evaluation.
 
Plm_imageget_comp_image ()
 Return comp. image used for gamma evaluation.
 
float get_pass_fraction ()
 Return fraction of passing points, subject to reference dose being greater than analysis threshold.
 
int get_analysis_num_vox ()
 
int get_passed_num_vox ()
 
float get_reference_dose ()
 

Public Attributes

Gamma_dose_comparison_private * d_ptr
 

Protected Member Functions

void resample_image_with_fixed_spacing (Plm_image::Pointer &input_img, float spacing[3])
 Resample ref image with fixed spacing.
 
void resample_image_to_reference (const Plm_image::Pointer &image_reference, Plm_image::Pointer &image_moving)
 Resample image_moving to image_reference.
 

Detailed Description

The Gamma_dose_comparison class executes a comparison between two dose distributions based on the "gamma index" defined by Dan Low et al. in the following reference:

Low et al, A technique for the quantitative evaluation of dose distributions, Med Phys. 1998 May;25(5):656-61.

The comparison is based on searching a local neighborhood for the most similar dose. The similarity is computed as the geometric mean of the dose difference and spatial distance. The gamma value at a point is then the minimum of this similarity value over the the neighborhood. Generally, the gamma value is normalized based on a spatial tolerance and a dose difference tolerance such that gamma values of less than 1.0 are acceptable, and gamma values greater than 1.0 are unacceptable.

Constructor & Destructor Documentation

◆ Gamma_dose_comparison()

Gamma_dose_comparison::Gamma_dose_comparison ( )

◆ ~Gamma_dose_comparison()

Gamma_dose_comparison::~Gamma_dose_comparison ( )

Member Function Documentation

◆ get_analysis_num_vox()

int Gamma_dose_comparison::get_analysis_num_vox ( )

◆ get_comp_image()

Plm_image * Gamma_dose_comparison::get_comp_image ( )

Return comp. image used for gamma evaluation.

◆ get_dose_difference_tolerance()

float Gamma_dose_comparison::get_dose_difference_tolerance ( )

Get the dose difference tolerance, in float (fraction of reference dose).

◆ get_fail_image()

Plm_image * Gamma_dose_comparison::get_fail_image ( )

Return a binary image of failing voxels as a Plm image.

◆ get_fail_image_itk()

UCharImageType::Pointer Gamma_dose_comparison::get_fail_image_itk ( )

Return a binary image of failing voxels as an ITK image.

◆ get_gamma_image()

Plm_image::Pointer Gamma_dose_comparison::get_gamma_image ( )

Return the gamma image as a Plm_image.

◆ get_gamma_image_itk()

FloatImageType::Pointer Gamma_dose_comparison::get_gamma_image_itk ( )

Return the gamma image as an ITK image.

◆ get_inherent_resample_mm()

float Gamma_dose_comparison::get_inherent_resample_mm ( )

◆ get_pass_fraction()

float Gamma_dose_comparison::get_pass_fraction ( )

Return fraction of passing points, subject to reference dose being greater than analysis threshold.

◆ get_pass_image()

Plm_image * Gamma_dose_comparison::get_pass_image ( )

Return a binary image of passing voxels as a Plm image.

◆ get_pass_image_itk()

UCharImageType::Pointer Gamma_dose_comparison::get_pass_image_itk ( )

Return a binary image of passing voxels as an ITK image.

◆ get_passed_num_vox()

int Gamma_dose_comparison::get_passed_num_vox ( )

◆ get_ref_image()

Plm_image * Gamma_dose_comparison::get_ref_image ( )

Return ref. image used for gamma evaluation.

◆ get_reference_dose()

float Gamma_dose_comparison::get_reference_dose ( )

◆ get_report_string()

std::string Gamma_dose_comparison::get_report_string ( )

◆ get_spatial_tolerance()

float Gamma_dose_comparison::get_spatial_tolerance ( )

Get the distance to agreement (DTA) tolerance, in mm.

◆ is_compute_full_region()

bool Gamma_dose_comparison::is_compute_full_region ( )

◆ is_interp_search()

bool Gamma_dose_comparison::is_interp_search ( )

◆ is_local_gamma()

bool Gamma_dose_comparison::is_local_gamma ( )

◆ is_ref_only_threshold()

bool Gamma_dose_comparison::is_ref_only_threshold ( )

◆ is_resample_nn()

bool Gamma_dose_comparison::is_resample_nn ( )

◆ resample_image_to_reference()

void Gamma_dose_comparison::resample_image_to_reference ( const Plm_image::Pointer &  image_reference,
Plm_image::Pointer &  image_moving 
)
protected

Resample image_moving to image_reference.

◆ resample_image_with_fixed_spacing()

void Gamma_dose_comparison::resample_image_with_fixed_spacing ( Plm_image::Pointer &  input_img,
float  spacing[3] 
)
protected

Resample ref image with fixed spacing.

  • Auto-adjust, keep same image extent *‍/

◆ run()

void Gamma_dose_comparison::run ( )

Compute gamma value at each location in the input image.

◆ set_analysis_threshold()

void Gamma_dose_comparison::set_analysis_threshold ( float  thresh)

Set a dose threshold for gamma analysis, as a fraction of the reference dose. This is used to ignore voxels which have dose below a certain value.
For example, to consider only voxels which have dose greater than 10% of the maximum dose, you would call set_analysis_threshold (0.1). The threshold is applied to dose voxels in the reference dose volume.

◆ set_compare_image() [1/3]

void Gamma_dose_comparison::set_compare_image ( const char image_fn)

Set the compare image. The image will be loaded from the specified filename.

◆ set_compare_image() [2/3]

void Gamma_dose_comparison::set_compare_image ( const FloatImageType::Pointer  image)

Set the compare image as an ITK image.

◆ set_compare_image() [3/3]

void Gamma_dose_comparison::set_compare_image ( const Plm_image::Pointer &  image)

Set the compare image as a Plm image.

◆ set_compute_full_region()

void Gamma_dose_comparison::set_compute_full_region ( bool  b_compute_full_region)

◆ set_dose_difference_tolerance()

void Gamma_dose_comparison::set_dose_difference_tolerance ( float  dose_tol)

Set the dose difference tolerance, in float type. If a reference dose (prescription dose) is specified, the dose difference tolerance is treated as a fraction of the reference dose. Otherwise it is treated as a fraction of the maximum dose in the reference volume. With local-gamma option, it is treated as a fraction of the local dose in the reference image To use a 3% dose tolerance, you would set this value to 0.03.

◆ set_gamma_max()

void Gamma_dose_comparison::set_gamma_max ( float  gamma_max)

Set the maximum gamma computed by the class. This is used to speed up computation. A typical value is 2 or 3.

◆ set_inherent_resample_mm()

void Gamma_dose_comparison::set_inherent_resample_mm ( float  inherent_spacing_mm)

◆ set_interp_search()

void Gamma_dose_comparison::set_interp_search ( bool  b_interp_search)

◆ set_local_gamma()

void Gamma_dose_comparison::set_local_gamma ( bool  bLocalGamma)

◆ set_mask_image() [1/4]

void Gamma_dose_comparison::set_mask_image ( const char image_fn)

Set the mask image. The image will be loaded from the specified filename.

◆ set_mask_image() [2/4]

void Gamma_dose_comparison::set_mask_image ( const Plm_image::Pointer &  image)

Set the mask image as a Plm image.

◆ set_mask_image() [3/4]

void Gamma_dose_comparison::set_mask_image ( const std::string &  image_fn)

◆ set_mask_image() [4/4]

void Gamma_dose_comparison::set_mask_image ( const UCharImageType::Pointer  image)

Set the mask image as an ITK image.

◆ set_progress_callback()

void Gamma_dose_comparison::set_progress_callback ( void(*)(float progress_callback)

Set a callback routine for reporting progress.

◆ set_ref_only_threshold()

void Gamma_dose_comparison::set_ref_only_threshold ( bool  b_ref_only_threshold)

By default, when analysis is limited to areas with dose higher than a percent threshold, this threshold is based on the dose in either reference or compare image.
If set_ref_only_threshold() is called with a value of true, the analysis will only consider dose higher than the threshold in the compare image.

◆ set_reference_dose()

void Gamma_dose_comparison::set_reference_dose ( float  dose)

Set the reference dose (prescription dose).
The reference dose is used for dose comparison and analysis threshold. If the reference dose is not set, the maximum dose in the reference dose volume is used as the reference dose.

◆ set_reference_image() [1/3]

void Gamma_dose_comparison::set_reference_image ( const char image_fn)

Set the reference image. The image will be loaded from the specified filename.

◆ set_reference_image() [2/3]

void Gamma_dose_comparison::set_reference_image ( const FloatImageType::Pointer  image)

Set the reference image as an ITK image.

◆ set_reference_image() [3/3]

void Gamma_dose_comparison::set_reference_image ( const Plm_image::Pointer &  image)

Set the reference image as a Plm image.

◆ set_report_string()

void Gamma_dose_comparison::set_report_string ( std::string &  report_str)

◆ set_resample_nn()

void Gamma_dose_comparison::set_resample_nn ( bool  b_resample_nn)

◆ set_spatial_tolerance()

void Gamma_dose_comparison::set_spatial_tolerance ( float  spatial_tol)

Set the distance to agreement (DTA) tolerance, in mm.

◆ unset_reference_dose()

void Gamma_dose_comparison::unset_reference_dose ( )

Unset the reference dose (prescription dose).
The reference dose is used for dose comparison and analysis threshold. If the reference dose is not set, the maximum dose in the reference dose volume is used as the reference dose.

Member Data Documentation

◆ d_ptr

Gamma_dose_comparison_private* Gamma_dose_comparison::d_ptr

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