[ITK Community] [Insight-users] SimpleITK: GetImageFromArray not working for images larger than 2^32 bytes

Bradley Lowekamp brad at lowekamp.net
Tue Dec 17 10:33:13 EST 2013


Hello,

I have uploaded some new eggs to SourceForge with the ITK_USE_64BITS_IDS enabled. This enables images largest then 4 giga-pixel to be using in ITK/SimpleITK for windows.

https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.7.1/Python/

There are named "SimpleITK-0.7.1.post1-1", the "-1" indicates that a different build of the same source code, and enables easy_install to consider it a newer version.

These new eggs need to me manually downloaded today, an announcement will be made when they can be automatically installed.

Thanks,
Brad

On Dec 16, 2013, at 8:30 AM, Marvin Albert <marvin.albert at gmail.com> wrote:

> Hi Brad,
> 
> I was about to test the file from your link.
> 
> Thank you so much!
> Best,
> Marvin
> 
> 
> 2013/12/16 Bradley Lowekamp <brad at lowekamp.net>
> Hello,
> 
> I had a change to test it this morning. And It didn't work. I have adjusted the configuration again. And hoping I get the needed egg tonight.
> 
> Thanks for your patience.
> 
> Brad
> 
> On Dec 13, 2013, at 1:49 PM, Bradley Lowekamp <brad at lowekamp.net> wrote:
> 
>> Marvin,
>> 
>> Did you report that you compiled SimpleITK with the patch and it fixed your issue?
>> 
>> Thanks,
>> Brad
>> 
>> On Dec 13, 2013, at 10:22 AM, Marvin Albert <marvin.albert at gmail.com> wrote:
>> 
>>> Oh and more specifically I was using SimpleITK-0.7.1.post1-py2.7-win-amd64.egg
>>> 
>>> 
>>> 2013/12/13 Marvin Albert <marvin.albert at gmail.com>
>>> Hi Brad,
>>> 
>>> yes I saw that you had commited the bug fix. And I was downloading the latest binary version from:
>>> 
>>> http://www.itk.org/SimpleITKDoxygen/html/PyDownload.html
>>> 
>>> Best,
>>> Marvin
>>> 
>>> 
>>> 2013/12/13 Bradley Lowekamp <brad at lowekamp.net>
>>> Marvin,
>>> 
>>> It should be there:
>>> 
>>> http://www.itk.org/gitweb?p=SimpleITK.git;a=shortlog;h=refs/tags/v0.7.1
>>> http://www.itk.org/gitweb?p=SimpleITK.git;a=commit;h=1170184e410de735f7761c624312ab154e47752a
>>> 
>>> Which binary are you using?
>>> 
>>> Brad
>>> 
>>> On Dec 13, 2013, at 9:43 AM, Marvin Albert <marvin.albert at gmail.com> wrote:
>>> 
>>>> Hi Brad,
>>>> 
>>>> I just realized the new SimpleITK 0.7.1 binary version is available for download.
>>>> However,
>>>> 
>>>> img = sitk._SetImageFromArray(np.ones([2048]*3,dtype=n.uint16),sitk.Image([2048]*3,sitk.sitkUInt16))
>>>> 
>>>> still fails on my machine.
>>>> Is the patch included in the new binary or am I doing something wrong?
>>>> For me the binary would be very useful since my application needs to be run on a lot of different systems.
>>>> 
>>>> Thanks a lot!
>>>> Best,
>>>> Marvin
>>>> 
>>>> 
>>>> 2013/11/10 Marvin Albert <marvin.albert at gmail.com>
>>>> Great, thanks a lot. SimpleITK is really useful for newbies like me!
>>>> Best,
>>>> Marvin
>>>> 
>>>> 
>>>> 2013/11/10 Bradley Lowekamp <brad at lowekamp.net>
>>>> Hello Marvin,
>>>> 
>>>> I would not try to mix the libraries. If you compile from the source with Python enabled, you will also need to make the "dist" target. Then you will get a python egg file in: "SimpleITK-build/SimpleITK-build/Wrapping/dist". This should be able to be installed with easy_install into you python environment.
>>>> 
>>>> A patch release with the fix should just be a couple weeks away.
>>>> 
>>>> Brad
>>>> 
>>>> 
>>>> On Nov 10, 2013, at 4:25 PM, Marvin Albert <marvin.albert at gmail.com> wrote:
>>>> 
>>>>> Hi Bradley,
>>>>> 
>>>>> thank you so much!
>>>>> I will try to compile sitk from source.
>>>>> Do you think its possible to just copy the resulting library to the previous binary release for not needing to compile sitk on the target systems?
>>>>> 
>>>>> Best,
>>>>> Marvin
>>>>> 
>>>>> 
>>>>> 2013/11/8 Bradley Lowekamp <brad at lowekamp.net>
>>>>> Hello,
>>>>> 
>>>>> There is a bug in the code. I have created an JIRA issue and scheduled it to be in the 0.7.1 patch release:
>>>>> 
>>>>> https://issues.itk.org/jira/browse/SIMPLEITK-424
>>>>> 
>>>>> I should have a patch for it today. If you are not already familiar, I'd recommend building SimpleITK from the git repository and checking out the "next" branch. The bug fix will be in the next branch before the master or release branch.
>>>>> 
>>>>> Brad
>>>>> 
>>>>> On Nov 8, 2013, at 8:34 AM, Marvin Albert <marvin.albert at gmail.com> wrote:
>>>>> 
>>>>> > Hi!
>>>>> >
>>>>> > is this the right place for a SimpleITK problem?
>>>>> >
>>>>> > I'm using SimpleITK for carrying out transformations on large images within a python environment.
>>>>> >
>>>>> > My problem is that when I want to transform python arrays bigger than 2^32 bytes (for example size (1400,1600,2000), uint16) into SimpleITK images, it will complain saying
>>>>> >
>>>>> > SimpleITK-0.6.1-py2.6-linux-x86_64.egg_FILES/SimpleITK.pyc in GetImageFromArray(arr, isVector)
>>>>> >    298       img = Image( z.shape[::-1], id )
>>>>> >    299
>>>>> > --> 300     _SimpleITK._SetImageFromArray( z.tostring(), img )
>>>>> >    301
>>>>> >    302     return img
>>>>> >
>>>>> > RuntimeError: Size mismatch of image and Buffer.
>>>>> >
>>>>> > As you can see, I'm using the 64Bit binary of SimpleITK under linux and there shouldn't be a problem right?
>>>>> >
>>>>> > Thanks a lot in advance!
>>>>> > Best,
>>>>> > Marvin
>>>>> > _____________________________________
>>>>> > Powered by www.kitware.com
>>>>> >
>>>>> > Visit other Kitware open-source projects at
>>>>> > http://www.kitware.com/opensource/opensource.html
>>>>> >
>>>>> > Kitware offers ITK Training Courses, for more information visit:
>>>>> > http://www.kitware.com/products/protraining.php
>>>>> >
>>>>> > Please keep messages on-topic and check the ITK FAQ at:
>>>>> > http://www.itk.org/Wiki/ITK_FAQ
>>>>> >
>>>>> > Follow this link to subscribe/unsubscribe:
>>>>> > http://www.itk.org/mailman/listinfo/insight-users
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20131217/40bdb891/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list