mvIMPACT Acquire SDK C++
CameraDescriptionManager Class Reference

Grants access to camera description objects(Device specific interface layout only). More...

Public Member Functions

CameraDescriptionCameraLinkcameraDescriptionCameraLink (const std::string &name) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionCameraLink object specifying the camera description with the given name in the camera description managers internal list. More...
 
CameraDescriptionCameraLinkcameraDescriptionCameraLink (unsigned int index) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionCameraLink object specifying the camera description found at the given index in the camera description managers internal list. More...
 
CameraDescriptionDigitalcameraDescriptionDigital (const std::string &name) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionDigital object specifying the camera description with the given name in the camera description managers internal list. More...
 
CameraDescriptionDigitalcameraDescriptionDigital (unsigned int index) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionDigital object specifying the camera description found at the given index in the camera description managers internal list. More...
 
 CameraDescriptionManager (const CameraDescriptionManager &src)
 Constructs a new mvIMPACT::acquire::CameraDescriptionManager from an existing one. More...
 
 CameraDescriptionManager (Device *pDev)
 Constructs a new mvIMPACT::acquire::CameraDescriptionManager object. More...
 
CameraDescriptionNonStandardcameraDescriptionNonStandard (const std::string &name) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionNonStandard object specifying the camera description with the given name in the camera description managers internal list. More...
 
CameraDescriptionNonStandardcameraDescriptionNonStandard (unsigned int index) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionNonStandard object specifying the camera description found at the given index in the camera description managers internal list. More...
 
CameraDescriptionSDIcameraDescriptionSDI (const std::string &name) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionSDI object specifying the camera description with the given name in the camera description managers internal list. More...
 
CameraDescriptionSDIcameraDescriptionSDI (unsigned int index) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionSDI object specifying the camera description found at the given index in the camera description managers internal list. More...
 
CameraDescriptionStandardcameraDescriptionStandard (const std::string &name) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionStandard object specifying the camera description with the given name in the camera description managers internal list. More...
 
CameraDescriptionStandardcameraDescriptionStandard (unsigned int index) const
 Returns a pointer to a mvIMPACT::acquire::CameraDescriptionStandard object specifying the camera description found at the given index in the camera description managers internal list. More...
 
unsigned int getCLCameraDescriptionCount (void) const
 Returns the number of CameraLink® camera descriptions currently available for the device that constructed this instance of the class. More...
 
unsigned int getDigitalCameraDescriptionCount (void) const
 Returns the number of non-standard digital camera descriptions currently available for the device that constructed this instance of the class. More...
 
unsigned int getNonStandardCameraDescriptionCount (void) const
 Returns the number of non-standard camera descriptions currently available for the device that constructed this instance of the class. More...
 
unsigned int getSDICameraDescriptionCount (void) const
 Returns the number of SDI camera descriptions currently available for the device that constructed this instance of the class. More...
 
unsigned int getStandardCameraDescriptionCount (void) const
 Returns the number of standard camera descriptions currently available for the device that constructed this instance of the class. More...
 
unsigned int getTotalCameraDescriptionCount (void) const
 Returns the total number camera descriptions currently available for the device that constructed this instance of the class. More...
 
CameraDescriptionManageroperator= (const CameraDescriptionManager &rhs)
 Allows assignments of mvIMPACT::acquire::CameraDescriptionManager objects. More...
 
 ~CameraDescriptionManager ()
 Class destructor. More...
 

Detailed Description

Grants access to camera description objects(Device specific interface layout only).

This class provides access to the various camera description objects. Each device recognizes a different set of camera descriptions. E.g. a digital frame grabber will not be able to work with analogue cameras. Each camera description class will be derived from mvIMPACT::acquire::CameraDescriptionBase.

Note
Please note that instances of this class will ONLY list camera descriptions that have once been selected by the property mvIMPACT::acquire::CameraSettingsFrameGrabber::type at runtime. This is to save memory. A complete list of camera descriptions available for the current device therefore can only be queried by reading the the translation dictionary of the property mvIMPACT::acquire::CameraSettingsFrameGrabber::type.
#include <algorithm>
#include <iostream>
using namespace std;
using namespace mvIMPACT::acquire;
//-----------------------------------------------------------------------------
template<class T>
class DisplayDictEntry : public unary_function<pair<string, T>, void>
//-----------------------------------------------------------------------------
{
public:
void operator()( const pair<string, T>& data ) const
{
cout << " [" << data.second << "]: " << data.first << endl;
}
};
//-----------------------------------------------------------------------------
// lists all available camera descriptions for a certain device
int main( int argc, char* argv[] )
//-----------------------------------------------------------------------------
{
DeviceManager devMgr;
Device* pDev = devMgr[0];
if( !pDev )
{
cout << "No device found" << endl;
return 0;
}
// display the name of every camera description available for this device.
// this might be less than the number of camera descriptions available on the system as e.g.
// an analog frame grabber can't use descriptions for digital cameras
CameraSettingsFrameGrabber cs( pDev );
std::string<std::string, int> vAvailableDescriptions;
cs.type.getTranslationDict( vAvailableDescriptions );
cout << endl << "Available camera descriptions: " << vAvailableDescriptions.size() << endl
<< "----------------------------------" << endl;
for_each( vAvailableDescriptions.begin(), vAvailableDescriptions.end(), DisplayDictEntry<int>() )
// list all descriptions that already have been selected at least once
CameraDescriptionManager camMgr( pDev );
unsigned int camCnt = camMgr.getCLCameraDescriptionCount();
cout << "Available CL descriptions: " << camCnt << endl;
for( unsigned int a=0; a<camCnt; a++ )
{
cout << " " << camMgr.cameraDescriptionCameraLink( a )->name.read() << endl;
}
camCnt = camMgr.getStandardCameraDescriptionCount();
cout << "Available Std descriptions: " << camCnt << endl;
for( unsigned int b=0; b<camCnt; b++ )
{
cout << " " << camMgr.cameraDescriptionStandard( b )->name.read() << endl;
}
camCnt = camMgr.getNonStandardCameraDescriptionCount();
cout << "Available NonStd descriptions: " << camCnt << endl;
for( unsigned int c=0; c<camCnt; c++ )
{
cout << " " << camMgr.cameraDescriptionNonStandard( c )->name.read() << endl;
}
return 0;
}
unsigned int getCLCameraDescriptionCount(void) const
Returns the number of CameraLink® camera descriptions currently available for the device that constru...
Definition: mvIMPACT_acquire.h:21787
CameraDescriptionManager(Device *pDev)
Constructs a new mvIMPACT::acquire::CameraDescriptionManager object.
Definition: mvIMPACT_acquire.h:21744
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Note
This class will only be available for frame grabber devices. For other devices the class constructor will raise an exception.
This class will only be available if mvIMPACT::acquire::Device::interfaceLayout is set to mvIMPACT::acquire::dilDeviceSpecific before the device is opened.

Constructor & Destructor Documentation

◆ CameraDescriptionManager() [1/2]

CameraDescriptionManager ( Device pDev)
inlineexplicit

Constructs a new mvIMPACT::acquire::CameraDescriptionManager object.

Parameters
[in]pDevA pointer to a mvIMPACT::acquire::Device object obtained from a mvIMPACT::acquire::>DeviceManager object.

◆ CameraDescriptionManager() [2/2]

Constructs a new mvIMPACT::acquire::CameraDescriptionManager from an existing one.

Parameters
srcA constant reference to the mvIMPACT::acquire::CameraDescriptionManager object, this object shall be created from

◆ ~CameraDescriptionManager()

Class destructor.

Member Function Documentation

◆ cameraDescriptionCameraLink() [1/2]

CameraDescriptionCameraLink* cameraDescriptionCameraLink ( const std::string &  name) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionCameraLink object specifying the camera description with the given name in the camera description managers internal list.

Returns
  • a pointer to a mvIMPACT::acquire::CameraDescriptionCameraLink object specifying the camera description with the given name in the camera description managers internal list if a camera description with name is available.
  • an invalid pointer or reference otherwise.
Parameters
[in]nameThe name of the camera description. This can either be the name of the list like e.g. 'CameraLink_Generic' or the value of the property 'name' of this description like e.g. 'Generic'.

◆ cameraDescriptionCameraLink() [2/2]

CameraDescriptionCameraLink* cameraDescriptionCameraLink ( unsigned int  index) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionCameraLink object specifying the camera description found at the given index in the camera description managers internal list.

If the index is either equal or higher than the number of CameraLink® camera descriptions
detected for this device a STL out_of_range exception will be thrown.

Parameters
[in]indexThe index of the camera description to return

◆ cameraDescriptionDigital() [1/2]

CameraDescriptionDigital* cameraDescriptionDigital ( const std::string &  name) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionDigital object specifying the camera description with the given name in the camera description managers internal list.

Returns
  • a pointer to a mvIMPACT::acquire::CameraDescriptionDigital object specifying the camera description with the given name in the camera description managers internal list if a camera description with name is available.
  • an invalid pointer or reference otherwise.
Parameters
[in]nameThe name of the camera description. This can either be the name of the list like e.g. 'Digital_Generic' or the value of the property 'name' of this description like e.g. 'Generic'.

◆ cameraDescriptionDigital() [2/2]

CameraDescriptionDigital* cameraDescriptionDigital ( unsigned int  index) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionDigital object specifying the camera description found at the given index in the camera description managers internal list.

If the index is either equal or higher than the number of non-standard digital camera descriptions
detected for this device a STL out_of_range exception will be thrown.

Parameters
[in]indexThe index of the camera description to return

◆ cameraDescriptionNonStandard() [1/2]

CameraDescriptionNonStandard* cameraDescriptionNonStandard ( const std::string &  name) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionNonStandard object specifying the camera description with the given name in the camera description managers internal list.

Returns
  • a pointer to a mvIMPACT::acquire::CameraDescriptionNonStandard object specifying the camera description with the given name in the camera description managers internal list if a camera description with name is available.
  • an invalid pointer or reference otherwise.
Parameters
[in]nameThe name of the camera description. This can either be the name of the list like e.g. 'NonStandard_Generic' or the value of the property 'name' of this description like e.g. 'Generic'.

◆ cameraDescriptionNonStandard() [2/2]

CameraDescriptionNonStandard* cameraDescriptionNonStandard ( unsigned int  index) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionNonStandard object specifying the camera description found at the given index in the camera description managers internal list.

If the index is either equal or higher than the number of non-standard camera descriptions
detected for this device a STL out_of_range exception will be thrown.

Parameters
[in]indexThe index of the camera description to return

◆ cameraDescriptionSDI() [1/2]

CameraDescriptionSDI* cameraDescriptionSDI ( const std::string &  name) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionSDI object specifying the camera description with the given name in the camera description managers internal list.

Returns
  • a pointer to a mvIMPACT::acquire::CameraDescriptionSDI object specifying the camera description with the given name in the camera description managers internal list if a camera description with name is available.
  • an invalid pointer or reference otherwise.
Parameters
[in]nameThe name of the camera description. This can either be the name of the list like e.g. 'CameraLink_Generic' or the value of the property 'name' of this description like e.g. 'Generic'.

◆ cameraDescriptionSDI() [2/2]

CameraDescriptionSDI* cameraDescriptionSDI ( unsigned int  index) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionSDI object specifying the camera description found at the given index in the camera description managers internal list.

If the index is either equal or higher than the number of SDI camera descriptions
detected for this device a STL out_of_range exception will be thrown.

Parameters
[in]indexThe index of the camera description to return

◆ cameraDescriptionStandard() [1/2]

CameraDescriptionStandard* cameraDescriptionStandard ( const std::string &  name) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionStandard object specifying the camera description with the given name in the camera description managers internal list.

Returns
  • a pointer to a mvIMPACT::acquire::CameraDescriptionStandard object specifying the camera description with the given name in the camera description managers internal list if a camera description with name is available.
  • an invalid pointer or reference otherwise.
Parameters
[in]nameThe name of the camera description. This can either be the name of the list like e.g. 'Standard_Generic' or the value of the property 'name' of this description like e.g. 'Generic'.

◆ cameraDescriptionStandard() [2/2]

CameraDescriptionStandard* cameraDescriptionStandard ( unsigned int  index) const
inline

Returns a pointer to a mvIMPACT::acquire::CameraDescriptionStandard object specifying the camera description found at the given index in the camera description managers internal list.

If the index is either equal or higher than the number of standard camera descriptions
detected for this device a STL out_of_range exception will be thrown.

Parameters
[in]indexThe index of the camera description to return

◆ getCLCameraDescriptionCount()

unsigned int getCLCameraDescriptionCount ( void  ) const
inline

Returns the number of CameraLink® camera descriptions currently available for the device that constructed this instance of the class.

◆ getDigitalCameraDescriptionCount()

unsigned int getDigitalCameraDescriptionCount ( void  ) const
inline

Returns the number of non-standard digital camera descriptions currently available for the device that constructed this instance of the class.

◆ getNonStandardCameraDescriptionCount()

unsigned int getNonStandardCameraDescriptionCount ( void  ) const
inline

Returns the number of non-standard camera descriptions currently available for the device that constructed this instance of the class.

◆ getSDICameraDescriptionCount()

unsigned int getSDICameraDescriptionCount ( void  ) const
inline

Returns the number of SDI camera descriptions currently available for the device that constructed this instance of the class.

◆ getStandardCameraDescriptionCount()

unsigned int getStandardCameraDescriptionCount ( void  ) const
inline

Returns the number of standard camera descriptions currently available for the device that constructed this instance of the class.

◆ getTotalCameraDescriptionCount()

unsigned int getTotalCameraDescriptionCount ( void  ) const
inline

Returns the total number camera descriptions currently available for the device that constructed this instance of the class.

Since
2.1.4

◆ operator=()

CameraDescriptionManager& operator= ( const CameraDescriptionManager rhs)
inline

Allows assignments of mvIMPACT::acquire::CameraDescriptionManager objects.


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