LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::leutronFrameGrabber Class Reference

Interface to all Leutron framegrabbers in the system. More...

#include <ltiLeutronFrameGrabber.h>

Inheritance diagram for lti::leutronFrameGrabber:
Inheritance graph
[legend]
Collaboration diagram for lti::leutronFrameGrabber:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class leutronFrameGrabber More...

Public Types

enum  eOptocouplerType

Public Member Functions

 leutronFrameGrabber ()
 leutronFrameGrabber (const parameters &par)
 leutronFrameGrabber (const leutronFrameGrabber &other)
virtual ~leutronFrameGrabber ()
virtual const char * getTypeName () const
virtual bool apply (channel8 &srcdest)
virtual bool apply (image &srcdest)
virtual bool apply (channel8 &band1, channel8 &band2, channel8 &band3)
bool setOptocoupler (eOptocouplerType theOpto)
bool setOptocoupler (const std::vector< eOptocouplerType > &theOptos)
leutronFrameGrabbercopy (const leutronFrameGrabber &other)
leutronFrameGrabberoperator= (const leutronFrameGrabber &other)
virtual functorclone () const
const
leutronFrameGrabber::parameters
getParameters () const
bool setParameters (const leutronFrameGrabber::parameters &theParams)
virtual bool init ()
virtual bool setCamera (int cameraIndex)
virtual bool setTarget (int targetIndex)
virtual int getNumberOfConnectedCameras ()

Protected Member Functions

leutronFrameGrabber::parametersgetWritableParameters ()
virtual bool checkParameters (const leutronFrameGrabber::parameters &theParams)
virtual bool startAquisition () const
virtual bool stopAquisition () const
virtual bool detectCameras ()
virtual bool activateCameras ()
virtual bool setDsyErrorInStatusString (STATUS &status, const char *error)
virtual bool initRoi (LvROI &roi)

Detailed Description

Interface to all Leutron framegrabbers in the system.

If more than one framegrabber is installed, they will be considered all. If framegrabber specific settings like monochrome VS. color or the number targets on the boards vary, the minimal common set is supported. In particular if a monochrome framegrabber is installed together with color framegrabbers all images acquired will be monochrome.

This implementation is rather slow because the camera is frozen while grabbing and woke up afterwards, which takes about 15 ms. For a faster access use the leutronMultiPlexFrameGrabber, which is not public yet.

For some strange reason the hardware path via the high performance scaler (HPS) is faster than via the binary ratio scaler (BRS).

This class is not thread safe. If used as a singleton, thread safety should be added. It also should be tested that all initialization, camera connection and camera activation methods are only called once.

CAVEATS: 1) This class is only tested with a PicPortColor framegrabber.

BUGS: 1) If two targets are enabled only the BRS path produces a useful image.


Member Enumeration Documentation

the optocouplers that can be set


Constructor & Destructor Documentation

lti::leutronFrameGrabber::leutronFrameGrabber (  ) 

default constructor

lti::leutronFrameGrabber::leutronFrameGrabber ( const parameters par  ) 

Construct a functor using the given parameters.

Parameters:
par the parameters to be used
lti::leutronFrameGrabber::leutronFrameGrabber ( const leutronFrameGrabber other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::leutronFrameGrabber::~leutronFrameGrabber (  )  [virtual]

destructor


Member Function Documentation

virtual bool lti::leutronFrameGrabber::activateCameras (  )  [protected, virtual]

Activate the current camera.

Returns:
true on success or false otherwise
virtual bool lti::leutronFrameGrabber::apply ( channel8 band1,
channel8 band2,
channel8 band3 
) [virtual]

Grabs an image split in 3 separate channels.

This useful if the application distinguishes between chromacity (Y) and color information (U,V).

Parameters:
band1 where the grabbed Y band will be left
band2 where the grabbed Y band will be left
band3 where the grabbed Y band will be left
Returns:
true if apply successful or false otherwise.
virtual bool lti::leutronFrameGrabber::apply ( image srcdest  )  [virtual]

Grabs an image from the current camera.

operates on the given parameter.

Parameters:
srcdest where the grabbed image will be left
Returns:
true if apply successful or false otherwise.

Implements lti::frameGrabber.

virtual bool lti::leutronFrameGrabber::apply ( channel8 srcdest  )  [virtual]

Grabs a grey image.

operates on the given parameter.

Parameters:
srcdest where the grabbed channel8 will be left
Returns:
true if apply successful or false otherwise.

Implements lti::frameGrabber.

virtual bool lti::leutronFrameGrabber::checkParameters ( const leutronFrameGrabber::parameters theParams  )  [protected, virtual]

check parameters

Parameters:
theParams the parameters to be checked
Returns:
true on success or false otherwise
virtual functor* lti::leutronFrameGrabber::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

leutronFrameGrabber& lti::leutronFrameGrabber::copy ( const leutronFrameGrabber other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::frameGrabber.

virtual bool lti::leutronFrameGrabber::detectCameras (  )  [protected, virtual]

Detect and connect all cameras.

Returns:
true on success or false otherwise
virtual int lti::leutronFrameGrabber::getNumberOfConnectedCameras (  )  [virtual]

Get the number of connected cameras.

Returns:
the number of connected cameras
const leutronFrameGrabber::parameters& lti::leutronFrameGrabber::getParameters (  )  const

returns used parameters

Reimplemented from lti::frameGrabber.

virtual const char* lti::leutronFrameGrabber::getTypeName (  )  const [virtual]

returns the name of this type ("leutronFrameGrabber")

Reimplemented from lti::frameGrabber.

leutronFrameGrabber::parameters& lti::leutronFrameGrabber::getWritableParameters (  )  [protected]

returns used parameters

virtual bool lti::leutronFrameGrabber::init (  )  [virtual]

Initializes and opens the framegrabber.

It is not necessary to call this method.

Returns:
true on success or false otherwise

Implements lti::frameGrabber.

virtual bool lti::leutronFrameGrabber::initRoi ( LvROI &  roi  )  [protected, virtual]

Initialize the roi from where the data is copied into a lti object.

Parameters:
roi the leutron region of interest object
Returns:
true on success or false otherwise
leutronFrameGrabber& lti::leutronFrameGrabber::operator= ( const leutronFrameGrabber other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

virtual bool lti::leutronFrameGrabber::setCamera ( int  cameraIndex  )  [virtual]

Switches the current camera.

On switch, the camera has to be activated which is time consuming.

Parameters:
cameraIndex the index of the camera from which will be grabbed
Returns:
true on success or false otherwise
virtual bool lti::leutronFrameGrabber::setDsyErrorInStatusString ( STATUS &  status,
const char *  error 
) [protected, virtual]

Get the leutron error and write it into the status string.

Parameters:
status the leutron status
error the prefix of the concatenated status string
Returns:
true on success or false otherwise
bool lti::leutronFrameGrabber::setOptocoupler ( const std::vector< eOptocouplerType > &  theOptos  ) 

Sets or deactivates the optocouplers of the grabber that has been accessed last.

ToDo: think of method where you can tell the grabber on which the optocouplers shall be set.

Parameters:
theOptos the optocouplers to be set
Returns:
true on success or false otherwise.
bool lti::leutronFrameGrabber::setOptocoupler ( eOptocouplerType  theOpto  ) 

Sets one optocoupler or deactivates all optocouplers of the grabber that has been accessed last.

ToDo: think of method where you can tell the grabber on which the optocoupler shall be set.

Parameters:
theOpto the optocoupler to be set
Returns:
true on success or false otherwise.
bool lti::leutronFrameGrabber::setParameters ( const leutronFrameGrabber::parameters theParams  ) 

Set the paramters.

Adjusts non supported values internally.

Parameters:
theParams the parameters to be set
Returns:
true if the parameters could be set and processed by the hardware or false otherwise
virtual bool lti::leutronFrameGrabber::setTarget ( int  targetIndex  )  [virtual]

Switches the target, from which is grabbed.

If the target buffer is not already connected to the camera(s) this is time consuming. This method affects the parameters targetIndex and target[].

Parameters:
targetIndex the index of the target will be grabbed
Returns:
true on success or false otherwise
virtual bool lti::leutronFrameGrabber::startAquisition (  )  const [protected, virtual]

put a camera in live mode and start the acquisition

Returns:
true on success or false otherwise
virtual bool lti::leutronFrameGrabber::stopAquisition (  )  const [protected, virtual]

put a camera in freeze mode and stop the acquisition

Returns:
true on success or false otherwise

The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:03 2010 for LTI-Lib by Doxygen 1.6.1