LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Pointer to LabVIEW

Solved!
Go to solution

I am trying to use the FLIR camera .NET API in LabVIEW. I am having an issue with respect to one of the .NET calls.

 

The .NET function returns the next image as a .NET object that is a pointer to the image data. I am a bit perplexed about how to convert this to a pointer that LabVIEW can use.

 

mcduff_0-1794502242935.png

Should I typecast the .NET object to a U64 integer and try to use the MoveBlock functions? (I am using a 64 bit system.)

 

Thanks

0 Kudos
Message 1 of 5
(123 Views)

What's the actual data type of the reference returned by GetNextImage? That should have its own available property and invoke nodes that you can use to dig out the underlying data. vi.lib\Platform\dotnet.llb\.NET Object to Variant.vi will also work to turn certain data types to LabVIEW variants.

0 Kudos
Message 2 of 5
(110 Views)

I assume it is a pointer to the image. The documentation is below, which is sparse.  I am going to see what I can do with it when I have access to the camera.

 

function GetNextImage

IManagedImage SpinnakerNET::IManagedCameraBase::GetNextImage () 
0 Kudos
Message 3 of 5
(96 Views)
Solution
Accepted by mcduff

Looks like there should be a lot of properties including a byte array "ManagedData" that might be the raw data and .NET bitmap "bitmap" property which itself has a "Save" method to save to disk or stream object, the stream would be usable to get the raw data.

Message 4 of 5
(85 Views)

That seems to work thanks.

 

Not sure why I thought it was a pointer, I think the AI response led me down the wrong path

0 Kudos
Message 5 of 5
(51 Views)