3 #include "ScopeDefines.h"
5 #include "helpers/ScopeNumber.h"
6 #include "helpers/ScopeString.h"
11 #include "devices/InputsDAQmx.h"
12 #include "devices/OutputsDAQmx.h"
16 namespace parameters {
18 using boost::property_tree::wptree;
82 virtual void Load(
const wptree& pt);
85 virtual void Save(wptree& pt)
const;
89 std::vector<std::shared_ptr<Preset>>
presets;
106 virtual std::vector<boost::signals2::connection>
ConnectCopyTrigger(signalchange_t::slot_type _slot);
187 void Load(
const wptree& pt)
override;
188 void Save(wptree& pt)
const override;
193 virtual std::unique_ptr<ScannerVectorFrameBasic::Preset>
MakePreset()
const;
232 void Load(
const wptree& pt)
override;
233 void Save(wptree& pt)
const override;
244 std::vector<boost::signals2::connection>
ConnectCopyTrigger(signalchange_t::slot_type _slot)
override;
294 void Load(
const wptree& pt)
override;
295 void Save(wptree& pt)
const override;
298 std::unique_ptr<ScannerVectorFrameBasic::Preset>
MakePreset()
const override;
300 void SaveToPreset(
const std::wstring& _name,
const Daq& _daq)
override;
325 void Load(
const wptree& pt)
override;
326 void Save(wptree& pt)
const override;
337 std::vector<boost::signals2::connection>
ConnectCopyTrigger(signalchange_t::slot_type _slot)
override;
379 void Load(
const wptree& pt)
override;
380 void Save(wptree& pt)
const override;
383 std::unique_ptr<ScannerVectorFrameBasic::Preset>
MakePreset()
const override;
385 void SaveToPreset(
const std::wstring& _name,
const Daq& _daq)
override;
404 void Load(
const wptree& pt)
override;
405 void Save(wptree& pt)
const override;
416 std::vector<boost::signals2::connection>
ConnectCopyTrigger(signalchange_t::slot_type _slot)
override;
427 void Load(
const wptree& pt)
override;
428 void Save(wptree& pt)
const override;
431 std::unique_ptr<ScannerVectorFrameBasic::Preset>
MakePreset()
const override;
433 void SaveToPreset(
const std::wstring& _name,
const Daq& _daq)
override;
464 void Load(
const wptree& pt)
override;
465 void Save(wptree& pt)
const override;
476 std::vector<boost::signals2::connection>
ConnectCopyTrigger(signalchange_t::slot_type _slot)
override;
529 void Load(
const wptree& pt)
override;
530 void Save(wptree& pt)
const override;
533 std::unique_ptr<ScannerVectorFrameBasic::Preset>
MakePreset()
const override;
535 void SaveToPreset(
const std::wstring& _name,
const Daq& _daq)
override;
ScopeNumber< double > pixeltime
pixel dwell time in microseconds, this is also the analog out sampling interval
virtual void ConnectRateUpdate(signalchange_t::slot_type _slot)
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
void ConnectOnlineUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector (which is displayed on the GUI) chang...
virtual uint32_t YTotalLines() const
virtual uint32_t XTotalPixels() const
void Save(wptree &pt) const override
save parameters into a boost:property_tree
std::unique_ptr< ScannerVectorFrameBasic::Preset > MakePreset() const override
Since preset loading is done in base class (here), we need to generate a derived preset, this can be done by calling this function and overriding it in derived classes.
ScopeNumber< double > xcutoff
Cutoff fraction at beginning of line, total pixels per line = xres * (1 + xcutoff + xretrace) ...
virtual void ConnectResolutionUpdate(signalchange_t::slot_type _slot)
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
static std::unique_ptr< ScannerVectorFrameBasic > Create(const ScannerVectorFrameBiDi &_o)
Create copy function for factory.
uint32_t TotalPixels() const override
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
virtual std::vector< boost::signals2::connection > ConnectCopyTrigger(signalchange_t::slot_type _slot)
Connect a slot that is called if some member parameter changes, this can be used to copy certain chan...
ScopeNumber< uint32_t > averages
number of images to average
boost::signals2::signal< void()> signalchange_t
typedef for change signal slot functions
ScopeNumber< uint32_t > yres
y resolution of the image (lines)
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
ScopeString name
name of the preset
static std::unique_ptr< ScannerVectorFrameBasic > Factory(const ScannerVectorType &_type, const ScannerVectorFrameBasic *const _o=nullptr)
Factory method to generate parameter sets for different scan types and put them into a ScannerVectorF...
virtual void CoerceYResolution()
Changes the y resolution to the allowed values for the resonance scanner.
ScopeNumber< double > pockels
pockels cell value
ScopeNumber< uint32_t > waitafterenqueuestorage
Time (in milliseconds) to wait after the PipelineController has enqueued the image to the storage que...
ScopeNumber< double > yrotation
Rotation angle around the Y axis in degrees.
uint32_t TotalPixelsOneFrame() const override
uint32_t YScanLines() const
virtual void DeletePreset(const std::wstring &_name)
Deletes a preset.
void Load(const wptree &pt) override
Load from boost property tree.
ScopeNumber< double > scannerdelay
compensate, by waiting, that scanners lag behind the command voltage
Parameters for a ScannerVectorFrameBiDi.
void ConnectOnlineUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector (which is displayed on the GUI) chang...
static std::unique_ptr< ScannerVectorFrameBasic > Create()
Create function for factory.
void ConnectRateUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
ScopeNumber< double > yaspectratio
aspect ratio in y direction
void LoadFromPreset(const std::wstring &_name, Daq &_daq) override
Load parameters from a preset.
std::vector< boost::signals2::connection > ConnectCopyTrigger(signalchange_t::slot_type _slot) override
Connect a slot that is called if some member parameter changes, this can be used to copy certain chan...
void Save(wptree &pt) const override
Save to boost property tree.
virtual uint32_t XImagePixels() const
ScopeNumber< double > ycutoff
Cutoff fraction at beginning of frame, total lines per frame = yres * (1 + ycutoff + yretrace) ...
Parameters for a ScannerVectorFrameResonance.
uint32_t YTotalLines() const override
ScopeNumber< double > yretrace
Cutoff fraction for retrace at end of frame.
void Save(wptree &pt) const override
save parameters into a boost:property_tree
virtual void ConnectResolutionChange(signalchange_t::slot_type _slot)
Connect a slot that is called if xres or yres in the ScannerVector are changed This usually is ScopeC...
virtual void Save(wptree &pt) const
Save to boost property tree.
ScopeNumber< double > xturnfraction
fraction spent for turning the x galvo around
ScopeNumber< uint32_t > xres
x resolution of the image (linewidth)
All parameters for scanner data generation and pixel acquisition If you add/remove parameters or deri...
ScopeNumber< double > xturnfraction
fraction spent for turning the x resonance scanner around
uint32_t TotalPixelsOneFrame() const override
All parameter classes derive from this.
ScopeNumber< double > xaspectratio
aspect ratio in x direction
std::vector< boost::signals2::connection > ConnectCopyTrigger(signalchange_t::slot_type _slot) override
Connect a slot that is called if some member parameter changes, this can be used to copy certain chan...
uint32_t YCutoffLines() const
ScopeNumber< double > xretrace
Cutoff fraction for retrace at end of line.
virtual void UpdateXTurnFraction()
Updates the x turn fraction for the resonance scanner.
static std::unique_ptr< ScannerVectorFrameBasic > Create(const ScannerVectorFrameBasic &_o)
Create copy function for factory.
ScopeNumber< double > xrotation
Rotation angle around the X axis in degrees.
Parameters for a ScannerVectorLine.
ScopeNumber< uint32_t > xres
x resolution of the image (linewidth)
ScopeNumber< double > yaspectratio
aspect ratio in y direction
ScopeNumber< double > ycutoff
Cutoff fraction at beginning of frame, total lines per frame = yres * (1 + ycutoff + yretrace) ...
Base class for all Scope datatypes here, provides a uniform interface (and saves typing...).
Parameters for a ScannerVectorFramePlaneHopper.
virtual void SaveToPreset(const std::wstring &_name, const Daq &_daq)
Save parameters into a preset.
void Load(const wptree &pt) override
load parameters from a boost::property_tree
std::vector< PlaneProperties > planes
vector with properties for all planes.
static std::unique_ptr< ScannerVectorFrameBasic > Create()
Create function for factory.
ScopeNumber< double > ycutoff
Cutoff fraction at beginning of frame, total lines per frame = yres * (1 + ycutoff + yretrace) ...
void ConnectOnlineUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector (which is displayed on the GUI) chang...
ScopeNumber< double > yretrace
Cutoff fraction for retrace at end of frame.
virtual std::unique_ptr< ScannerVectorFrameBasic::Preset > MakePreset() const
Since preset loading is done in base class (here), we need to generate a derived preset, this can be done by calling this function and overriding it in derived classes.
std::vector< std::shared_ptr< Preset > > presets
A vector with presets.
ScopeNumber< double > xturnfraction
fraction spent for turning the x galvo around
void ConnectOnlineUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector (which is displayed on the GUI) chang...
void ConnectMicronPerPixelUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
static std::unique_ptr< ScannerVectorFrameBasic > Create(const ScannerVectorFrameResonance &_o)
Create copy function for factory.
uint32_t TotalPixels() const override
uint32_t YTotalLines() const override
static std::unique_ptr< ScannerVectorFrameBasic > Create(const ScannerVectorFrameSaw &_o)
Create copy function for factory.
std::vector< PlaneProperties > planes
vector with properties for all planes
void Save(wptree &pt) const override
Save to boost property tree.
uint32_t XRetracePixels() const
virtual void ConnectOnlineUpdate(signalchange_t::slot_type _slot)
Connect a slot that is called if something in the ScannerVector (which is displayed on the GUI) chang...
ScopeNumber< bool > squarepixels
pixels are square (thus FOV rectangular) when true, when false pixels are rectangular (thus FOV squar...
ScopeNumber< uint32_t > waitafterenqueuedisplay
Time (in milliseconds) to wait after the PipelineController has enqueued the image to the display que...
uint32_t XTotalPixels() const override
static std::unique_ptr< ScannerVectorFrameBasic > Create()
Create function for factory.
void ConnectMicronPerPixelUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
uint32_t XTotalPixels() const override
ScopeNumber< double > ycutoff
Cutoff fraction at beginning of frame, total lines per frame = yres * (1 + ycutoff + yretrace) ...
uint32_t XTurnPixels() const
void ConnectMicronPerPixelUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
virtual uint32_t TotalPixelsOneFrame() const
std::unique_ptr< ScannerVectorFrameBasic::Preset > MakePreset() const override
Since preset loading is done in base class (here), we need to generate a derived preset, this can be done by calling this function and overriding it in derived classes.
virtual void LoadFromPreset(const std::wstring &_name, Daq &_daq)
Load parameters from a preset.
void ConnectRateUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
void Load(const wptree &pt) override
Load from boost property tree.
void Load(const wptree &pt) override
load parameters from a boost::property_tree
uint32_t YRetraceLines() const
In here all declarations for all kinds of datatypes Scope needs.
ScopeNumber< double > xturnfraction
fraction spent for turning the x resonance scanner around
ScopeNumber< double > xoffset
x offset
virtual uint32_t TotalPixels() const
std::unique_ptr< ScannerVectorFrameBasic::Preset > MakePreset() const override
Since preset loading is done in base class (here), we need to generate a derived preset, this can be done by calling this function and overriding it in derived classes.
void ConnectRateUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
uint32_t YScanLines() const
void SaveToPreset(const std::wstring &_name, const Daq &_daq) override
Save parameters into a preset.
std::unique_ptr< ScannerVectorFrameBasic::Preset > MakePreset() const override
Since preset loading is done in base class (here), we need to generate a derived preset, this can be done by calling this function and overriding it in derived classes.
void Load(const wptree &pt) override
load parameters from a boost::property_tree
void ConnectRateUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
uint32_t YTotalLines() const override
static std::unique_ptr< ScannerVectorFrameBasic > Create()
Create function for factory.
virtual void Load(const wptree &pt)
Load from boost property tree.
Parameters for a ScannerVectorFrameSaw.
void Save(wptree &pt) const override
save parameters into a boost:property_tree
void SaveToPreset(const std::wstring &_name, const Daq &_daq) override
Save parameters into a preset.
void SaveToPreset(const std::wstring &_name, const Daq &_daq) override
Save parameters into a preset.
void LoadFromPreset(const std::wstring &_name, Daq &_daq) override
Load parameters from a preset.
uint32_t YRetraceLines() const
void Load(const wptree &pt) override
load parameters from a boost::property_tree
ScopeNumber< double > yoffset
y offset
uint32_t TotalPixelsOneFrame() const override
uint32_t XTurnPixels() const
std::vector< boost::signals2::connection > ConnectCopyTrigger(signalchange_t::slot_type _slot) override
Connect a slot that is called if some member parameter changes, this can be used to copy certain chan...
A templated class for a thread-safe std::wstring, with signals that are called on value changes...
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Parameters for a ScannerVectorFrameBasic.
uint32_t XCutoffPixels() const
ScopeNumber< double > ycutoff
Cutoff fraction at beginning of frame, total lines per frame = yres * (1 + ycutoff + yretrace) ...
void Save(wptree &pt) const override
Save to boost property tree.
ScopeNumber< double > zoom
current zoom factor (from 1 to 20).
static std::unique_ptr< ScannerVectorFrameBasic > Create()
Create function for factory.
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
ScopeNumber< double > fastz
current fast z position
uint32_t TotalPixels() const override
ScopeNumber< double > yretrace
Cutoff fraction for retrace at end of frame.
uint32_t YRetraceLines() const
virtual void CoerceOffset()
Changes the limits of xoffset and yoffset to account for the maximum allowed offset depending on zoom...
ScopeNumber< uint32_t > waitafterenqueuedisplay
Time (in milliseconds) to wait after the PipelineController has enqueued the image to the display que...
ScopeNumber< double > ycutoff
Cutoff fraction at beginning of frame, total lines per frame = yres * (1 + ycutoff + yretrace) ...
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
uint32_t YScanLines() const
std::vector< boost::signals2::connection > ConnectCopyTrigger(signalchange_t::slot_type _slot) override
Connect a slot that is called if some member parameter changes, this can be used to copy certain chan...
ScopeNumber< uint32_t > waitafterenqueuestorage
Time (in milliseconds) to wait after the PipelineController has enqueued the image to the storage que...
ScopeNumber< uint32_t > yres
y resolution of the image (lines)
uint32_t XTurnPixelsRight() const
void Load(const wptree &pt) override
Load from boost property tree.
uint32_t YCutoffLines() const
void Save(wptree &pt) const override
Save to boost property tree.
Various helper functions and classes for Scope.
ScopeNumber< double > yretrace
Cutoff fraction for retrace at end of frame.
void Save(wptree &pt) const override
save parameters into a boost:property_tree
void ConnectMicronPerPixelUpdate(signalchange_t::slot_type _slot) override
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
uint32_t YCutoffLines() const
uint32_t XTotalPixels() const override
ScopeNumber< double > yretrace
Cutoff fraction for retrace at end of frame.
ScopeNumber< bool > squarepixels
pixels are square (thus FOV rectangular) when true, when false pixels are rectangular (thus FOV squar...
uint32_t TotalPixelsOneFrame() const override
uint32_t TotalPixels() const override
ScopeNumber< double > xcutoff
Cutoff fraction at beginning of line, total pixels per line = xres * (1 + xcutoff + xretrace) ...
void LoadFromPreset(const std::wstring &_name, Daq &_daq) override
Load parameters from a preset.
void Save(wptree &pt) const override
save parameters into a boost:property_tree
void Load(const wptree &pt) override
Load from boost property tree.
void SaveToPreset(const std::wstring &_name, const Daq &_daq) override
Save parameters into a preset.
void Load(const wptree &pt) override
load parameters from a boost::property_tree
static std::unique_ptr< ScannerVectorFrameBasic > Create(const ScannerVectorFramePlaneHopper &_o)
Create copy function for factory.
void LoadFromPreset(const std::wstring &_name, Daq &_daq) override
Load parameters from a preset.
ScopeNumber< double > yretrace
Cutoff fraction for retrace at end of frame.
Parameters for the ScannerVector.
virtual void ConnectMicronPerPixelUpdate(signalchange_t::slot_type _slot)
Connect a slot that is called if something in the ScannerVector changes that renders a recalculation ...
uint32_t XScanPixels() const
ScopeNumber< double > xaspectratio
aspect ratio in x direction
ScopeNumber< double > xretrace
Cutoff fraction for retrace at end of line.
virtual uint32_t YImageLines() const
uint32_t XTurnPixelsLeft() const