<div dir="ltr"><div class="markdown-here-wrapper" id="markdown-here-wrapper-925377" style><p style="margin:1.2em 0px!important">Hi,</p>
<p style="margin:1.2em 0px!important">I use duplicate and I specifiy custom timepoints range in ImageJ / Fiji to “temporally” crop OME Tiff file.</p>
<p style="margin:1.2em 0px!important">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.</p>
<p style="margin:1.2em 0px!important">However it seems weird to me keep informations about missing data… So I wonder to know if you could remove them.</p>
<p style="margin:1.2em 0px!important">Moreover I process OME Tiff file with the excellent tifffile.py from Christoph Gohlke (<a href="http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html"></a><a href="http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html">http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html</a>). 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…</p>
<p style="margin:1.2em 0px!important">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. </p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;white-space:pre;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;padding:0.5em;color:rgb(51,51,51);background-color:rgb(248,248,255);background-repeat:initial initial">---------------------------------------------------------------------------
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</code></pre>
<p style="margin:1.2em 0px!important">Best,</p>
<p style="margin:1.2em 0px!important">—<br>Hadrien Mary</p>
</div></div>