STIR  6.2.0
PatlakPlot.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2006 - 2011, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
20 #ifndef __stir_modelling_PatlakPlot_H__
21 #define __stir_modelling_PatlakPlot_H__
22 
26 #include "stir/Succeeded.h"
28 
29 START_NAMESPACE_STIR
30 
32 
71 class PatlakPlot : public RegisteredParsingObject<PatlakPlot, KineticModel>
72 {
73 public:
75  static const char* const registered_name;
76 
77  PatlakPlot();
78  ~PatlakPlot() override;
79 
81  ModelMatrix<2> get_model_matrix() const;
84  ModelMatrix<2> get_model_matrix(const PlasmaData& plasma_data,
85  const TimeFrameDefinitions& time_frame_definitions,
86  const unsigned int starting_frame);
88  unsigned int get_starting_frame() const;
90  unsigned int get_ending_frame() const;
92  TimeFrameDefinitions get_time_frame_definitions() const;
94 
96  void set_model_matrix(ModelMatrix<2> model_matrix);
97 
98 
100 
105  virtual void multiply_dynamic_image_with_model_gradient(ParametricVoxelsOnCartesianGrid& parametric_image,
106  const DynamicDiscretisedDensity& dyn_image) const;
108 
110  virtual void multiply_dynamic_image_with_model_gradient_and_add_to_input(ParametricVoxelsOnCartesianGrid& parametric_image,
111  const DynamicDiscretisedDensity& dyn_image) const;
112 
114 
116  virtual void get_dynamic_image_from_parametric_image(DynamicDiscretisedDensity& dyn_image,
117  const ParametricVoxelsOnCartesianGrid& par_image) const;
118 
120 
123  void apply_linear_regression(ParametricVoxelsOnCartesianGrid& par_image, const DynamicDiscretisedDensity& dyn_image) const;
124 
125  void set_defaults() override;
126 
127  Succeeded set_up() override;
128 
129  bool _if_cardiac;
130  unsigned int _starting_frame;
131  float _cal_factor;
132  float _time_shift;
134  bool _in_total_cnt;
136  std::string _blood_data_filename;
140 
141 private:
142  void create_model_matrix();
143  void initialise_keymap() override;
144  bool post_processing() override;
145  mutable ModelMatrix<2> _model_matrix;
146  bool _matrix_is_stored;
148 };
149 
150 END_NAMESPACE_STIR
151 
152 #endif //__stir_modelling_PatlakPlot_H__
Class used for storing time frame durations.
Definition: TimeFrameDefinitions.h:38
Declaration of class stir::Succeeded.
Patlak kinetic model.
Definition: PatlakPlot.h:71
float _time_shift
Shifts the time to fit the timing of Plasma Data with the Projection Data.
Definition: PatlakPlot.h:132
Class to store parametric images.
Definition: ECAT7ParametricDensityOutputFileFormat.h:36
std::string _time_frame_definition_filename
name of file to get frame definitions
Definition: PatlakPlot.h:138
float _cal_factor
Calibration Factor, maybe to be removed.
Definition: PatlakPlot.h:131
Declaration of class stir::PlasmaData.
std::string _blood_data_filename
Name of file in which the input function is stored.
Definition: PatlakPlot.h:136
TimeFrameDefinitions _frame_defs
TimeFrameDefinitions.
Definition: PatlakPlot.h:139
static const char *const registered_name
Name which will be used when parsing a PatlakPlot object.
Definition: PatlakPlot.h:75
Class of multiple image frames, one for each time frame Each time frame is a DiscretisedDensity<3,float>
Definition: DynamicDiscretisedDensity.h:45
A class for storing plasma and blood samples of a single study.
Definition: PlasmaData.h:33
unsigned int _starting_frame
Starting frame to apply the model.
Definition: PatlakPlot.h:130
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
PlasmaData _plasma_frame_data
Stores the plasma data into frames for brain studies.
Definition: PatlakPlot.h:137
bool _in_correct_scale
Switch to scale or not the model_matrix to the correct scale, according to the appropriate scale fact...
Definition: PatlakPlot.h:133
Definition of class stir::KineticModel.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
bool _if_cardiac
Switches between cardiac and brain data.
Definition: PatlakPlot.h:129
Declaration of class stir::RegisteredParsingObject.
Declaration of class stir::ModelMatrix<num_param>