STIR
6.2.0
|
Patlak kinetic model. More...
#include "stir/modelling/PatlakPlot.h"
Public Member Functions | |
PatlakPlot () | |
Default constructor (calls set_defaults()) More... | |
~PatlakPlot () override | |
default destructor | |
virtual void | multiply_dynamic_image_with_model_gradient (ParametricVoxelsOnCartesianGrid ¶metric_image, const DynamicDiscretisedDensity &dyn_image) const |
Multiplies the dynamic image with the model gradient. More... | |
virtual void | multiply_dynamic_image_with_model_gradient_and_add_to_input (ParametricVoxelsOnCartesianGrid ¶metric_image, const DynamicDiscretisedDensity &dyn_image) const |
Multiplies the dynamic image with the model gradient and add to original parametric_image . More... | |
virtual void | get_dynamic_image_from_parametric_image (DynamicDiscretisedDensity &dyn_image, const ParametricVoxelsOnCartesianGrid &par_image) const |
Multiplies the parametric image with the model matrix to get the corresponding dynamic image. More... | |
void | apply_linear_regression (ParametricVoxelsOnCartesianGrid &par_image, const DynamicDiscretisedDensity &dyn_image) const |
This is the common method used to estimate the parametric images from the dynamic images. More... | |
void | set_defaults () override |
Set defaults before parsing. | |
Succeeded | set_up () override |
Functions to get parameters | |
ModelMatrix< 2 > | get_model_matrix () const |
Simply gets model matrix, if it has been already stored. More... | |
ModelMatrix< 2 > | get_model_matrix (const PlasmaData &plasma_data, const TimeFrameDefinitions &time_frame_definitions, const unsigned int starting_frame) |
Creates model matrix from plasma data (Must be already sorted in appropriate frames). | |
unsigned int | get_starting_frame () const |
Returns the frame that the PatlakPlot linearization is assumed to be valid. | |
unsigned int | get_ending_frame () const |
Returns the number of the last frame available. | |
TimeFrameDefinitions | get_time_frame_definitions () const |
Returns the TimeFrameDefinitions that the PatlakPlot linearization is assumed to be valid: ChT::Check. | |
Functions to set parameters | |
void | set_model_matrix (ModelMatrix< 2 > model_matrix) |
Simply set model matrix. | |
Public Member Functions inherited from stir::RegisteredParsingObject< PatlakPlot, KineticModel > | |
std::string | get_registered_name () const override |
Returns Derived::registered_name. | |
std::string | parameter_info () override |
Returns a string with all parameters and their values, in a form suitable for parsing again. | |
Public Member Functions inherited from stir::KineticModel | |
KineticModel () | |
default constructor | |
~KineticModel () override | |
default destructor | |
Public Member Functions inherited from stir::ParsingObject | |
ParsingObject (const ParsingObject &) | |
ParsingObject & | operator= (const ParsingObject &) |
void | ask_parameters () |
bool | parse (std::istream &f) |
bool | parse (const char *const filename) |
Public Attributes | |
bool | _if_cardiac |
Switches between cardiac and brain data. | |
unsigned int | _starting_frame |
Starting frame to apply the model. | |
float | _cal_factor |
Calibration Factor, maybe to be removed. | |
float | _time_shift |
Shifts the time to fit the timing of Plasma Data with the Projection Data. | |
bool | _in_correct_scale |
Switch to scale or not the model_matrix to the correct scale, according to the appropriate scale factor. | |
bool | _in_total_cnt |
Switch to choose the values of the model to be in total counts or in mean counts. | |
std::string | _blood_data_filename |
Name of file in which the input function is stored. | |
PlasmaData | _plasma_frame_data |
Stores the plasma data into frames for brain studies. | |
std::string | _time_frame_definition_filename |
name of file to get frame definitions | |
TimeFrameDefinitions | _frame_defs |
TimeFrameDefinitions. | |
Static Public Attributes | |
static const char *const | registered_name = "Patlak Plot" |
Name which will be used when parsing a PatlakPlot object. | |
Static Public Attributes inherited from stir::KineticModel | |
static const char *const | registered_name = "Kinetic Model Type" |
Additional Inherited Members | |
Static Public Member Functions inherited from stir::RegisteredParsingObject< PatlakPlot, KineticModel > | |
static KineticModel * | read_from_stream (std::istream *) |
Construct a new object (of type Derived) by parsing the istream. More... | |
Static Public Member Functions inherited from stir::RegisteredObject< KineticModel > | |
static KineticModel * | read_registered_object (std::istream *in, const std::string ®istered_name) |
Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream. More... | |
static KineticModel * | ask_type_and_parameters () |
ask the user for the type, and then calls read_registered_object(0, type) More... | |
static void | list_registered_names (std::ostream &stream) |
List all possible registered names to the stream. More... | |
Protected Types inherited from stir::RegisteredObject< KineticModel > | |
typedef KineticModel *(* | RootFactory) (std::istream *) |
The type of a root factory is a function, taking an istream* as argument, and returning a Root*. | |
typedef FactoryRegistry< std::string, RootFactory, interfile_less > | RegistryType |
The type of the registry. | |
Protected Member Functions inherited from stir::ParsingObject | |
virtual void | set_key_values () |
This will be called before parsing or parameter_info is called. More... | |
Static Protected Member Functions inherited from stir::RegisteredObject< KineticModel > | |
static RegistryType & | registry () |
Static function returning the registry. More... | |
Protected Attributes inherited from stir::ParsingObject | |
KeyParser | parser |
Patlak kinetic model.
Model suitable for irreversible tracers such as FDG and FLT. See
Patlak Plot Parameters:= time frame definition filename := frames.txt starting frame := 23 calibration factor := 9000 blood data filename := blood_file.txt ; In seconds Time Shift := 0 In total counts := 1 end Patlak Plot Parameters:=
stir::PatlakPlot::PatlakPlot | ( | ) |
Default constructor (calls set_defaults())
default constructor
ModelMatrix< 2 > stir::PatlakPlot::get_model_matrix | ( | ) | const |
Simply gets model matrix, if it has been already stored.
Simply get model matrix if it has been already stored.
References stir::error().
Referenced by stir::modellingTests::run_tests().
|
virtual |
Multiplies the dynamic image with the model gradient.
For a linear model the model gradient is the transpose of the model matrix. So, the dynamic image is "projected" from time domain to the parameter domain.
References stir::error(), and stir::DiscretisedDensityOnCartesianGrid< num_dimensions, elemT >::get_grid_spacing().
|
virtual |
Multiplies the dynamic image with the model gradient and add to original parametric_image
.
References stir::error(), and stir::DiscretisedDensityOnCartesianGrid< num_dimensions, elemT >::get_grid_spacing().
|
virtual |
Multiplies the parametric image with the model matrix to get the corresponding dynamic image.
References stir::error(), and stir::DiscretisedDensityOnCartesianGrid< num_dimensions, elemT >::get_grid_spacing().
void stir::PatlakPlot::apply_linear_regression | ( | ParametricVoxelsOnCartesianGrid & | par_image, |
const DynamicDiscretisedDensity & | dyn_image | ||
) | const |
This is the common method used to estimate the parametric images from the dynamic images.
References stir::error(), stir::DiscretisedDensityOnCartesianGrid< num_dimensions, elemT >::get_grid_spacing(), and stir::linear_regression().