LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

void *image in LabView 6?

Hi!

I have made a type of a picture generator - a dll written in C++/MFC.
Now I need to make it compatible with LabView 6. The problem is that I
don't know what my exported function should return, nor what the
parameters should be. I have seen similar functions in IMAQ, which
somehow return an image in a void *image. Well, basically all I need
to know is what the function should look like and what it should
return.

int GetPicture(void *image , ..., ..., ??)
{
Fill void *image with what?
How should I allocate memory for the image pointer?
}

I want to be able to transfer a picture from this function and output
it in a LabView program.

Please, help me! 😃

/Chris, Sweden
0 Kudos
Message 1 of 3
(2,525 Views)
Because I am not sure how you want to use the image data or how you want to display the data, this answer may not be what you are looking for.

The easiest way to pass image data may be to use a 2-D array of bytes or numeric values. There are plenty of examples of how to do that. You may be able to then plot the data on an intensity graph or convert the data to use with the picture control VIs.

If you would like to get the image back as a true IMAQ image, I would suggest posting this question to the IMAQ forum, where you are more likely to get a customer who has already done what you are looking for. I also believe there is an IMAQ VI that converts a flattened pixmap to an IMAQ image, however I am not real sure and the other forum may know for sure.
0 Kudos
Message 2 of 3
(2,525 Views)
Ok, I'll ask in the IMAQ forums. Thanks for the tip.

Anyways, my idea was to transfer a bitmap file via memory through a
byte-array of some kind. So instead of opening a bitmap on the disk
with the "open file" dialog, and output it in an IMAQ viewer control,
you would output this binary "file" directly.


Evan wrote in message news:<506500000005000000EB2A0100-1042324653000@exchange.ni.com>...
> Because I am not sure how you want to use the image data or how you
> want to display the data, this answer may not be what you are looking
> for.
>
> The easiest way to pass image data may be to use a 2-D array of bytes
> or numeric values. There are plenty of examples of how to do that.
> You may be able to then plot the data on an intensity graph o
r convert
> the data to use with the picture control VIs.
>
> If you would like to get the image back as a true IMAQ image, I would
> suggest posting this question to the IMAQ forum, where you are more
> likely to get a customer who has already done what you are looking
> for. I also believe there is an IMAQ VI that converts a flattened
> pixmap to an IMAQ image, however I am not real sure and the other
> forum may know for sure.
0 Kudos
Message 3 of 3
(2,525 Views)