Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I access the values in ProfileArray of a CWIMAQProfileReport?

Hi all,

I'm not sure if this is the right board, but I didn't find one related to VB and NI Vision.

 

I'm using LineProfile2 from CWIMAQVision1 which gives me a ProfileArray which is a variant. I'd like to access the

values in the array. Normally I would do it like

Report(1).ProfileArray(i)

but that does not work. I can get the bounds of the array with LBound and UBound. I can observe the array in 

debug modus and it contains reasonable values.

How can I get access to the contents of the ProfileArray?

 

Thanks in advance

Axel

0 Kudos
Message 1 of 3
(6,551 Views)

Hello Alex,

 

which version of the vision development do you use?

At the moment its not clear for me what is the aim of your application.

Do you want access to the hole intensity values of the 2D array?

You must use the "image to array" function for that.

Please post your email adress so that i contact you directly if its not the correct solution for you.

I will post the feedback for the other customers.

 

Kind regards,

 

Elmar

 

0 Kudos
Message 2 of 3
(6,529 Views)

Hi Elmar,

 

thanks for paying attention to my problems.

 

I use Vision 8.5. My email adress is axel.wille@izm-m.fraunhofer.de.

 

I don't need the hole intensity of the image/2D array. I only need the

intensity values of a given line which should be a 1D array of bytes.

I use the following command

        CWIMAQVision1.LineProfile2 Image, Line, Report

 

When I understood the command correctly the intensity values are

in the Report. I would get them with 

        Report(1).ProfileArray(i)

But that does not work. I get a runtime error #450.

 

Other stuff with the report works and gives reasonable values e.g.

            Report(1).PixelCount

            LBound(Report(1).ProfileArray)

            UBound(Report(1).ProfileArray)

Or passing the hole array to plot the values also works

        frmLineProfile.CWGraph1.PlotY Report(1).ProfileArray

 

Best regards,

 

Axel

0 Kudos
Message 3 of 3
(6,520 Views)