[ome-devel] Temporal crop OME Tiff file with ImageJ / Fiji

Hadrien Mary hadrien.mary at gmail.com
Wed Dec 11 19:24:46 GMT 2013


Hi,

I use duplicate and I specifiy custom timepoints range in ImageJ / Fiji to
“temporally” crop OME Tiff file.

SizeT in Pixels tag is correctly updated but obsolete TiffData (such as
Plane) tags are not removed from OME description. It’s not a big deal since
LOCI can still re open the file without issue.

However it seems weird to me keep informations about missing data… So I
wonder to know if you could remove them.

Moreover I process OME Tiff file with the excellent tifffile.py from
Christoph Gohlke ( <http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html>
http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html). And it appears that
the module failed to open OME Tiff (see error at the end of the mail for
python devs). It failed because while iterating over TiffData, module raise
an error when no data is found in the Tiff…

If you think these data should be kept across OME description I will talk
to Christoph Gohlke to see how we can overcome this issue.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-13-896eff0433ce> in <module>()
      1 f = os.path.join(data_path, "temporal_crop.ome.tif")
      2 tf = TiffFile(f)
----> 3 tf.series

/home/hadim/.phd/dev/spindle_tracker/spindle_tracker/io/tifffile.py in
__get__(self, instance, owner)
    549         if instance is None:
    550             return self
--> 551         value = self.func(instance)
    552         if value is NotImplemented:
    553             return getattr(super(owner, instance), self.func.__name__)

/home/hadim/.phd/dev/spindle_tracker/spindle_tracker/io/tifffile.py in
series(self)
    664         series = []
    665         if self.is_ome:
--> 666             series = self._omeseries()
    667         elif self.is_fluoview:
    668             dims = {b'X': 'X', b'Y': 'Y', b'Z': 'Z', b'T': 'T',

/home/hadim/.phd/dev/spindle_tracker/spindle_tracker/io/tifffile.py in
_omeseries(self)
    862                     num = int(atr.get('PlaneCount', num))
    863                     idx = [int(atr.get('First'+ax, 0)) for ax
in axes[:-2]]
--> 864                     idx = numpy.ravel_multi_index(idx, shape[:-2])
    865                     for uuid in data:
    866                         if uuid.tag.endswith('UUID'):

ValueError: invalid entry in coordinates array

Best,

—
Hadrien Mary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20131211/a07b7e2c/attachment.html>


More information about the ome-devel mailing list