|
MMDevice 70
|
#include <MMDevice.h>
Public Member Functions | |
| virtual DeviceType | GetType () const |
| virtual int | SnapImage ()=0 |
| Perform exposure and grab a single image. | |
| virtual const unsigned char * | GetImageBuffer ()=0 |
| Return pixel data. | |
| virtual const unsigned char * | GetImageBuffer (unsigned channelNr)=0 |
| Return pixel data for cameras with multiple channels. | |
| virtual const unsigned int * | GetImageBufferAsRGB32 ()=0 |
| Return pixel data with interleaved RGB pixels in 32 bpp format. | |
| virtual unsigned | GetNumberOfComponents () const =0 |
| Return the number of components in this image. | |
| virtual int | GetComponentName (unsigned component, char *name)=0 |
| Return the name for each component. | |
| virtual int unsigned | GetNumberOfChannels () const =0 |
| Return the number of simultaneous channels that camera is capable of. | |
| virtual int | GetChannelName (unsigned channel, char *name)=0 |
| Return the name for each Channel. | |
| virtual long | GetImageBufferSize () const =0 |
| Return the size in bytes of the image buffer. | |
| virtual unsigned | GetImageWidth () const =0 |
| Return image buffer X-size in pixels. | |
| virtual unsigned | GetImageHeight () const =0 |
| Return image buffer Y-size in pixels. | |
| virtual unsigned | GetImageBytesPerPixel () const =0 |
| Return image buffer pixel depth in bytes. | |
| virtual unsigned | GetBitDepth () const =0 |
| Return the bit depth (dynamic range) of the pixel. | |
| virtual double | GetPixelSizeUm () const =0 |
| Unused and slated for removal. Implemented in DeviceBase.h. | |
| virtual int | GetBinning () const =0 |
| Return the current binning factor. | |
| virtual int | SetBinning (int binSize)=0 |
| Set binning factor. | |
| virtual void | SetExposure (double exp_ms)=0 |
| Set exposure in milliseconds. | |
| virtual double | GetExposure () const =0 |
| Return the current exposure setting in milliseconds. | |
| virtual int | SetROI (unsigned x, unsigned y, unsigned xSize, unsigned ySize)=0 |
| Set the camera Region Of Interest. | |
| virtual int | GetROI (unsigned &x, unsigned &y, unsigned &xSize, unsigned &ySize)=0 |
| Return the actual dimensions of the current ROI. | |
| virtual int | ClearROI ()=0 |
| Reset the Region of Interest to full frame. | |
| virtual bool | SupportsMultiROI ()=0 |
| virtual bool | IsMultiROISet ()=0 |
| virtual int | GetMultiROICount (unsigned &count)=0 |
| virtual int | SetMultiROI (const unsigned *xs, const unsigned *ys, const unsigned *widths, const unsigned *heights, unsigned numROIs)=0 |
| virtual int | GetMultiROI (unsigned *xs, unsigned *ys, unsigned *widths, unsigned *heights, unsigned *length)=0 |
| virtual int | StartSequenceAcquisition (long numImages, double interval_ms, bool stopOnOverflow)=0 |
| Start continuous acquisition. | |
| virtual int | StartSequenceAcquisition (double interval_ms)=0 |
| Start Sequence Acquisition with given interval. | |
| virtual int | StopSequenceAcquisition ()=0 |
| Stop an ongoing sequence acquisition. | |
| virtual int | PrepareSequenceAcqusition ()=0 |
| Set up the camera so that Sequence acquisition can start without delay. | |
| virtual bool | IsCapturing ()=0 |
| Indicate whether sequence acquisition is currently running. | |
| virtual void | GetTags (char *serializedMetadata)=0 |
| Get the metadata tags stored in this device. | |
| virtual void | AddTag (const char *key, const char *deviceLabel, const char *value)=0 |
| Add new tag or modify the value of an existing one. | |
| virtual void | RemoveTag (const char *key)=0 |
| Remove an existing tag from the metadata associated with this device. | |
| virtual int | IsExposureSequenceable (bool &isSequenceable) const =0 |
| Return whether a camera's exposure time can be sequenced. | |
| virtual int | GetExposureSequenceMaxLength (long &nrEvents) const =0 |
| virtual int | StartExposureSequence ()=0 |
| virtual int | StopExposureSequence ()=0 |
| virtual int | ClearExposureSequence ()=0 |
| virtual int | AddToExposureSequence (double exposureTime_ms)=0 |
| virtual int | SendExposureSequence () const =0 |
Public Member Functions inherited from MM::Device | |
| virtual unsigned | GetNumberOfProperties () const =0 |
| virtual int | GetProperty (const char *name, char *value) const =0 |
| virtual int | SetProperty (const char *name, const char *value)=0 |
| virtual bool | HasProperty (const char *name) const =0 |
| virtual bool | GetPropertyName (unsigned idx, char *name) const =0 |
| virtual int | GetPropertyReadOnly (const char *name, bool &readOnly) const =0 |
| virtual int | GetPropertyInitStatus (const char *name, bool &preInit) const =0 |
| virtual int | HasPropertyLimits (const char *name, bool &hasLimits) const =0 |
| virtual int | GetPropertyLowerLimit (const char *name, double &lowLimit) const =0 |
| virtual int | GetPropertyUpperLimit (const char *name, double &hiLimit) const =0 |
| virtual int | GetPropertyType (const char *name, MM::PropertyType &pt) const =0 |
| virtual unsigned | GetNumberOfPropertyValues (const char *propertyName) const =0 |
| virtual bool | GetPropertyValueAt (const char *propertyName, unsigned index, char *value) const =0 |
| virtual int | IsPropertySequenceable (const char *name, bool &isSequenceable) const =0 |
| Check whether the given property can be used with sequences. | |
| virtual int | GetPropertySequenceMaxLength (const char *propertyName, long &nrEvents) const =0 |
| Return the largest sequence that can be stored in the device. | |
| virtual int | StartPropertySequence (const char *propertyName)=0 |
| Start execution of the sequence. | |
| virtual int | StopPropertySequence (const char *propertyName)=0 |
| Stop execution of the sequence. | |
| virtual int | ClearPropertySequence (const char *propertyName)=0 |
| Remove previously added sequence. | |
| virtual int | AddToPropertySequence (const char *propertyName, const char *value)=0 |
| Add one value to the sequence. | |
| virtual int | SendPropertySequence (const char *propertyName)=0 |
| Signal that we are done sending sequence values so that the adapter can send the whole sequence to the device. | |
| virtual bool | GetErrorText (int errorCode, char *errMessage) const =0 |
| virtual bool | Busy ()=0 |
| virtual double | GetDelayMs () const =0 |
| virtual void | SetDelayMs (double delay)=0 |
| virtual bool | UsesDelay ()=0 |
| virtual void | SetLabel (const char *label)=0 |
| virtual void | GetLabel (char *name) const =0 |
| virtual void | SetModuleName (const char *moduleName)=0 |
| virtual void | GetModuleName (char *moduleName) const =0 |
| virtual void | SetDescription (const char *description)=0 |
| virtual void | GetDescription (char *description) const =0 |
| virtual int | Initialize ()=0 |
| virtual int | Shutdown ()=0 |
| Shut down (unload) the device. | |
| virtual void | GetName (char *name) const =0 |
| virtual void | SetCallback (Core *callback)=0 |
| virtual bool | SupportsDeviceDetection (void)=0 |
| virtual MM::DeviceDetectionStatus | DetectDevice (void)=0 |
| virtual void | SetParentID (const char *parentId)=0 |
| virtual void | GetParentID (char *parentID) const =0 |
Static Public Attributes | |
| static const DeviceType | Type = CameraDevice |
Camera API.
|
pure virtual |
Add new tag or modify the value of an existing one.
These will automatically be added to images inserted into the circular buffer. Use this mechanism for tags that do not change often. For metadata that change often, create an instance of metadata yourself and add to one of the versions of the InsertImage function.
Implemented in CCameraBase< U >.
|
pure virtual |
Return the bit depth (dynamic range) of the pixel.
This does not affect the buffer size, it just gives the client application a guideline on how to interpret pixel values. Required by the MM::Camera API.
|
pure virtual |
Return the name for each Channel.
An implementation of this function is provided in DeviceBase.h. It will return an empty string
Implemented in CCameraBase< U >.
|
pure virtual |
Return the name for each component.
Implemented in CCameraBase< U >.
|
pure virtual |
Return pixel data.
Required by the MM::Camera API. GetImageBuffer will be called shortly after SnapImage returns. Use it to wait for camera read-out and transfer of data into memory Return a pointer to a buffer containing the image data The calling program will assume the size of the buffer based on the values obtained from GetImageBufferSize(), which in turn should be consistent with values returned by GetImageWidth(), GetImageHeight(), GetImageBytesPerPixel(), and getNumberOfComponents(). The calling program also assumes that camera never changes the size of the pixel buffer on its own. In other words, the buffer can change only if appropriate properties are set (such as binning, pixel type, etc.) Multi-Channel cameras should return the content of the first channel in this call.
Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet). RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian format (currently most/all? code is compiled for little endian architecture), the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).
Implemented in CCameraBase< U >.
|
pure virtual |
Return pixel data for cameras with multiple channels.
See description for GetImageBuffer() for details. Use this overloaded version for cameras with multiple channels When calling this function for a single channel camera, this function should return the content of the imagebuffer as returned by the function GetImageBuffer(). This behavior is implemented in the DeviceBase. When GetImageBuffer() is called for a multi-channel camera, the camera adapter should return the ImageBuffer for the first channel
| channelNr | Number of the channel for which the image data are requested. |
Implemented in CCameraBase< U >.
|
pure virtual |
Return pixel data with interleaved RGB pixels in 32 bpp format.
Implemented in CCameraBase< U >.
|
pure virtual |
Return the size in bytes of the image buffer.
Required by the MM::Camera API. For multi-channel cameras, return the size of a single channel
|
pure virtual |
Return image buffer pixel depth in bytes.
Required by the MM::Camera API.
Implemented in CCameraBase< U >.
|
pure virtual |
Return image buffer Y-size in pixels.
Required by the MM::Camera API.
Implemented in CCameraBase< U >.
|
pure virtual |
Return image buffer X-size in pixels.
Required by the MM::Camera API.
Implemented in CCameraBase< U >.
|
pure virtual |
Return the number of simultaneous channels that camera is capable of.
This should be used by devices capable of generating multiple channels of imagedata simultaneously. Note: this should not be used by color cameras (use getNumberOfComponents instead).
Implemented in CCameraBase< U >.
|
pure virtual |
Return the number of components in this image.
This is '1' for grayscale cameras, and '4' for RGB cameras.
Implemented in CCameraBase< U >.
|
pure virtual |
Unused and slated for removal. Implemented in DeviceBase.h.
Implemented in CCameraBase< U >.
|
pure virtual |
Get the metadata tags stored in this device.
These tags will automatically be add to the metadata of an image inserted into the circular buffer.
Implemented in CCameraBase< U >.
|
inlinevirtual |
Implements MM::Device.
|
pure virtual |
Indicate whether sequence acquisition is currently running.
Returns true when sequence acquisition is active, false otherwise.
Implemented in CLegacyCameraBase< U >, and CCameraBase< U >.
|
pure virtual |
Return whether a camera's exposure time can be sequenced.
If returning true, then a Camera adapter class should also inherit the SequenceableExposure class and implement its methods.
|
pure virtual |
Set up the camera so that Sequence acquisition can start without delay.
Implemented in CCameraBase< U >.
|
pure virtual |
Remove an existing tag from the metadata associated with this device.
These tags will automatically be add to the metadata of an image inserted into the circular buffer.
Implemented in CCameraBase< U >.
|
pure virtual |
Set the camera Region Of Interest.
Required by the MM::Camera API. This command will change the dimensions of the image. Depending on the hardware capabilities the camera may not be able to configure the exact dimensions requested - but should try do as close as possible. If the hardware does not have this capability the software should simulate the ROI by appropriately cropping each frame.
| x | top-left corner coordinate |
| y | top-left corner coordinate |
| xSize | width |
| ySize | height |
|
pure virtual |
Perform exposure and grab a single image.
Required by the MM::Camera API.
SnapImage should start the image exposure in the camera and block until the exposure is finished. It should not wait for read-out and transfer of data. Return DEVICE_OK on success, error code otherwise.
Implemented in CCameraBase< U >.
|
pure virtual |
Start Sequence Acquisition with given interval.
Most camera adapters will ignore this number.
Implemented in CLegacyCameraBase< U >, and CCameraBase< U >.
|
pure virtual |
Start continuous acquisition.
Implemented in CLegacyCameraBase< U >, and CCameraBase< U >.
|
pure virtual |
Stop an ongoing sequence acquisition.
Implemented in CLegacyCameraBase< U >, and CCameraBase< U >.