<div dir="ltr">Hi Dan,<div><br></div><div style>Thank you for investigating and confirming the issue. I would like to look into this more at some point, but that will have to wait until some time opens up. It'd also be my first experience with SWIG, but I consider that a learning opportunity. For now that these functions are missing represents an inconvenience for me rather than a showstopper. </div>
<div style><br></div><div style>Thanks,</div><div style>Zamir</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 3, 2013 at 5:54 PM, Dan Mueller <span dir="ltr"><<a href="mailto:dan.muel@gmail.com" target="_blank">dan.muel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Zamir,<br>
<br>
I downloaded the latest SimpleITK C# binaries (<br>
SimpleITK-0.6.1.post2-CSharp-win32-x86.zip) and can confirm that the<br>
getBufferAs* methods are missing.<br>
<br>
This has revealed a hole in the automated testing.<br>
<br>
A number of things need to happen:<br>
1. A (C#) test needs to be added which uses these functions (probably<br>
to Testing/Unit/CSharpImageTest.cs).<br>
2. The cause of the missing functions needs to be identified and fixed.<br>
<br>
I've had a quick look at the code and can't work this out — everything<br>
seems in order. There is a C++ test which exercises the methods (so<br>
they exist in C++ world), and SimpleITK.i contains the lines:<br>
<br>
#ifndef CSHARP<br>
%ignore itk::simple::Image::GetBufferAsInt8;<br>
%ignore itk::simple::Image::GetBufferAsUInt8;<br>
%ignore itk::simple::Image::GetBufferAsInt16;<br>
%ignore itk::simple::Image::GetBufferAsUInt16;<br>
%ignore itk::simple::Image::GetBufferAsInt32;<br>
%ignore itk::simple::Image::GetBufferAsUInt32;<br>
%ignore itk::simple::Image::GetBufferAsInt64;<br>
%ignore itk::simple::Image::GetBufferAsUInt64;<br>
%ignore itk::simple::Image::GetBufferAsFloat;<br>
%ignore itk::simple::Image::GetBufferAsDouble;<br>
#endif<br>
<br>
So I don't understand...<br>
<br>
Unfortunately I am flat out at the moment and won't have a chance to<br>
look further for a while. If you want to investigate yourself, we<br>
welcome any contribution!<br>
<br>
Thanks for reporting the issue and sorry for the delay in responding.<br>
<br>
Regards, Dan<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 3 May 2013 01:05, "Zamir Khan" <<a href="mailto:zamir.khan@gmail.com">zamir.khan@gmail.com</a>> wrote:<br>
><br>
> I am primarily working with VS2010, .NET 4.0, x64, if that helps.<br>
><br>
> Thanks,<br>
> Zamir<br>
><br>
><br>
> On Thu, May 2, 2013 at 11:34 AM, Zamir Khan <<a href="mailto:zamir.khan@gmail.com">zamir.khan@gmail.com</a>> wrote:<br>
>><br>
>> Can anyone confirm whether they have access to the GetBufferAs* methods in the C# wrappers of SimpleITK in v0.6.1 or later?<br>
>><br>
>> Thanks,<br>
>> Zamir<br>
>><br>
>><br>
>> On Tue, Apr 30, 2013 at 11:26 AM, Zamir Khan <<a href="mailto:zamir.khan@gmail.com">zamir.khan@gmail.com</a>> wrote:<br>
>>><br>
>>> Sorry, I'm not sure what is meant by "compile distribution". If you mean the 0.6.1 release binaries, that is what I started with (and what led me to build from the source). In both versions, I do not see any buffer related methods for the Image object in the C# wrappers (using the object explorer and Intellisense).<br>
>>><br>
>>> On an unrelated note, I also found a strange discrepancy that I could use Image.GetPixelID() in the x64 version, but not the x86 version.<br>
>>><br>
>>> Thanks,<br>
>>> Zamir<br>
>>><br>
>>><br>
>>> On Tue, Apr 30, 2013 at 11:14 AM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:<br>
>>>><br>
>>>> Hello Zkhan,<br>
>>>><br>
>>>> Those methods should still be there. Are you able to find them in the compile distribution?<br>
>>>><br>
>>>> I checked to see if there was a test for those methods in C# and I didn't see them any place. So I can't confirm that they are being tested nightly.<br>
>>>><br>
>>>> Brad<br>
>>>><br>
>>>> On Apr 30, 2013, at 8:44 AM, zkhan <<a href="mailto:zamir.khan@gmail.com">zamir.khan@gmail.com</a>> wrote:<br>
>>>><br>
>>>> > Sorry to revive an old-ish thread, but I read here that the GetBufferAs*<br>
>>>> > methods are implemented for C#. However, I just pulled and built SimpleITK<br>
>>>> > 0.7.32799.0 and I cannot find any methods to retrieve a buffer from the<br>
>>>> > image. As has been mentioned, this would provide a significant performance<br>
>>>> > improvement over having to access the image pixel-by-pixel when needing to<br>
>>>> > transfer the image data outside of the Image object.<br>
>>>> ><br>
>>>> > Have these methods been removed, or not yet implemented?<br>
>>>> ><br>
>>>> ><br>
>>>> ><br>
>>>> > --<br>
>>>> > View this message in context: <a href="http://itk-users.7.n7.nabble.com/Why-are-getBufferAs-methods-not-available-in-Java-tp30969p31309.html" target="_blank">http://itk-users.7.n7.nabble.com/Why-are-getBufferAs-methods-not-available-in-Java-tp30969p31309.html</a><br>
>>>> > Sent from the ITK - Users mailing list archive at Nabble.com.<br>
>>>> > _____________________________________<br>
>>>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>> ><br>
>>>> > Visit other Kitware open-source projects at<br>
>>>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>> ><br>
>>>> > Kitware offers ITK Training Courses, for more information visit:<br>
>>>> > <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
>>>> ><br>
>>>> > Please keep messages on-topic and check the ITK FAQ at:<br>
>>>> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>>>> ><br>
>>>> > Follow this link to subscribe/unsubscribe:<br>
>>>> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>>>><br>
>>><br>
>><br>
><br>
</div></div></blockquote></div><br></div>