[ome-devel] OME-Tiff writing using LOCI calls from MATLAB, and ModuloAlongT annotation

Yellen, Gary gary_yellen at hms.harvard.edu
Thu Oct 30 03:25:27 GMT 2014


Hi All -
I took care of my <Plane> metadata problem and now my Bio-Formats/MATLAB hybrid is read fine by OMERO.
And the writing speed is way faster - about 18x - than the all Bio-Formats version (which still fails OMERO import on some sort of StatsInfo handling error).

-        gary

From: ome-devel [mailto:ome-devel-bounces at lists.openmicroscopy.org.uk] On Behalf Of Yellen, Gary
Sent: Wednesday, October 29, 2014 6:12 PM
To: Besson, Sebastien (forwarding)
Cc: OME-devel OME
Subject: Re: [ome-devel] OME-Tiff writing using LOCI calls from MATLAB, and ModuloAlongT annotation

Hi Sebastien,
I tried this - the file is readable in ImageJ but not in OMERO.
It gives a different error (below), and the writing time is now 30 seconds.
Best,
Gary

ame: import-request-failure
Parameters: {message=omero.ValidationException
    serverStackTrace = "ome.conditions.ValidationException: could not insert: [ome.model.stats.StatsInfo]; SQL [insert into statsinfo (creation_id, external_id, group_id, owner_id, permissions, update_id, globalMax, globalMin, version, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: could not insert: [ome.model.stats.StatsInfo]
                              at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:642) ...

From: Sebastien Besson [mailto:s.besson at dundee.ac.uk]
Sent: Wednesday, October 29, 2014 5:28 PM
To: Yellen, Gary
Cc: Munro Ian; OME-devel OME
Subject: Re: [ome-devel] OME-Tiff writing using LOCI calls from MATLAB, and ModuloAlongT annotation

Hi Gary,

after a bit of debugging, the error should be solved by reinitializing the IFD state before
each call to TiffWriter.saveBytes(). This should be solved by either creating a new
IFD in each iteration of the loop or resetting its state with for instance:

     ifd.clear();
     ifd.putIFDValue(ifd.ROWS_PER_STRIP, szY);

Adding this two lines  was enough to remove the Error thrown by running showinf on the
generated OME-TIFF files while preserving the size. I would expect this will also solve the
import into OMERO.

Could you try and let us know?
Sebastien


On 29 Oct 2014, at 20:57, Yellen, Gary <gary_yellen at hms.harvard.edu<mailto:gary_yellen at hms.harvard.edu>> wrote:

I finally got to try uploading my files to an OMERO server, and I see the same problem as Ian. The metadata import ok, but the images are no good and the Import Log is full of "Error untangling IFDs; the OME-TIFF file may be malformed" messages.

OMERO can read the slow (70 sec to write) and oversized (5 MB instead of 1.6) file written with Bio-Formats just fine.

Fiji can read the hybrid file (Bio-Formats for metadata, MATLAB for Tiff writing) just fine, but OMERO has a number of problems with it - the nominally compliant use of a simplified <TiffData IFD="0" PlaneCount="90"> is not handled by OMERO, which seems to insist on have TheC etc. specified for every single plane.

Gary


From: ome-devel [mailto:ome-devel-bounces at lists.openmicroscopy.org.uk] On Behalf Of Munro, Ian
Sent: Wednesday, October 29, 2014 10:26 AM
To: OME OME-devel
Subject: Re: [ome-devel] OME-Tiff writing using LOCI calls from MATLAB, and ModuloAlongT annotation

Hi All

I'm just in the process of checking this to ensure that the data that is read  back is the same both with and without this modification.
If I run the command line 'showinf tool 'on the smaller files produced with the suggested ifd mod then I get the following in the output:

Reading pixel data (0-2)
Reading IFDs
Populating metadata
Error untangling IFDs; the OME-TIFF file may be malformed.
Error untangling IFDs; the OME-TIFF file may be malformed.
Read 3/3 planes (100%)
[done]


Is anyone else seeing this. I may have implemented the ifd mod incorrectly?

Regards

Ian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20141029/d55fc819/attachment-0001.html>


More information about the ome-devel mailing list