Files

227 lines
9.7 KiB
C++
Raw Permalink Normal View History

2024-05-18 23:53:26 +08:00
/***********************************************************
* File generated by the HALCON-Compiler hcomp version 20.11
* Usage: Interface to C++
*
* Software by: MVTec Software GmbH, www.mvtec.com
***********************************************************/
#ifndef HCPP_HFRAMEGRABBER
#define HCPP_HFRAMEGRABBER
namespace HalconCpp
{
// Represents an instance of an image acquisition device.
class LIntExport HFramegrabber : public HHandle
{
public:
// Create an uninitialized instance
HFramegrabber():HHandle() {}
// Copy constructor
HFramegrabber(const HFramegrabber& source) : HHandle(source) {}
// Copy constructor
HFramegrabber(const HHandle& handle);
// Create HFramegrabber from handle, taking ownership
explicit HFramegrabber(Hlong handle);
bool operator==(const HHandle& obj) const
{
return HHandleBase::operator==(obj);
}
bool operator!=(const HHandle& obj) const
{
return HHandleBase::operator!=(obj);
}
protected:
// Verify matching semantic type ('framegrabber')!
virtual void AssertType(Hphandle handle) const;
public:
/*****************************************************************************
* Operator-based class constructors
*****************************************************************************/
// open_framegrabber: Open and configure an image acquisition device.
explicit HFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HString& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn);
// open_framegrabber: Open and configure an image acquisition device.
explicit HFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, Hlong BitsPerChannel, const HString& ColorSpace, double Generic, const HString& ExternalTrigger, const HString& CameraType, const HString& Device, Hlong Port, Hlong LineIn);
// open_framegrabber: Open and configure an image acquisition device.
explicit HFramegrabber(const char* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const char* Field, Hlong BitsPerChannel, const char* ColorSpace, double Generic, const char* ExternalTrigger, const char* CameraType, const char* Device, Hlong Port, Hlong LineIn);
#ifdef _WIN32
// open_framegrabber: Open and configure an image acquisition device.
explicit HFramegrabber(const wchar_t* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const wchar_t* Field, Hlong BitsPerChannel, const wchar_t* ColorSpace, double Generic, const wchar_t* ExternalTrigger, const wchar_t* CameraType, const wchar_t* Device, Hlong Port, Hlong LineIn);
#endif
/***************************************************************************
* Operators *
***************************************************************************/
// Query specific parameters of an image acquisition device.
HTuple GetFramegrabberParam(const HTuple& Param) const;
// Query specific parameters of an image acquisition device.
HTuple GetFramegrabberParam(const HString& Param) const;
// Query specific parameters of an image acquisition device.
HTuple GetFramegrabberParam(const char* Param) const;
#ifdef _WIN32
// Query specific parameters of an image acquisition device.
HTuple GetFramegrabberParam(const wchar_t* Param) const;
#endif
// Set specific parameters of an image acquisition device.
void SetFramegrabberParam(const HTuple& Param, const HTuple& Value) const;
// Set specific parameters of an image acquisition device.
void SetFramegrabberParam(const HString& Param, const HString& Value) const;
// Set specific parameters of an image acquisition device.
void SetFramegrabberParam(const char* Param, const char* Value) const;
#ifdef _WIN32
// Set specific parameters of an image acquisition device.
void SetFramegrabberParam(const wchar_t* Param, const wchar_t* Value) const;
#endif
// Query callback function of an image acquisition device.
void* GetFramegrabberCallback(const HString& CallbackType, void** UserContext) const;
// Query callback function of an image acquisition device.
void* GetFramegrabberCallback(const char* CallbackType, void** UserContext) const;
#ifdef _WIN32
// Query callback function of an image acquisition device.
void* GetFramegrabberCallback(const wchar_t* CallbackType, void** UserContext) const;
#endif
// Register a callback function for an image acquisition device.
void SetFramegrabberCallback(const HString& CallbackType, void* CallbackFunction, void* UserContext) const;
// Register a callback function for an image acquisition device.
void SetFramegrabberCallback(const char* CallbackType, void* CallbackFunction, void* UserContext) const;
#ifdef _WIN32
// Register a callback function for an image acquisition device.
void SetFramegrabberCallback(const wchar_t* CallbackType, void* CallbackFunction, void* UserContext) const;
#endif
// Asynchronous grab of images and preprocessed image data from the specified image acquisition device.
HImage GrabDataAsync(HRegion* Region, HXLDCont* Contours, double MaxDelay, HTuple* Data) const;
// Asynchronous grab of images and preprocessed image data from the specified image acquisition device.
HImage GrabDataAsync(HRegion* Region, HXLDCont* Contours, double MaxDelay, HString* Data) const;
// Synchronous grab of images and preprocessed image data from the specified image acquisition device.
HImage GrabData(HRegion* Region, HXLDCont* Contours, HTuple* Data) const;
// Synchronous grab of images and preprocessed image data from the specified image acquisition device.
HImage GrabData(HRegion* Region, HXLDCont* Contours, HString* Data) const;
// Asynchronous grab of an image from the specified image acquisition device.
HImage GrabImageAsync(double MaxDelay) const;
// Start an asynchronous grab from the specified image acquisition device.
void GrabImageStart(double MaxDelay) const;
// Synchronous grab of an image from the specified image acquisition device.
HImage GrabImage() const;
// Close specified image acquisition device.
void CloseFramegrabber() const;
// Open and configure an image acquisition device.
void OpenFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HString& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn);
// Open and configure an image acquisition device.
void OpenFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, Hlong BitsPerChannel, const HString& ColorSpace, double Generic, const HString& ExternalTrigger, const HString& CameraType, const HString& Device, Hlong Port, Hlong LineIn);
// Open and configure an image acquisition device.
void OpenFramegrabber(const char* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const char* Field, Hlong BitsPerChannel, const char* ColorSpace, double Generic, const char* ExternalTrigger, const char* CameraType, const char* Device, Hlong Port, Hlong LineIn);
#ifdef _WIN32
// Open and configure an image acquisition device.
void OpenFramegrabber(const wchar_t* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const wchar_t* Field, Hlong BitsPerChannel, const wchar_t* ColorSpace, double Generic, const wchar_t* ExternalTrigger, const wchar_t* CameraType, const wchar_t* Device, Hlong Port, Hlong LineIn);
#endif
// Query look-up table of the image acquisition device.
void GetFramegrabberLut(HTuple* ImageRed, HTuple* ImageGreen, HTuple* ImageBlue) const;
// Set look-up table of the image acquisition device.
void SetFramegrabberLut(const HTuple& ImageRed, const HTuple& ImageGreen, const HTuple& ImageBlue) const;
};
// forward declarations and types for internal array implementation
template<class T> class HSmartPtr;
template<class T> class HHandleBaseArrayRef;
typedef HHandleBaseArrayRef<HFramegrabber> HFramegrabberArrayRef;
typedef HSmartPtr< HFramegrabberArrayRef > HFramegrabberArrayPtr;
// Represents multiple tool instances
class LIntExport HFramegrabberArray : public HHandleBaseArray
{
public:
// Create empty array
HFramegrabberArray();
// Create array from native array of tool instances
HFramegrabberArray(HFramegrabber* classes, Hlong length);
// Copy constructor
HFramegrabberArray(const HFramegrabberArray &tool_array);
// Destructor
virtual ~HFramegrabberArray();
// Assignment operator
HFramegrabberArray &operator=(const HFramegrabberArray &tool_array);
// Clears array and all tool instances
virtual void Clear();
// Get array of native tool instances
const HFramegrabber* Tools() const;
// Get number of tools
virtual Hlong Length() const;
// Create tool array from tuple of handles
virtual void SetFromTuple(const HTuple& handles);
// Get tuple of handles for tool array
virtual HTuple ConvertToTuple() const;
protected:
// Smart pointer to internal data container
HFramegrabberArrayPtr *mArrayPtr;
};
}
#endif