CTL  0.6.1
Computed Tomography Library
simplectsystem.h
Go to the documentation of this file.
1 #ifndef CTL_SIMPLESYSTEM_H
2 #define CTL_SIMPLESYSTEM_H
3 
4 #include "ctsystem.h"
5 
6 namespace CTL {
7 
95 class SimpleCTSystem : public CTSystem
96 {
97 public:
98  // ctor
100  const AbstractGantry& gantry,
101  const AbstractSource& source);
105 
106  // factory ctor
107  static SimpleCTSystem fromCTSystem(const CTSystem& system, bool* ok = nullptr);
108  static SimpleCTSystem fromCTSystem(CTSystem&& system, bool* ok = nullptr);
109 
110  Q_DECL_DEPRECATED_X("Function has been renamed. "
111  "Please consider the new spelling 'fromCTSystem'.")
112  static SimpleCTSystem fromCTsystem(const CTSystem& system, bool* ok = nullptr);
113  Q_DECL_DEPRECATED_X("Function has been renamed. "
114  "Please consider the new spelling 'fromCTSystem'.")
115  static SimpleCTSystem fromCTsystem(CTSystem&& system, bool* ok = nullptr);
116 
117  // virtual methods
118  CTSystem* clone() const & override;
119  CTSystem* clone() && override;
120 
121  // getter methods
122  AbstractDetector* detector() const;
123  AbstractGantry* gantry() const;
124  AbstractSource* source() const;
125 
126  // replacer
127  void replaceDetector(AbstractDetector* newDetector);
128  void replaceDetector(std::unique_ptr<AbstractDetector> newDetector);
129  void replaceGantry(AbstractGantry* newGantry);
130  void replaceGantry(std::unique_ptr<AbstractGantry> newGantry);
131  void replaceSource(AbstractSource* newSource);
132  void replaceSource(std::unique_ptr<AbstractSource> newSource);
133 
134  // other
135  void addBeamModifier(AbstractBeamModifier* modifier);
136  void addBeamModifier(std::unique_ptr<AbstractBeamModifier> modifier);
137  float photonsPerPixelMean() const;
138  float photonsPerPixel(uint module) const;
139  std::vector<float> photonsPerPixel() const;
140  void removeBeamModifiers();
141 
142 protected:
143  SimpleCTSystem() = default;
144  SimpleCTSystem(const CTSystem&);
145  SimpleCTSystem(CTSystem&& system);
146 
147 private:
149  using CTSystem::clear;
151  using CTSystem::operator<<;
152 };
153 
154 Q_DECL_DEPRECATED_X("Class has been renamed. Please consider the new spelling 'SimpleCTSystem'.")
156 
157 } // namespace CTL
158 
161 #endif // CTL_SIMPLESYSTEM_H
void addComponent(ComponentPtr component)
Definition: ctsystem.cpp:268
Base class for components that modify the X-ray beam.
Definition: abstractbeammodifier.h:45
AbstractGantry * gantry() const
Definition: simplectsystem.cpp:141
AbstractDetector * detector() const
Definition: simplectsystem.cpp:131
void removeComponent(SystemComponent *component)
Definition: ctsystem.cpp:302
void removeBeamModifiers()
Removes all beam modifiers in this system.
Definition: simplectsystem.cpp:281
CTSystem * clone() const &override
Definition: simplectsystem.cpp:288
Base class for gantry components.
Definition: abstractgantry.h:65
Base class for detector components.
Definition: abstractdetector.h:54
void replaceSource(AbstractSource *newSource)
Definition: simplectsystem.cpp:218
The CTSystem class manages the list of all components of a system.
Definition: ctsystem.h:84
void replaceGantry(AbstractGantry *newGantry)
Definition: simplectsystem.cpp:191
static SimpleCTSystem fromCTSystem(const CTSystem &system, bool *ok=nullptr)
Definition: simplectsystem.cpp:67
void replaceDetector(AbstractDetector *newDetector)
Definition: simplectsystem.cpp:164
std::vector< float > photonsPerPixel() const
Definition: simplectsystem.cpp:273
unsigned int uint
Qt style alias for unsigned int.
Definition: modulelayout.h:6
SimpleCTSystem()=default
void addBeamModifier(AbstractBeamModifier *modifier)
Definition: simplectsystem.cpp:243
AbstractSource * source() const
Definition: simplectsystem.cpp:151
Base class for source components.
Definition: abstractsource.h:68
float photonsPerPixelMean() const
Definition: simplectsystem.cpp:257
void clear()
Definition: ctsystem.cpp:289
The SimpleCTSystem class is a specialized sub-class of CTSystem for simple systems (i....
Definition: simplectsystem.h:95