<div dir="ltr">Hi Hadrien & Melissa,<div><br></div><div><div>> I don't know if that is the expected behavior during import; as that's</div><div>> not part of Bio-Formats, you would need to contact the SCIFIO</div><div>> developers to find out if it should be fixed.</div></div><div><br></div><div>It's certainly not desirable behavior... so Hadrien, feel free to file an issue on scifio/scifio on GitHub.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 27, 2015 at 7:21 PM, Melissa Linkert <span dir="ltr"><<a href="mailto:melissa@glencoesoftware.com" target="_blank">melissa@glencoesoftware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hadrien,<br>
<br>
> Is that an excepted behaviour ? If it does not, should I open a ticket for it ?<br>
<br>
The Bio-Formats exporter behavior is expected.<br>
<span class=""><br>
> Is this behaviour to add colormap to each plane a feature or a bug of<br>
> SCIFIO ? If it is a bug should I report it to SCIFIO or you guys take<br>
> care of it ?<br>
<br>
</span>I don't know if that is the expected behavior during import; as that's<br>
not part of Bio-Formats, you would need to contact the SCIFIO developers<br>
to find out if it should be fixed.<br>
<br>
Regards,<br>
-Melissa<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jan 27, 2015 at 06:56:16PM +0100, Hadrien Mary wrote:<br>
> Thank you Melissa. Unfortunately the trick with "Stack to Hyperstack"<br>
> and "Hyperstack to Stack" is failing sometime (I don't know why)...<br>
> Anyway I wrote a small python script which just load the file and save<br>
> it while preserving the OME XML string and it seems to work pretty<br>
> well. I paste it at the end of this mail.<br>
><br>
> Is this behaviour to add colormap to each plane a feature or a bug of<br>
> SCIFIO ? If it is a bug should I report it to SCIFIO or you guys take<br>
> care of it ?<br>
><br>
> -------------------------<br>
> %load_ext autoreload<br>
> %autoreload 2<br>
><br>
> import os<br>
> import gc<br>
><br>
> # Just load tifffile.py from somewhere<br>
> from <a href="http://sktracker.io" target="_blank">sktracker.io</a> import TiffFile, imsave<br>
><br>
> data_path = "/home/hadim/Documents/phd/data/test"<br>
><br>
> for root, dirs, files in os.walk(data_path):<br>
>     for f in files:<br>
>         if f.endswith('ome.tif'):<br>
>             fname = os.path.join(root, f)<br>
>             print(fname)<br>
>             tf = TiffFile(fname)<br>
>             p = tf.pages[0]<br>
><br>
>             new_path = os.path.join(os.path.dirname(fname), "fixed",<br>
> os.path.basename(fname))<br>
>             if not os.path.isdir(os.path.join(os.path.dirname(fname), "fixed")):<br>
>                 os.makedirs(os.path.join(os.path.dirname(fname), "fixed"))<br>
><br>
>             imsave(new_path, tf.asarray(),<br>
> description=p.tags['image_description'].value)<br>
>             del p<br>
>             del tf<br>
>             gc.collect()<br>
> -------------------------------<br>
_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk">ome-devel@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a><br>
</div></div></blockquote></div><br></div>