[ome-devel] Python Scripts: downloadPlane( ) in script_utils.py

Will Moore will at lifesci.dundee.ac.uk
Thu Jan 27 15:08:30 GMT 2011


Dear All,

  I only replied to Jerome on this before, but if anyone else is  
interested, here's my reply...

Begin forwarded message:

> From: Will Moore <will at lifesci.dundee.ac.uk>
> Date: 20 January 2011 16:49:41 GMT
> To: Jerome Avondo <jeromeavondo at msn.com>
> Subject: Re: [ome-devel] Python Scripts: downloadPlane( ) in  
> script_utils.py
>
> Hi Jerome,
>
>  I think this is the way that numpy (and PIL Image) works.
>
> This is a little script you can try, which grabs a plane from OMERO  
> and displays it using PIL.
> I just pass the 2D array to PIL (after scaling) and it seems to be  
> the right way around.
>
> Numpy examples here might help http://www.scipy.org/Tentative_NumPy_Tutorial
>
> It seems that if you have a long stream of data (ie - a plane) and  
> you want to convert to 2D array, you specify
> reshape(y, x)
>
> Looks like this:
> >>> import numpy
> >>> a = numpy.arange(10).reshape(2,5)
> >>> a
> array([[0, 1, 2, 3, 4],
>        [5, 6, 7, 8, 9]])
> Any help?
>
>    Will.
>
>
>
>
>
> On 20 Jan 2011, at 15:40, Jerome Avondo wrote:
>
>> Hi guys,
>>
>> Is the downloadPlane function in script_utils.py meant to return a  
>> 2d array of the requested plane in:
>>
>> plane[ysize][xsize] dimension order, instead of plane[xsize][ysize]
>>
>> Is this desired behaviour?
>> Just seems a little bit counter intuitive to me and it did catch me  
>> out tbh.
>>
>> J.
>> _______________________________________________
>> ome-devel mailing list
>> ome-devel at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
> William Moore
> Wellcome Trust Centre for Gene Regulation & Expression
> College of Life Sciences
> MSI/WTB/JBC Complex
> University of Dundee
> Dow Street
> Dundee  DD1 5EH
> United Kingdom
>
> Phone 01382 386364
> http://openmicroscopy.org
>
>
>
>
>

William Moore
Wellcome Trust Centre for Gene Regulation & Expression
College of Life Sciences
MSI/WTB/JBC Complex
University of Dundee
Dow Street
Dundee  DD1 5EH
United Kingdom

Phone 01382 386364
http://openmicroscopy.org





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20110127/944aa52e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: showPlane.py
Type: text/x-python-script
Size: 1759 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20110127/944aa52e/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20110127/944aa52e/attachment-0001.html>


More information about the ome-devel mailing list