Richard Zhu wrote:
> I can not use the ImageToArray function in my CVS , so I am thinking pass
> directly the IMAQ Image as a variable to my DLL, similar to the NIVision.DLL
> (you can see this DLL configed data type when you double click the
> ImageToArray).
>
> when you assign the data type for the image to adapt to type (like the
> NIVision.DLL)
> so in the DLL config, the data types like this :
> GoMyDLL(long count, long *time, void *aImage)
>
> in my C++ DLL
>
> extern "C" __declspec(dllexport) void GoGoMyDLL( long count, long *time,
> void *aImage)
> {
> }
>
> the thing is :
>
> how can I extract the aImage pixels. I don't know the data format or
> structure of the IMAQ image, may be it's in nivision.h or some where,
> but I can't find it in my PC.
This is a private LabVIEW data structure introduced in LabVIEW 7.0.
Before that IMAQ images where a pointer to a cluster with a string
handle and a 32 bit pointer to a private LabVIEW data structure, now it
is simply a pointer to a structure with private contents. LabVIEW
respectively the niVIsSvc.dll has functions to extract information from
this private pointer but I don't believe NI has intentions to document
them. But you can ask.
Trying to extract them yourself by reverse engineering the structure is
not only illegal in some legislations but also a sure way to version
hell, as NI is free and very likely to modify the layout of this private
structure in every new LabVIEW version. This is one of the reasons they
probably never will document the layout of this structure, to be able to
make modifications to add new features.
> I tried to extract the binary and saved to a file , still can't figure out
> the how to get the real image data.
It is a pointer to a structure with numerics and more pointers to
structures with numerics and even more pointers! Maybe it is even an
object pointer with embedded methods much like a C++ object.
> what can I do with this IMAQ image ?
Nothing other than passing it as an opaque pointer to the documented
IMAQ C functions.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390