I want to access the raw data pointer of an image in simpleITK c#. (It will be sent to another native library.) I understand how to do it for types like sitkFloat32 and sitkInt32 since the GetBufferAsXXX returns a IntPtr that I can use. But for some types like Int64 I get a SWIGTYPE_p_long_long instead. How can I use this object? Is it possible to cast it somehow to an adress that I can use?
It looks like those interfaces need a little more refinement and testing. Are you able to use the return from
No the GetBufferAsVoid returns a SWIGTYPE_p_void so that doesn’t work.
Thanks for giving that a try. This PR will address the issue:
It should be merged into master shortly, where the nightly builds will publish the latest binaries. Then it will be merged into the release branch for the 2.0.2 release.
Have you had the opportunity test these the “latest” build with the fixed return type? We will like to incorporate this change into version 2.0.2 and your feedback is important.