Commit 6a1f8377 authored by papillon's avatar papillon
Browse files

* Little progress ...



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@13 45c4679d-1946-429d-baad-37912b19538b
parent b989ea71
......@@ -2,6 +2,8 @@
#define CTACQUISITION_H
#include "Constants.h"
#include "HwInterface.h"
#include "HwCap.h"
namespace lima {
......@@ -9,36 +11,77 @@ class CtAcquisition {
public:
struct Parameters {
int m_acq_nframes;
double m_acq_time;
double m_latency_time;
AcqMode acqMode;
int acqNbFrames;
double acqExpoTime;
int accNbFrames;
double accExpoTime;
int concatNbFrames;
double latencyTime;
TrigMode triggerMode;
ShutMode shutMode;
double shutOpenTime;
double shutCloseTime;
};
CtAcquisition();
CtAcquisition(HwInterface *hw);
~CtAcquisition();
// --- global
void setParameters(const Parameters& pars);
void getParameters(Parameters& pars) const;
// --- acq modes
void setAcqMode(AcqMode mode);
void getAcqMode(AcqMode& mode) const;
void setAcqNbFrames(int nframes);
void getAcqNbFrames(int& nframes) const;
void setAcqExposureTime(double acq_time);
void getAcqExposureTime(double& acq_time) const;
void setAccNbFrames(int nframes);
void getAccNbFrames(int& nframes);
void setAccExposureTime(double acc_time);
void getAccExposureTime(double& acc_time) const;
void setConcatNbFrames(int nframes);
void getConcatNbFrames(int& nframes);
// --- common
void setLatencyTime(double latency_time);
void getLatencyTime(double& latency_time) const;
void setTriggerMode(TrigMode mode);
void getTriggerMode(TrigMode& mode) const;
// ...
// --- shutter
void setShutterMode(ShutMode mode);
void getShutterMode(ShutMode& mode) const;
void setShutterOpenTime(double open_time);
void getShutterOpenTime(double& open_time) const;
void setShutterCloseTime(double close_time);
void getShutterCloseTime(double& close_time) const;
// --- read-only
void getReadoutTime(double& readout_time) const;
void getFrameRate(double& frame_rate) const;
private:
Parameters m_pars;
HwSyncCtrlObj *m_hw_sync;
HwBufferCtrlObj *m_hw_buffer;
Parameters m_pars;
double m_readout_time;
double m_frame_rate;
};
} // namespace lima
......
......@@ -2,6 +2,8 @@
#define CTBUFFER_H
#include "Constants.h"
#include "HwInterface.h"
#include "HwCap.h"
namespace lima {
......@@ -15,7 +17,7 @@ class CtBuffer {
short maxMemory;
};
CtBuffer();
CtBuffer(HwInterface *hw);
~CtBuffer();
void setMode(BufferMode mode);
......@@ -28,7 +30,8 @@ class CtBuffer {
void getMaxMemory(short& max_memory) const;
private:
Parameters m_pars;
HwBufferCtrlObj *m_hw_buffer;
Parameters m_pars;
} // namespace lima
......
#ifndef CTCONTROL_H
#define CTCONTROL_H
#include "HwInterface.h"
namespace lima {
class CtControl {
......@@ -14,7 +16,7 @@ class CtControl {
long LastCounterReady;
};
CtControl();
CtControl(HwInterface *hw);
~CtControl();
void prepareAcq();
......@@ -27,7 +29,9 @@ class CtControl {
void reset();
private:
HwInterface m_hw;
ImageStatus m_img_status;
};
} // namespace lima
......
......@@ -2,6 +2,8 @@
#define CTIMAGE_H
#include "Constants.h"
#include "HwInterface.h"
#include "HwCap.h"
namespace lima {
......@@ -9,16 +11,50 @@ class CtImage {
public:
enum WizardMode {
HardOnly,
SoftOnly,
HardAndSoft,
};
// Size, Type, Bin, XY from common
CtImage();
CtImage(HwInterface *hw);
~CtImage();
void getMaxImageSize(Size& size) const;
void getImageSize(Size& size) const;
void getImageType(ImageType& type) const;
// --- soft
void setSoftROI(ROI roi);
void getSoftROI(ROI& roi) const;
void setSoftBin(BIN bin);
void getSoftBin(BIN& bin) const;
// --- hard
void setHardROI(ROI roi);
void getHardROI(ROI roi);
void setHardBin(BIN bin);
void getHardBin(BIN& bin) const;
// --- wizard
void setWizardMode(WizardMode mode);
void getWizardMode(WizardMode& mode) const;
void setWizardROI(ROI roi);
void setWizardBin(BIN bin);
// --- effective
void getROI(ROI& roi) const;
void setBin(BIN& bin) const;
private:
ROI m_soft_roi, m_hard_roi, m_eff_roi;
BIN m_soft_bin, m_hard_bin, n_eff_bin;
WizardMode m_wizard_mode;
}
......
......@@ -72,7 +72,7 @@ class CtSaving {
void setFramesPerFile(unsigned long frames_per_file);
void getFramePerFile(unsigned long& frames_per_file) const;
// --- headers
// --- common headers
void getStaticHeader(HeaderList& header) const;
......@@ -80,12 +80,27 @@ class CtSaving {
void setCommonHeader(HeaderList header);
void getCommonHeader(HeaderList& header) const;
void addToCommonHeader(HeaderValue value);
// --- frame headers
void setFrameHeader(long frame_nr, HeaderList header);
void getFrameHeader(long frame_nr, HeaderList& header) const;
void takeFrameHeader(long frame_nr, HeaderList& header);
void addToFrameHeader(long frame_nr, HeaderValue value);
void removeFrameHeader(long frame_nr);
void removeAllFrameHeaders();
// --- final header
void takeHeader(long frame_nr, HeaderList& header);
private:
Parameters m_pars;
HeaderList m_static_header;
HeaderList m_common_header;
map<long, HeaderList> m_frame_headers;
};
} // namespace lima
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment