DAS  3.1.6 - 18/09/2017
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
CameraObject Class Reference

Create the camera object. The use of this library is very simple, as example view the following code of the dcomain.cpp. More...

#include <dco.h>

+ Collaboration diagram for CameraObject:

Public Types

enum  PROPERTIES_DECIMATION { DECIMATION_NONE, DECIMATION_PRESENT }
 
enum  PROPERTIES_GAIN { FIXED_GAIN = 1, DOUBLE_GAIN = 2, GAIN_127 = 3, AD_9826 = 4 }
 
enum  PROPERTIES_SELECTOR { SEL_GAIN = 1, SEL_DECIMATION, SEL_FILTERS }
 
enum  REVISION { LIBRARY, LIBDCL, FDLPCI, WINDRIVER }
 
enum  START_MODE { COOLER_IS_OFF, COOLER_IS_ON }
 
enum  STATUS { READY, EXPOSURE, DOWNLOADING, FILTERMOVING }
 

Public Member Functions

U32 Address ()
 
void Binning (int Hor=1, int Ver=1)
 
void Binning (int *Hor, int *Ver)
 
int BitDecimation ()
 
void BitDecimation (int val)
 
const char * CameraName ()
 
 CameraObject (void)
 Create the camera object. More...
 
 CameraObject (const char *CameraConfigFile, START_MODE StartMode=COOLER_IS_OFF)
 Default destructor, close the opened camera. More...
 
const char * CcdName ()
 
void CCDSize (int &XDim, int &YDim)
 
void Close ()
 
bool Cooler ()
 
void Cooler (int enable)
 
double Countdown ()
 
int Downloading ()
 
int ErrorCode ()
 
const char * ErrorMessage (int Code)
 
double FanSpeed ()
 
bool Fast ()
 
void Fast (bool Mode)
 
bool Filter (int Speed, int Torque, int Offset)
 
void Filter (int *Speed, int *Torque, int *Offset)
 
bool Filter (int Flt)
 
void Filter (bool Calib)
 
int Filter ()
 
bool Gain (int CCDgain)
 
int Gain ()
 
bool Gain (int UGain, int Offset, int Range)
 
void Gain (int *UGain, int *Offset, int *Range)
 
double GainValue (bool preset=false, int idx=0, double *mVoffset=0)
 
int Id ()
 
bool Image (bool Light, double Exposure, U16 *mat)
 
void ImageSize (int &XDim, int &YDim)
 
U32 ImageSize ()
 
bool IsFilterWheel ()
 
bool Load (const char *CameraConfigFile)
 
bool Open (const char *CameraConfigFile, START_MODE StartMode=COOLER_IS_OFF, int camAdd=-1, int subAdd=-1)
 
void PixelSize (double &XDim, double &YDim)
 
int Plug (int parCnt, int *param)
 
bool Power (double Pow)
 
double Power ()
 
int Properties (int selector)
 
void Reentrant (bool ena)
 
void ROI (int XStart, int YStart, int XWidth, int YHeight)
 
void ROI (int *XStart, int *YStart, int *XWidth, int *YHeight)
 
void ROI (bool roi)
 
bool ROI ()
 
bool Sequence (bool Light, double Exposure, int NumOfFrames, U16 *mat[])
 
int SequenceCount ()
 
U32 Serial ()
 
void SetFanSpeed (double speed)
 
int Status ()
 
void Stop ()
 
void SubAdd (int Camera)
 
int SubAdd ()
 
double Temperature ()
 
void TemperatureSet (double Celsius)
 
double TemperatureSet ()
 
bool Trigger ()
 
void Trigger (bool Mode)
 
int UsedPort ()
 
int Ver (REVISION Who=LIBRARY, char *Version=0)
 
 ~CameraObject ()
 

Protected Member Functions

int TaskSet (void)
 
void TaskSet (int Set)
 

Private Attributes

int Port
 
bool Reent
 

Detailed Description

Create the camera object. The use of this library is very simple, as example view the following code of the dcomain.cpp.

Definition at line 52 of file dco.h.

Member Enumeration Documentation

§ PROPERTIES_DECIMATION

Enumerator
DECIMATION_NONE 
DECIMATION_PRESENT 

Definition at line 86 of file dco.h.

§ PROPERTIES_GAIN

Camera gain properties flag

Enumerator
FIXED_GAIN 

Camera has only one gain.

DOUBLE_GAIN 

Camera has two gain.

GAIN_127 

127 selectable gain

AD_9826 

Analog Device A/D converter with 64 gain, 2 input range, 9 bit offset.

Definition at line 79 of file dco.h.

79  {
80  FIXED_GAIN = 1,
81  DOUBLE_GAIN = 2,
82  GAIN_127 = 3,
83  AD_9826 = 4,
84  };
Analog Device A/D converter with 64 gain, 2 input range, 9 bit offset.
Definition: dco.h:83
Camera has two gain.
Definition: dco.h:81
127 selectable gain
Definition: dco.h:82
Camera has only one gain.
Definition: dco.h:80

§ PROPERTIES_SELECTOR

Enumerator
SEL_GAIN 
SEL_DECIMATION 
SEL_FILTERS 

Number of filters.

Definition at line 91 of file dco.h.

91  {
92  SEL_GAIN = 1,
95  };
Number of filters.
Definition: dco.h:94

§ REVISION

Revision selector

Enumerator
LIBRARY 

DCO version, the revision of this library!

LIBDCL 

DCL version, the revision of the base library.

FDLPCI 

FDLPCI version (FPGA Version of the fast parallel interface on PCI bus)

WINDRIVER 

Windriver version, the low level driver by JUNGO.

Definition at line 57 of file dco.h.

57  {
58  LIBRARY,
59  LIBDCL,
60  FDLPCI,
61  WINDRIVER
62  };
FDLPCI version (FPGA Version of the fast parallel interface on PCI bus)
Definition: dco.h:60
DCO version, the revision of this library!
Definition: dco.h:58
DCL version, the revision of the base library.
Definition: dco.h:59
Windriver version, the low level driver by JUNGO.
Definition: dco.h:61

§ START_MODE

Camera start mode

Enumerator
COOLER_IS_OFF 

When the camera start the cooler initialized and setted to off.

COOLER_IS_ON 

When the camera start the cooler status is unchanged.

Definition at line 73 of file dco.h.

73  {
76  };
When the camera start the cooler status is unchanged.
Definition: dco.h:75
When the camera start the cooler initialized and setted to off.
Definition: dco.h:74

§ STATUS

Status of operations

Enumerator
READY 

Camera is ready.

EXPOSURE 

Exposure in progress.

DOWNLOADING 

Downloading in progress.

FILTERMOVING 

Filter wheel positioning in progress.

Definition at line 65 of file dco.h.

65  {
66  READY,
67  EXPOSURE,
68  DOWNLOADING,
70  };
Filter wheel positioning in progress.
Definition: dco.h:69
Camera is ready.
Definition: dco.h:66
Exposure in progress.
Definition: dco.h:67
Downloading in progress.
Definition: dco.h:68

Constructor & Destructor Documentation

§ CameraObject() [1/2]

CameraObject::CameraObject ( void  )

Create the camera object.

§ CameraObject() [2/2]

CameraObject::CameraObject ( const char *  CameraConfigFile,
START_MODE  StartMode = COOLER_IS_OFF 
)

Default destructor, close the opened camera.

Create the camera object and initialize the camera.

Parameters
CameraConfigFileName and path of the camera configuration file ("camera.cfg").
StartModeSelect in which mode the cooler of the camera will be initialized see START_MODE.

§ ~CameraObject()

CameraObject::~CameraObject ( )

Member Function Documentation

§ Address()

U32 CameraObject::Address ( )

Return the 32 bit physical address of the selected FDL-PCI.

Returns
32 bit physical address

§ Binning() [1/2]

void CameraObject::Binning ( int  Hor = 1,
int  Ver = 1 
)

Set the horizontal and vertical binning value.

Parameters
HorHorizontal binning value. Value accepted are in the range 1 to n
VerVertical binning value. Value accepted are in the range 1 to n

§ Binning() [2/2]

void CameraObject::Binning ( int *  Hor,
int *  Ver 
)

Return the current horizontal and vertical binning value.

Parameters
HorHorizontal binning value.
VerVertical binning value.

§ BitDecimation() [1/2]

int CameraObject::BitDecimation ( )

§ BitDecimation() [2/2]

void CameraObject::BitDecimation ( int  val)

§ CameraName()

const char* CameraObject::CameraName ( )

Return a string with the camera name.

§ CcdName()

const char* CameraObject::CcdName ( )

Return a string with the CCD name.

§ CCDSize()

void CameraObject::CCDSize ( int &  XDim,
int &  YDim 
)

§ Close()

void CameraObject::Close ( )

Close the selected camera.

§ Cooler() [1/2]

bool CameraObject::Cooler ( )

Return true if the cooler is active

§ Cooler() [2/2]

void CameraObject::Cooler ( int  enable)

§ Countdown()

double CameraObject::Countdown ( )

Return the exposure countdown value.

Returns
The exposure countdown value

§ Downloading()

int CameraObject::Downloading ( )

Return the per cent value of the current downloading.

Returns
The per cent value (0 to 100).

§ ErrorCode()

int CameraObject::ErrorCode ( )

Retrieve the error code of the last performed operation.

Returns
The error code.

§ ErrorMessage()

const char* CameraObject::ErrorMessage ( int  Code)

Convert an error code into a string message.

Parameters
CodeError code identifier.
Returns
Error message.

§ FanSpeed()

double CameraObject::FanSpeed ( )

§ Fast() [1/2]

bool CameraObject::Fast ( )

Return the status of the fast mode.

Returns
The status of the fast operation mode. If true camera operation it is in fast mode.

§ Fast() [2/2]

void CameraObject::Fast ( bool  Mode)

Set the operation mode of the camera.

Parameters
ModeIf true you disable background operation for the temperature control, but you can retrieve images with more efficiency.

§ Filter() [1/5]

bool CameraObject::Filter ( int  Speed,
int  Torque,
int  Offset 
)

Setup the filter wheel parameters

Parameters
Speedof the the filter positioning, accept values in the range 0 - 39.
Torqueof the filter holding when positioned, accept values in the range 0 - 3.
Offsetof the filter, accept values in the range +/- 10.
Returns
true if all parameters are in the expected range.

§ Filter() [2/5]

void CameraObject::Filter ( int *  Speed,
int *  Torque,
int *  Offset 
)

Retrieve the current filter wheel settings

Parameters
Speedof the the filter positioning.
Torqueof the filter holding when positioned.
Offsetof the filter.

§ Filter() [3/5]

bool CameraObject::Filter ( int  Flt)

Select a filter of the wheel

Parameters
Fltfilter to be selected into the range 1 to 8
Returns
true if the parameter Flt is in the range 1 to 8.

§ Filter() [4/5]

void CameraObject::Filter ( bool  Calib)

Calibrate the filter the filter wheel and select the filter 1.

Parameters
CalibIf true calibrate the filter wheel.

§ Filter() [5/5]

int CameraObject::Filter ( )

Return the current selected filter.

§ Gain() [1/4]

bool CameraObject::Gain ( int  CCDgain)

Select one of four of the available CCD gain.

Parameters
CCDgainSelect the gain, range accepted 0 to 3.

§ Gain() [2/4]

int CameraObject::Gain ( )

Return the current preset gain.

Returns
0 to 3

§ Gain() [3/4]

bool CameraObject::Gain ( int  UGain,
int  Offset,
int  Range 
)

Set an user gain values. Not all camera models accept this setting.

Parameters
UGainset the gain value into the range 0 to 63.
Offsetset the bias offset into the range +/- 256.
Rangeselect the A/D converter range input, values accepted are 0 or 1.
Returns
true if all parameters are into the accepted range.

§ Gain() [4/4]

void CameraObject::Gain ( int *  UGain,
int *  Offset,
int *  Range 
)

Retrieve all parameters of the current user gain.

Parameters
UGainthe gain (range 0 to 63).
Offsetthe bias offset (range +/- 256).
RangeA/D converter range input (0|1).

§ GainValue()

double CameraObject::GainValue ( bool  preset = false,
int  idx = 0,
double *  mVoffset = 0 
)

Return the gain value as e/ADU

§ Id()

int CameraObject::Id ( )

Return the camera identifier.

§ Image()

bool CameraObject::Image ( bool  Light,
double  Exposure,
U16 mat 
)

Take an image from the camera.

Parameters
LightIf false take a dark image else take an exposed image.
ExposureExposure time in seconds.
matMemory buffer where the image is stored.
Returns
Return true if the parameters Exposure and mat are valid
See also
Status, ErrorMessage

§ ImageSize() [1/2]

void CameraObject::ImageSize ( int &  XDim,
int &  YDim 
)

Return the image dimension of the used CCD

Parameters
XDimReturn the number of the horizontal pixel.
YDimReturn the number of the vertical pixel.

§ ImageSize() [2/2]

U32 CameraObject::ImageSize ( )

Return the number of the pixel of the camera

Returns
Number of the camera pixel.

§ IsFilterWheel()

bool CameraObject::IsFilterWheel ( )

Return true if the filter wheel is present.

§ Load()

bool CameraObject::Load ( const char *  CameraConfigFile)

§ Open()

bool CameraObject::Open ( const char *  CameraConfigFile,
START_MODE  StartMode = COOLER_IS_OFF,
int  camAdd = -1,
int  subAdd = -1 
)

Initialize the camera.

Parameters
CameraConfigFileName and path of the camera configuration file ("camera.cfg").
StartModeSelect in which mode the cooler of the camera will be initialized see START_MODE.
Returns
true on success, false if failed.
See also
ErrorCode, ErrorMessage

§ PixelSize()

void CameraObject::PixelSize ( double &  XDim,
double &  YDim 
)

Return the dimension (um) of the pixel of the used CCD according to the binning value.

Parameters
XDimReturn the horizontal dimension (um) of the pixel.
YDimReturn the vertical dimension (um) of the pixel.

§ Plug()

int CameraObject::Plug ( int  parCnt,
int *  param 
)

§ Power() [1/2]

bool CameraObject::Power ( double  Pow)

Set a new value of the cooler power. Normally this value is handled by the temperature procedure. With this method user can force cooler activity.

Parameters
PowThe cooler power, the accepted range is: 0.0 to 100.0
Returns
true if the parameter Pow is in the range 0.0 to 100.0

§ Power() [2/2]

double CameraObject::Power ( )

Return the current cooler power value

Returns
The cooler power.

§ Properties()

int CameraObject::Properties ( int  selector)

Return some camera properties.

See also
PROPERTIES

§ Reentrant()

void CameraObject::Reentrant ( bool  ena)
inline

Definition at line 394 of file dco.h.

394 { Reent = ena; }
bool Reent
Definition: dco.h:402

§ ROI() [1/4]

void CameraObject::ROI ( int  XStart,
int  YStart,
int  XWidth,
int  YHeight 
)

Set and enable the Region Of Interest of the acquired image.

Parameters
XStartHorizontal (top left) origin of the ROI.
YStartVertical (top left) origin of the ROI.
XWidthHorizontal width of the ROI.
YHeightVertical height of the ROI.

§ ROI() [2/4]

void CameraObject::ROI ( int *  XStart,
int *  YStart,
int *  XWidth,
int *  YHeight 
)

Return the currently set ROI.

Parameters
XStartHorizontal (top left) origin of the ROI.
YStartVertical (top left) origin of the ROI.
XWidthHorizontal width of the ROI.
YHeightVertical height of the ROI.

§ ROI() [3/4]

void CameraObject::ROI ( bool  roi)

Enable/Disable the ROI.

Parameters
roiIf true enable the ROI, else disable it.

§ ROI() [4/4]

bool CameraObject::ROI ( )

§ Sequence()

bool CameraObject::Sequence ( bool  Light,
double  Exposure,
int  NumOfFrames,
U16 mat[] 
)

Take a sequence of images.

Parameters
LightIf false take a dark image else take an exposed image.
ExposureExposure time in seconds.
NumOfFramesNumber of images to be take.
matList of memory array.
Returns
Return true if the parameters Exposure, mat and NumOfFrames are valid.
See also
Status, ErrorMessage

§ SequenceCount()

int CameraObject::SequenceCount ( )

§ Serial()

U32 CameraObject::Serial ( )

Retrieve the serial number of the selected camera.

Returns
32 bit serial number.

§ SetFanSpeed()

void CameraObject::SetFanSpeed ( double  speed)

§ Status()

int CameraObject::Status ( )

Return the status of the camera.

Returns
The status of the camera operation, see STATUS.

§ Stop()

void CameraObject::Stop ( )

Stop the current exposure countdown and download the image.

§ SubAdd() [1/2]

void CameraObject::SubAdd ( int  Camera)

Select a specified camera onto specified Port. This method is used into camera multiplexed configuration.

Parameters
CameraThe camera to be selected on the multiplexer, range 0 to 3.

§ SubAdd() [2/2]

int CameraObject::SubAdd ( )

Return selected camera onto the multiplexer.

Returns
0 to 3

§ TaskSet() [1/2]

int CameraObject::TaskSet ( void  )
protected

§ TaskSet() [2/2]

void CameraObject::TaskSet ( int  Set)
protected

§ Temperature()

double CameraObject::Temperature ( )

Return the current CCD temperature (Celsius).

§ TemperatureSet() [1/2]

void CameraObject::TemperatureSet ( double  Celsius)

Set the CCD operating temperature. This command automatically control the cooler power.

Parameters
CelsiusThe target CCD operating temperature.

§ TemperatureSet() [2/2]

double CameraObject::TemperatureSet ( )

Return The target CCD operating temperature.

§ Trigger() [1/2]

bool CameraObject::Trigger ( )

Return the trigger status

Returns
Return true if the trigger is active.

§ Trigger() [2/2]

void CameraObject::Trigger ( bool  Mode)

Set the camera trigger (TTL signal onto the user port.

Parameters
ModeIf true enable the trigger to synchronizes the image acquisition, methods Image and Sequence are affected.

§ UsedPort()

int CameraObject::UsedPort ( )
inline

Definition at line 393 of file dco.h.

References Port.

393 { return Port; }
int Port
Definition: dco.h:401

§ Ver()

int CameraObject::Ver ( REVISION  Who = LIBRARY,
char *  Version = 0 
)

Retrieve in binary and string mode the revision of used library and hardware.

Parameters
WhoLibrary identifier REVISION
VersionOutput of the string.
Returns
Number of version.

Field Documentation

§ Port

int CameraObject::Port
private

Definition at line 401 of file dco.h.

§ Reent

bool CameraObject::Reent
private

Definition at line 402 of file dco.h.


The documentation for this class was generated from the following file:
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:47:09 for DAS - Rel. 3.1.6 - 18/09/2017.