Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
CircleScanMethod.h
Go to the documentation of this file.
1#pragma once
3
4namespace sf::ipj
5{
6
9
11{
12 public:
13 // Constructor.
14 explicit CircleScanMethod(const Parameters&);
15
16 // Destructor.
18
19 // Overridden from base class.
20 void StateChange(EState prev, EState cur) override;
21
22 // Overridden from base class.
23 bool Initialize() override
24 {
25 return true;
26 }
27
28 // Overridden from base class.
30 // Overloaded from base class.
31 bool HandleCommand(ECommand cmd) override;
32 // Overloaded from base class.
33 bool createViewer() override;
34
35 // Overloaded from base class.
36 void Read(IniProfile* inifile) override;
37 // Overloaded from base class.
38 void Write(IniProfile* inifile) override;
39 // Overloaded from base class.
40 bool GetIndexVel(gmi::AxesCoord& vel, int index) override;
41 // Overloaded from base class.
42 bool GetSurface(Matrix44& surface, int index, double frac) override;
43 // Overloaded from base class.
44 bool SetAcqParams(int index, double frac) override;
45 // Overloaded from base class.
46 bool Sustain(const timespec& ts) override;
47 // Overloaded from base class.
49 // Overloaded from base class.
50 bool GetTriggerValue(gmi::AxisValue& value) override;
51 // Overloaded from a base class.
53 // Two 3D vectors for spanning the 3D flat surface of the circle.
54 Vector3D FOriginVector;
55 Vector3D FStepVector;
56 // Exportable variable parameters.
66 // Speed when a rotation axis is selected.
68
69 // Mode for calculating and driving the radial density.
71 {
72 dmSTATIC = 0,// Radial density is calculated in meas/rad.
73 dmDYNAMIC = 1// Radial density is calculated in meas/m.
74 };
75
79 void handleVariableEvent(Variable::EEvent event, const Variable& caller, Variable& link, bool same_inst) override;
80
85 std::ostream& cout() override;
86
87 // Get the frame pointer.
89
90 // Overloaded from base class.
91 void HandleCursorEvent(bool btn_down, Qt::KeyboardModifiers shift, int index, double frac) override;
92
93 // Property handler when assigned the frame animation class is loaded.
94 void SetAnimationFile(const QString& file);
95
97
98 // Holds the current command being executed.
100 // Last requested surface index.
102 // Last requested surface fraction.
104 // Holds the graphic configuration file name.
106
108};
109
110}// namespace sf::ipj
Class for reading and writing ini-profiles.
Definition IniProfile.h:17
Create a local variable by calling the protected constructor.
Definition Variable.h:953
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:15
EState
States of operation.
Definition ScanMethod.h:408
ECommand
Available commands.
Definition ScanMethod.h:120
EEvent
Events send to the handler set with sf::Variable::setHandler.
Definition VariableTypes.h:130
Class for creating and referencing global or local created parameters or settings called variables....
Definition Variable.h:16
All axis values in one structure accompanied by some handy manipulation methods.
Definition AxesCoord.h:13
Single position, speed or acceleration value of a specific axis.
Definition GmiTypes.h:174
Definition CircleScanMethodViewer.h:20
Definition CircleScanMethod.h:11
bool createViewer() override
Creates a scan method UI frame if possible. Can be overridden by a derived class.
bool SetAcqParams(int index, double frac) override
Sets the project acquisition parameters/variables based on the passed index. Must be overridden by a ...
Vector3D FOriginVector
Definition CircleScanMethod.h:54
QString FAnimationFile
Definition CircleScanMethod.h:105
void SetAnimationFile(const QString &file)
void Write(IniProfile *inifile) override
Writes the settings to the passed inifile.
Vector3D FStepVector
Definition CircleScanMethod.h:55
void AddPropertyPages(PropertySheetDialog *sheet) override
Adds scan method specific property pages to the passed sheet. Can be overridden by a derived class.
void StateChange(EState prev, EState cur) override
Is called when the current state changes for a derived class to act up on. Must be overridden by a de...
bool GetGenericInfoList(StringList &) override
Gets the list of linked variables or results. Must be overridden in a derived class.
ECommand FCommand
Definition CircleScanMethod.h:99
bool GetIndexVel(gmi::AxesCoord &vel, int index) override
Gets the velocity calculated by the derived scan mode. Must be overridden in a derived class.
LocalVariable VScanDensity
Definition CircleScanMethod.h:59
bool GetTriggerValue(gmi::AxisValue &value) override
Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA ...
void Read(IniProfile *inifile) override
Reads the settings from the passed inifile.
CircleScanMethod(const Parameters &)
bool GetSurface(Matrix44 &surface, int index, double frac) override
Abstract method which must be oerridden to retrieve the combined surface matrix with applied angles.
LocalVariable VSurfaceRotate
Definition CircleScanMethod.h:64
bool HandleCommand(ECommand cmd) override
Handles the command given by Execute(). Must be overridden in a derived class.
void HandleCursorEvent(bool btn_down, Qt::KeyboardModifiers shift, int index, double frac) override
Can be overridden to handle cursor events when the scan is selected in the project.
CircleScanMethodViewer * getCircleViewer()
int _lastScanIndex
Definition CircleScanMethod.h:101
void handleVariableEvent(Variable::EEvent event, const Variable &caller, Variable &link, bool same_inst) override
Overridden abstract event handler for local variables.
LocalVariable VIndexDensity
Definition CircleScanMethod.h:61
LocalVariable VIndexInvert
Definition CircleScanMethod.h:65
bool Initialize() override
Initializes the scan method. Must be overridden by a derived class.
Definition CircleScanMethod.h:23
LocalVariable VScanVelocity
Definition CircleScanMethod.h:58
LocalVariable VScanLength
Definition CircleScanMethod.h:57
gmi::EAxisLocation GetScanAxis() override
Gets the scan and index axis for position calculations. Must be overridden by a derived class.
LocalVariable VIndexCount
Definition CircleScanMethod.h:60
EDensityMode
Definition CircleScanMethod.h:71
@ dmDYNAMIC
Definition CircleScanMethod.h:73
@ dmSTATIC
Definition CircleScanMethod.h:72
friend CircleScanMethodViewer
Definition CircleScanMethod.h:107
bool Sustain(const timespec &ts) override
Can be overridden to do background processing.
std::ostream & cout() override
Get the output stream which is attached the log listing in the viewer.
LocalVariable VDensityMode
Definition CircleScanMethod.h:62
LocalVariable VSurfaceSpeed
Definition CircleScanMethod.h:67
LocalVariable VBackSide
Definition CircleScanMethod.h:63
double _lastScanFrac
Definition CircleScanMethod.h:103
Base class for scan methods using a common tool description.
Definition ToolBaseScanMethod.h:35
EAxisLocation
Enumeration of axis locations.
Definition GmiTypes.h:81
Definition CircleScanMethod.h:5
Mandatory structure for initialization of derived class.
Definition ScanMethod.h:28