1 #ifndef CTL_PREPARESTEPS_H 2 #define CTL_PREPARESTEPS_H 4 #include "abstractpreparestep.h" 6 #include "mat/matrix_utils.h" 23 void setRotationAngle(
double rotation) { _newRotationAngle = {
true, rotation}; }
24 void setPitchPosition(
double pitch) { _newPitchPosition = {
true, pitch}; }
25 void setTiltAngle(
double tilt) { _newTiltAngle = {
true, tilt}; }
28 void prepare(SimpleCTSystem& system)
const override;
34 static std::shared_ptr<TubularGantryParam> forRotationAngle(
double rotation);
35 static std::shared_ptr<TubularGantryParam> forPitchPosition(
double pitch);
36 static std::shared_ptr<TubularGantryParam> forTiltAngle(
double tilt);
39 QPair<bool,double> _newRotationAngle = {
false, 0.0};
40 QPair<bool,double> _newPitchPosition = {
false, 0.0};
41 QPair<bool,double> _newTiltAngle = {
false, 0.0};
49 void setLocation(const mat::Location& location) { _newLocation = {
true, location}; }
50 void setCarmSpan(
double span) { _newCarmSpan = {
true, span}; }
53 void prepare(SimpleCTSystem& system)
const override;
59 static std::shared_ptr<CarmGantryParam> forLocation(
const mat::Location& location);
60 static std::shared_ptr<CarmGantryParam> forCarmSpan(
double span);
63 QPair<bool,mat::Location> _newLocation = {
false, mat::Location()};
64 QPair<bool,double> _newCarmSpan = {
false, 0.0};
72 void setDetectorLocation(const mat::Location& location) { _newDetectorLocation = {
true, location}; }
73 void setSourceLocation(
const mat::Location& location) { _newSourceLocation = {
true, location}; }
76 void prepare(SimpleCTSystem& system)
const override;
82 static std::shared_ptr<GenericGantryParam> forDetectorLocation(
const mat::Location& location);
83 static std::shared_ptr<GenericGantryParam> forSourceLocation(
const mat::Location& location);
86 QPair<bool,mat::Location> _newDetectorLocation = {
false, mat::Location()};
87 QPair<bool,mat::Location> _newSourceLocation = {
false, mat::Location()};
95 void setDetectorDisplacement(const mat::Location& displacement) { _newDetectorDisplacement = {
true, displacement}; }
96 void setGantryDisplacement(
const mat::Location& displacement) { _newGantryDisplacement = {
true, displacement}; }
97 void setSourceDisplacement(
const mat::Location& displacement) { _newSourceDisplacement = {
true, displacement}; }
99 void incrementDetectorDisplacement(
const mat::Location& increment) { _detectorDisplacementIncrement = {
true, increment}; }
100 void incrementSourceDisplacement(
const mat::Location& increment) { _sourceDisplacementIncrement = {
true, increment}; }
103 void prepare(SimpleCTSystem& system)
const override;
105 void fromVariant(
const QVariant& variant)
override;
109 static std::shared_ptr<GantryDisplacementParam>
110 forDetectorDisplacement(
const mat::Location& displacement);
111 static std::shared_ptr<GantryDisplacementParam>
112 forGantryDisplacement(
const mat::Location& displacement);
113 static std::shared_ptr<GantryDisplacementParam>
114 forSourceDisplacement(
const mat::Location& displacement);
115 static std::shared_ptr<GantryDisplacementParam>
116 forDetectorDisplacementIncrement(
const mat::Location& increment);
117 static std::shared_ptr<GantryDisplacementParam>
118 forSourceDisplacementIncrement(
const mat::Location& increment);
121 QPair<bool,mat::Location> _newDetectorDisplacement = {
false, mat::Location()};
122 QPair<bool,mat::Location> _newGantryDisplacement = {
false, mat::Location()};
123 QPair<bool,mat::Location> _newSourceDisplacement = {
false, mat::Location()};
124 QPair<bool,mat::Location> _detectorDisplacementIncrement = {
false, mat::Location()};
125 QPair<bool,mat::Location> _sourceDisplacementIncrement = {
false, mat::Location()};
137 void setEnergyRangeRestriction(const
Range<
float>& range) { _energyRangeRestr = {
true, range}; }
138 void setFluxModifier(
double modifier) { _newFluxModifier = {
true, modifier}; }
139 void setFocalSpotSize(
const QSizeF &size) { _newFocalSpotSize = {
true, size}; }
140 void setFocalSpotPosition(
const Vector3x1 &position) { _newSpotPosition = {
true, position}; }
143 void prepare(SimpleCTSystem& system)
const override;
145 void fromVariant(
const QVariant& variant)
override;
149 static std::shared_ptr<SourceParam> forEnergyRangeRestriction(
const Range<float>& range);
150 static std::shared_ptr<SourceParam> forFluxModifier(
double modifier);
151 static std::shared_ptr<SourceParam> forFocalSpotSize(
const QSizeF& size);
152 static std::shared_ptr<SourceParam> forFocalSpotPosition(
const Vector3x1& position);
155 QPair<bool,double> _newFluxModifier = {
false, 0.0};
156 QPair<bool,QSizeF> _newFocalSpotSize = {
false, QSizeF(0.0, 0.0)};
157 QPair<bool,Vector3x1> _newSpotPosition = {
false, Vector3x1(0.0)};
158 QPair<bool,Range<float>> _energyRangeRestr = {
false, { 0.0f, 0.0f } };
166 void setPhotonEnergy(
double energy) { _newPhotonEnergy = {
true, energy}; }
167 void setPower(
double power) { _newPower = {
true, power}; }
170 void prepare(SimpleCTSystem& system)
const override;
172 void fromVariant(
const QVariant& variant)
override;
176 static std::shared_ptr<XrayLaserParam> forPhotonEnergy(
double energy);
177 static std::shared_ptr<XrayLaserParam> forPower(
double power);
180 QPair<bool,double> _newPhotonEnergy = {
false, 0.0};
181 QPair<bool,double> _newPower = {
false, 0.0};
189 void setTubeVoltage(
double voltage) { _newTubeVoltage = {
true, voltage}; }
190 void setMilliampereSeconds(
double mAs) { _newEmissionCurrent = {
true, mAs}; }
193 void prepare(SimpleCTSystem& system)
const override;
195 void fromVariant(
const QVariant& variant)
override;
199 static std::shared_ptr<XrayTubeParam> forTubeVoltage(
double voltage);
200 static std::shared_ptr<XrayTubeParam> forMilliampereSeconds(
double mAs);
203 QPair<bool,double> _newTubeVoltage = {
false, 0.0};
204 QPair<bool,double> _newEmissionCurrent = {
false, 0.0};
217 void setModuleLocations(QVector<mat::Location> moduleLocations) { _newModuleLocations = {
true, moduleLocations}; }
218 void setPixelSize(
const QSizeF& size) { _newPixelSize = {
true, size}; }
219 void setSkewAngle(
double skewAngle) { _newSkewAngle = {
true, skewAngle}; }
222 void prepare(SimpleCTSystem& system)
const override;
224 void fromVariant(
const QVariant& variant)
override;
228 static std::shared_ptr<GenericDetectorParam>
229 forModuleLocations(QVector<mat::Location> moduleLocations);
230 static std::shared_ptr<GenericDetectorParam> forPixelSize(
const QSizeF& size);
231 static std::shared_ptr<GenericDetectorParam> forSkewAngle(
double skewAngle);
234 QPair<bool,QVector<mat::Location>> _newModuleLocations = {
false, QVector<mat::Location>()};
235 QPair<bool,QSizeF> _newPixelSize = {
false, QSizeF()};
236 QPair<bool,double> _newSkewAngle = {
false, 0.0};
242 #endif // CTL_PREPARESTEPS_H QVariant toVariant() const override
Definition: preparesteps.cpp:200
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:639
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:507
Definition: preparesteps.h:212
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:569
Definition: preparesteps.h:184
Definition: preparesteps.h:90
Definition: preparesteps.h:132
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:39
QVariant toVariant() const override
Definition: preparesteps.cpp:57
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:95
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:615
Base class for preparation steps used within an AcquisitionSetup.
Definition: abstractpreparestep.h:46
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:230
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:403
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:45
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:553
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:381
QVariant toVariant() const override
Definition: preparesteps.cpp:525
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:633
QVariant toVariant() const override
Definition: preparesteps.cpp:130
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:182
Definition: preparesteps.h:18
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:273
QVariant toVariant() const override
Definition: preparesteps.cpp:587
Definition: matrix_utils.h:27
Definition: preparesteps.h:44
Definition: preparesteps.h:161
QVariant toVariant() const override
Definition: preparesteps.cpp:314
#define CTL_TYPE_ID(newIndex)
Definition: serializationinterface.h:189
QVariant toVariant() const override
Definition: preparesteps.cpp:670
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:110
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:278
bool isApplicableTo(const CTSystem &system) const override
Definition: preparesteps.cpp:176
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:491
QVariant toVariant() const override
Definition: preparesteps.cpp:434
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:575
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:22
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:513
void prepare(SimpleCTSystem &system) const override
Definition: preparesteps.cpp:158
Definition: preparesteps.h:67
The Range class holds start and end point of a value range (or interval) and provides a few convenien...
Definition: sparsevoxelvolume.h:12
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:116
void fromVariant(const QVariant &variant) override
Definition: preparesteps.cpp:408