[ome-devel] Temporal crop OME Tiff file with ImageJ / Fiji
Melissa Linkert
melissa at glencoesoftware.com
Thu Dec 12 19:54:16 GMT 2013
Hi Hadrien,
> 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.
The issue is that it is quite difficult in general to know which
metadata needs to be kept, and which should be discarded. I have filed
a ticket on our issue tracking system to attempt to improve this:
http://trac.openmicroscopy.org.uk/ome/ticket/11831
but I wouldn't expect that to completely cover all cases of images being
modified before exporting. You have been CC'd on the ticket and so will
be notified of any updates; if you prefer not to receive notifications
please let me know.
> 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.
I would advise contacting Christoph Gohlke to fix this; even once the
above ticket is fixed, the reality is many software packages write
OME-TIFF files, and not all of them will always do so in a way that is 100%
compliant with the specification.
Regards,
-Melissa
On Wed, Dec 11, 2013 at 08:24:46PM +0100, Hadrien Mary wrote:
> 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
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
More information about the ome-devel
mailing list