Type representing the measurement model.
More...
#include <MeasurementModel.h>
|
|
using | Label = unsigned int |
| | Label type.
|
| |
|
|
bool | isEmpty () const noexcept |
| | Returns true iff to model contains to data.
|
| |
|
auto | labels () const |
| | Returns all valid labels of the model.
|
| |
|
std::size_t | labelCount () const noexcept |
| | Returns the number of valid labels of the model.
|
| |
|
double | densityScale (Label const &label) const |
| | Returns the density scale parameter of the given VOI.
|
| |
|
The methods in this section all call a functional with a pointer to raw data as its argument. The pointer is only guaranteed to be valid within the call to the given functional.
- Attention
- Do not return the row pointer or save it any other way!
|
| template<class F > |
| auto | withUnsafeDataPointer (Label label, F &&f) const |
| | Calls the given functional with an unsafe pointer to the raw sample data storage. More...
|
| |
Type representing the measurement model.
A MeasurementModel can currently only be loaded from file.
| CortidQCT::MeasurementModel::MeasurementModel |
( |
| ) |
|
|
inlinenoexcept |
Creates an empty measurement model.
kernelSigma defaults to 1,
sliceSpacing default to 1,
samplingRange defaults to [-2, 2] with a stride of 0.1,
densityRange defaults to [-1000, 3000] with a stride of 1
angleRange defaults to [0, 90] with a stride of 1.
- Exceptions
-
| noexcept | iff noexcept(DataStorage()) |
| CortidQCT::MeasurementModel::MeasurementModel |
( |
std::string const & |
filename | ) |
|
|
explicit |
Creates a measurement model by loading from a file.
- Parameters
-
| filename | path to model file |
- See also
- loadFromFile
| static MeasurementModel CortidQCT::MeasurementModel::fromFile |
( |
std::string const & |
filename | ) |
|
|
inlinestatic |
| MeasurementModel & CortidQCT::MeasurementModel::loadFromFile |
( |
std::string const & |
filename | ) |
|
Loads the model from the given file
- Parameters
-
| filename | path to the model file |
- Exceptions
-
| std::invalid_argument | if the model failed to load |
- Returns
- Reference to the loaded model
template<class F >
| auto CortidQCT::MeasurementModel::withUnsafeDataPointer |
( |
Label |
label, |
|
|
F && |
f |
|
) |
| const |
|
inline |
Calls the given functional with an unsafe pointer to the raw sample data storage.
Sample data are stored in order rho, phi, t.
- Template Parameters
-
| F | function that accepts a double const * pointer as the only argument. |
- Parameters
-
| label | Label to retrieve the data pointer for |
| f | functional that is called with the raw data pointer as an argument, |
- Returns
- The return value of the functional
| std::optional<std::string> CortidQCT::MeasurementModel::creationDate |
Optional model creation date
- Note
- Date is saved as a string. This may change is the future.
The documentation for this class was generated from the following files: