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 asmi.ca...@gmail.com 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

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 asmi.ca...@gmail.com 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

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

Re: [Numpy-discussion] Numexpr giving randomized results on arrays larger than 2047 elements

2011-01-24 Thread totonixs...@gmail.com
I have the same problem here. I'm using numexpr 1.4.1 and numpy 1.3.0. On Mon, Jan 24, 2011 at 4:19 PM, John Salvatier jsalv...@u.washington.edu wrote: Forgot to mention that I am using numexpr 1.4.1 and numpy 1.5.1 On Mon, Jan 24, 2011 at 9:47 AM, John Salvatier jsalv...@u.washington.edu

Re: [Numpy-discussion] Drawing circles in a numpy array

2011-01-11 Thread totonixs...@gmail.com
On Mon, Jan 10, 2011 at 11:53 AM, totonixs...@gmail.com totonixs...@gmail.com wrote: Hi all, I have this problem: Given some point draw a circle centered in this point with radius r. I'm doing that using numpy this way (Snippet code from here [1]): # Create the initial black and white image

[Numpy-discussion] Drawing circles in a numpy array

2011-01-10 Thread totonixs...@gmail.com
Hi all, I have this problem: Given some point draw a circle centered in this point with radius r. I'm doing that using numpy this way (Snippet code from here [1]): # Create the initial black and white image import numpy as np from scipy import ndimage a = np.zeros((512, 512)).astype(uint8)

Re: [Numpy-discussion] OS X binaries.

2010-12-31 Thread totonixs...@gmail.com
On Fri, Dec 31, 2010 at 7:44 PM, Gideon gideon.simp...@gmail.com wrote: I noticed that 1.5.1 was released, and sourceforge is suggesting I use the package numpy-1.5.1-py2.6-python.org-macosx10.3.dmg.  However, I have an OS X 10.6 machine. Can/should I use this binary? Should I just compile

[Numpy-discussion] Threshold

2010-12-02 Thread totonixs...@gmail.com
Hi all, I' m developing a medical software named InVesalius [1], it is a free software. It uses numpy arrays to store the medical images (CT and MRI) and the mask, the mask is used to mark the region of interest and to create 3D surfaces. Those array generally have 512x512 elements. The mask is

Re: [Numpy-discussion] Threshold

2010-12-02 Thread totonixs...@gmail.com
On Thu, Dec 2, 2010 at 11:14 AM, Zachary Pincus zachary.pin...@yale.edu wrote: mask = numpy.zeros(medical_image.shape, dtype=uint16) mask[ numpy.logical_and( medical_image = lower, medical_image = upper)] = 255 Where lower and upper are the threshold bounds. Here I' m marking the array