Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11912 (closed)

Opened 10 years ago

Closed 10 years ago

PIL on nightshade

Reported by: wmoore Owned by: spli
Priority: critical Milestone: 5.0.0
Component: Deployment Version: n.a.
Keywords: n.a. Cc: ux@…, analysis@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

We demo'd the Kymograph script on nightshade today and realised that something is not right.

It works fine on my machine (and I think it has worked nicely on nightshade before now), but
what we saw today was that the rotation of image slices using PIL is looking awful.

I don't know if it's missing some dependencies, or is a version that is using a different
resampling algorithm by default or what?
Or maybe some numpy issue in converting images to/from PIL.

I'm using the basic rotate function of a PIL image
image.rotate(toRotate, expand=True)

Anyone got any ideas about what could be causing this problem?

Here's an couple of screenshots of the script working on my local server and not on nightshade.

I'll see if I can find out any more info...

Change History (12)

comment:1 Changed 10 years ago by wmoore

Open a ticket and put me on it.

Are these 8/16 bit images?

Simon

On 17 Jan 2014, at 13:24, Petr Walczysko wrote:

Hi Simon

Thank you. Unfortunately, I think we have the same problem on trout as well.
See below.
Cheers
Petr

<Screen Shot 2014-01-17 at 13.23.39.png>

On 16 Jan 2014, at 16:30, Simon Li wrote:

Petr mentioned it in devteam earlier. Trout has the same version of PIL (though a different version of numpy) installed, can you replicate it there?

[spli@nightshade2 ~]$ rpm -q python-imaging numpy
python-imaging-1.1.6-19.el6.x86_64
numpy-1.3.0-6.2.el6.x86_64

[spli@ome-c6100-3 ~]$ pip freeze
...
PIL==1.1.6
numpy==1.4.1
numexpr==1.4.2
tables==2.4.0
scipy==0.7.2
…

If that doesn't work then I think we'll need to redo the python dependencies on Nightshade, which could be non-trivial. For instance it's also also missing pytables (which has other dependencies, with particular version requirements), so it might be worth setting up a virtualenv incorporating (or not) the system packages. I've just tried installing tables from scratch in a CentOS VM (verifying the OMERO.searcher install instructions) and it's a bit of a pain at the moment. Or rebuild and push out our own RPMs (I've got some).

Simon

On 16 Jan 2014, at 16:15, Will Moore wrote:

Hi Kenny (or anyone who might have an idea....)

Last edited 10 years ago by wmoore (previous) (diff)

comment:2 Changed 10 years ago by wmoore

Simon: These are 16-bit images

comment:3 Changed 10 years ago by spli

OK, Chris Coletta had similar problems with PIL and 16bit images in PyCHRM/WND-CHRM, I'll talk to him.

comment:4 Changed 10 years ago by wmoore

This is actually working OK on my machine with 16-bit images

$ python
Python 2.7.6 (default, Dec 11 2013, 12:35:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin


$ pip freeze
...
PIL==1.1.7
numpy==1.8.0
...
Last edited 10 years ago by wmoore (previous) (diff)

comment:5 Changed 10 years ago by spli

  • Cc ux@… analysis@… added

comment:6 Changed 10 years ago by pwalczysko

Also on trout it was 16-bit image which I tested. See screenshots on https://trac.openmicroscopy.org.uk/ome/ticket/11916.

comment:7 Changed 10 years ago by wmoore

Simon - any progress on this? I just got an e-mail from the user I spoke to last week asking about progress. She would like to come to next Thursdays drop-in session and 'check in'. Cheers,

comment:8 Changed 10 years ago by spli

I'll see if there's a workaround on Monday that works with python-imaging/PIL 1.1.6. If that fails I guess installing a later version of PIL is one option. Problem is nightshade isn't setup to use pip/virtualenv, though compiling a new RPM is another option.

comment:9 Changed 10 years ago by wmoore

Simon - since trout has the same issue as nightshade, could we see if upgrading to latest PIL/pillow helps there?

Also just tried howe, and there's no problem there - Kymographs look fine.

comment:10 Changed 10 years ago by spli

I think I've got a workaround that'll work on older PIL versions.

comment:11 Changed 10 years ago by spli

Use this to check whether your version of PIL is affected: https://gist.github.com/manics/8648955

PR opened: https://github.com/ome/scripts/pull/62

comment:12 Changed 10 years ago by spli

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.71764 sec.)

We're Hiring!