Re: [Numpy-discussion] create a numpy array of images

2011-02-03 Thread Francesc Alted
A Wednesday 02 February 2011 18:12:47 Christopher Barker escrigué: > One other option, that I've never tried, is carray, which is an array > compressed in memory. Depending on your images, perhaps they would > compress a lot (or not ): > > https://github.com/FrancescAlted/carray > http://mail.

Re: [Numpy-discussion] create a numpy array of images

2011-02-02 Thread Christopher Barker
> It seems that using 64 bit python is the solution. It's certainly the easy way to access a lot of memory -- and memory is cheap these days. > But the thing is i would > compile my code and wanna distribute it to the clients.. I don't think 64 bit gets in the way of that -- except that it will

Re: [Numpy-discussion] create a numpy array of images

2011-02-02 Thread totonixs...@gmail.com
On Wed, Feb 2, 2011 at 8:22 AM, Asmi Shah wrote: > Hi all, > It seems that using 64 bit python is the solution. But the thing is i would > compile my code and wanna distribute it to the clients.. and that is the > only reason why i want to work on 32 bit system. Sturla, how I can make it > sure th

Re: [Numpy-discussion] create a numpy array of images

2011-02-02 Thread Asmi Shah
Hi all, It seems that using 64 bit python is the solution. But the thing is i would compile my code and wanna distribute it to the clients.. and that is the only reason why i want to work on 32 bit system. Sturla, how I can make it sure that some part of the data is kept on the disk and only the n

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Francesc Alted
A Tuesday 01 February 2011 19:58:16 Sturla Molden escrigué: > Den 01.02.2011 18:58, skrev Christopher Barker: > > But if you really have big collections of images, you might try > > memory mapped arrays -- as Sturla pointed out they wont' let you > > create monster arrays on a 32 bit python, > > B

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Sturla Molden
Den 01.02.2011 18:58, skrev Christopher Barker: > But if you really have big collections of images, you might try memory > mapped arrays -- as Sturla pointed out they wont' let you create monster > arrays on a 32 bit python, But they will on 64 bit Python :D We can just memory map a temporary fil

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Christopher Barker
On 2/1/11 8:31 AM, Friedrich Romstedt wrote: > In case you *have* to downsample: > > I also ran into this, with the example about my 5 images ... > im.resize((newx newy), PIL.Image.ANTIALIAS) will be your friend. > http://www.pythonware.com/library/pil/handbook/image.htm. If you want to downsample

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Christopher Barker
On 2/1/11 12:39 AM, Asmi Shah wrote: > I have one more question: how to avoid the limitation of memoryerror in > numpy. as I have like 200 images to stack in the numpy array of say > 1024x1344 resolution.. have any idea apart from downsampling? If I'm doing my math right, that's 262 MB, shouldn't

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Friedrich Romstedt
2011/2/1 Asmi Shah : > Thanks a lot Friedrich and Chris.. It came in handy to use PIL and numpy.. > :) :-) > I have one more question: how to avoid the limitation of memoryerror in > numpy. as I have like 200 images to stack in the numpy array of say > 1024x1344 resolution.. have any idea apart f

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Sturla Molden
Den 01.02.2011 15:07, skrev Asmi Shah: Hi Zach and Sturla, Well I am a "she" :)) I apologize, I did not deduce correct gender from your name :) Thanks for your inputs.. I am using 32 bit python as have so many libraries integrated with it.. and moreover, i plan to put this volume rendered

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Asmi Shah
al Python Date: Tue, 1 Feb 2011 14:49:39 +0100 Subject: Re: [Numpy-discussion] create a numpy array of images Den 1. feb. 2011 kl. 11.20 skrev "totonixs...@gmail.com" < totonixs...@gmail.com>: I have one more question: how to avoid the limitation of memoryerror in > >>

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Sturla Molden
Den 1. feb. 2011 kl. 11.20 skrev "totonixs...@gmail.com" : > I have one more question: how to avoid the limitation of memoryerror > in >> >> numpy. as I have like 200 images to stack in the numpy array of say >> 1024x1344 resolution.. have any idea apart from downsampling? > > Take a look at nu

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread totonixs...@gmail.com
Hi, On Tue, Feb 1, 2011 at 6:39 AM, Asmi Shah wrote: > Thanks a lot Friedrich and Chris.. It came in handy to use PIL and numpy.. > :) > @Zach, m aware of the poor handling of 16bit images in PIL, for that I am > using imagemagick to convert it into 8 bit first and then PIL for rest of > the proc

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Asmi Shah
Thanks a lot Friedrich and Chris.. It came in handy to use PIL and numpy.. :) @Zach, m aware of the poor handling of 16bit images in PIL, for that I am using imagemagick to convert it into 8 bit first and then PIL for rest of the processing.. I have one more question: how to avoid the limitation

Re: [Numpy-discussion] create a numpy array of images

2011-01-31 Thread Zachary Pincus
>>> I am using python for a while now and I have a requirement of >>> creating a >>> numpy array of microscopic tiff images ( this data is 3d, meaning >>> there are >>> 100 z slices of 512 X 512 pixels.) How can I create an array of >>> images? >> >> It's quite straightforward to create a 3-d

Re: [Numpy-discussion] create a numpy array of images

2011-01-31 Thread totonixs...@gmail.com
I've been done that but with CT and MRI dicom files, and the cool thing is that with numpy I can do something like this: # getting axial slice axial = slices[n,:,:] # getting coronal slice coronal = slices[:, n, :] # getting sagital slice sagital = slices[:,:, n] On Sun, Jan 30, 2011 at 5:29 PM

Re: [Numpy-discussion] create a numpy array of images

2011-01-30 Thread Friedrich Romstedt
2011/1/28 Christopher Barker : > On 1/28/11 7:01 AM, Asmi Shah wrote: >> I am using python for a while now and I have a requirement of creating a >> numpy array of microscopic tiff images ( this data is 3d, meaning there are >> 100 z slices of 512 X 512 pixels.) How can I create an array of images?

Re: [Numpy-discussion] create a numpy array of images

2011-01-28 Thread Christopher Barker
On 1/28/11 7:01 AM, Asmi Shah wrote: > I am using python for a while now and I have a requirement of creating a > numpy array of microscopic tiff images ( this data is 3d, meaning there are > 100 z slices of 512 X 512 pixels.) How can I create an array of images? It's quite straightforward to crea

[Numpy-discussion] create a numpy array of images

2011-01-28 Thread Asmi Shah
Hi guys, I am using python for a while now and I have a requirement of creating a numpy array of microscopic tiff images ( this data is 3d, meaning there are 100 z slices of 512 X 512 pixels.) How can I create an array of images? i then would like to use visvis for visualizing this in 3D. any hel