CTL
0.6.1
Computed Tomography Library
|
Base class for preparation steps used within an AcquisitionSetup. More...
#include <abstractpreparestep.h>
Public Types | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
virtual void | prepare (SimpleCTSystem &system) const =0 |
virtual bool | isApplicableTo (const CTSystem &system) const =0 |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
~AbstractPrepareStep () override=default | |
![]() | |
virtual | ~SerializationInterface ()=default |
Protected Member Functions | |
AbstractPrepareStep (const AbstractPrepareStep &)=default | |
AbstractPrepareStep (AbstractPrepareStep &&)=default | |
AbstractPrepareStep & | operator= (const AbstractPrepareStep &)=default |
AbstractPrepareStep & | operator= (AbstractPrepareStep &&)=default |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Base class for preparation steps used within an AcquisitionSetup.
Preparation steps are used to bring certain components in the desired state for an upcoming image acquisition. This usually sets member variables to defined values.
Sub-classing of AbstractPrepareStep is recommended for each sub-class of SystemComponent to allow for the preparation of their state in an AcquisitionSetup. Any sub-class must implement the abstract interface methods prepare() and isApplicableTo().
To enable de-/serialization of objects of the new sub-class, reimplement the toVariant() and fromVariant() methods. These should take care of all newly introduced information of the sub-class. Additionally, call the macro DECLARE_SERIALIZABLE_TYPE(YourNewClassName) within the .cpp file of your new class (substitute "YourNewClassName" with the actual class name). Objects of the new class can then be de-/serialized with any of the serializer classes (see also AbstractSerializer). Note that proper de-/serializability of all individual prepare steps is a requirement to be able to de-/serialize an AcquisitionSetup.
The isApplicableTo() method shall serve as an option to verify whether a specific prepare step can be applied to a given CTSystem. This usually checks if the required components (which are to be prepared) are present in the system.
In the prepare() method, the actual preparation of the system state is performed. Note that this is not necessarily limited to changes to a single component within the system.
|
overridedefault |
Default (virtual) destructor.
|
inlineoverridevirtual |
Reads all member variables from the QVariant variant.
Reimplemented from CTL::SerializationInterface.
Reimplemented in CTL::prepare::GenericDetectorParam, CTL::prepare::XrayTubeParam, CTL::prepare::XrayLaserParam, CTL::prepare::SourceParam, CTL::prepare::GantryDisplacementParam, CTL::prepare::GenericGantryParam, CTL::prepare::CarmGantryParam, and CTL::prepare::TubularGantryParam.
|
pure virtual |
Returns true if this prepare step can be applied to system.
Typically, this method will check whether system contains all components that shall be prepared by this instance.
Implemented in CTL::prepare::GenericDetectorParam, CTL::prepare::XrayTubeParam, CTL::prepare::XrayLaserParam, CTL::prepare::SourceParam, CTL::prepare::GantryDisplacementParam, CTL::prepare::GenericGantryParam, CTL::prepare::CarmGantryParam, and CTL::prepare::TubularGantryParam.
|
pure virtual |
This method performs the actual preparation of the state of system. This usually consists of setting member variables of certain components in system to defined values.
Note that this does not necessarily have to be limited to changes to a single component within the system.
Implemented in CTL::prepare::GenericDetectorParam, CTL::prepare::XrayTubeParam, CTL::prepare::XrayLaserParam, CTL::prepare::SourceParam, CTL::prepare::GantryDisplacementParam, CTL::prepare::GenericGantryParam, CTL::prepare::CarmGantryParam, and CTL::prepare::TubularGantryParam.
|
inlineoverridevirtual |
Stores all member variables in a QVariant.
Reimplemented from CTL::SerializationInterface.
Reimplemented in CTL::prepare::GenericDetectorParam, CTL::prepare::XrayTubeParam, CTL::prepare::XrayLaserParam, CTL::prepare::SourceParam, CTL::prepare::GantryDisplacementParam, CTL::prepare::GenericGantryParam, CTL::prepare::CarmGantryParam, and CTL::prepare::TubularGantryParam.
|
inlineoverridevirtual |
Returns the type id of the prepare step.
List of all default types:
Type | Type-ID |
---|---|
AbstractPrepareStep::Type | 0 |
GenericDetectorParam::Type | 101 |
GenericGantryParam::Type | 201 |
CarmGantryParam::Type | 210 |
TubularGantryParam::Type | 220 |
GantryDisplacementParam::Type | 230 |
SourceParam::Type | 300 |
XrayLaserParam::Type | 310 |
XrayTubeParam::Type | 320 |
Reimplemented from CTL::SerializationInterface.
Reimplemented in CTL::prepare::GenericDetectorParam, CTL::prepare::XrayTubeParam, CTL::prepare::XrayLaserParam, CTL::prepare::SourceParam, CTL::prepare::GantryDisplacementParam, CTL::prepare::GenericGantryParam, CTL::prepare::CarmGantryParam, and CTL::prepare::TubularGantryParam.