[ome-users] Converting Accusoft jp2 into tif or other

Curtis Rueden ctrueden at wisc.edu
Wed Jan 16 20:30:04 GMT 2013


Hi Jacob,


> I have been trying to convert some files in the proprietary jpeg2000
> format used by PICTools medical into tiffs--is there some utility that
> can do this in batch method (all files in directory x)?

Here are two macros that might work for you:
https://github.com/openmicroscopy/bioformats/blob/v4.4.5/components/loci-plugins/utils/macros/recursiveTiffConvert.txt
https://github.com/openmicroscopy/bioformats/blob/v4.4.5/components/loci-plugins/utils/macros/batchTiffConvert.txt

I found both of these on the page at:
http://openmicroscopy.org/site/support/bio-formats/users/imagej


> These files are readable by fiji but not plain imagej

The reason you can read them in Fiji is because Fiji bundles the
Bio-Formats plugins, which can read JP2. To read them in plain ImageJ, you
would need to install Bio-Formats first, as described here:
http://openmicroscopy.org/site/support/bio-formats/users/imagej/installing.html


> I wrote a macro in fiji but which keeps prompting me with a dialog for
> every image.

Your macro looks OK to me. Using Plugins > Macros > Record I created a
similar macro (which uses the open() and saveAs() functions), and it works
without popping up any dialog boxes, even if the output image already
exists. So I am not sure what is causing your problem. That said, hopefully
one of the above macros will work for you and the issue will be moot.

Good luck,
Curtis


On Wed, Jan 16, 2013 at 11:18 AM, Keller, Jacob <kellerj at janelia.hhmi.org>wrote:

>  Dear List,
>
>  I have been trying to convert some files in the proprietary jpeg2000
> format used by PICTools medical into tiffs--is there some utility that can
> do this in batch method (all files in directory x)? These files are
> readable by fiji but not plain imagej, and I wrote a macro in fiji but
> which keeps prompting me with a dialog for every image. Here is the macro:
>
>
>    for (i=0; i<10; i++) {
>    for (j=0; j<10; j++) {
>    for (k=0; k<10; k++) {
> one = d2s(i, 0);
> two = d2s(j, 0);
> thr = d2s(k, 0);
> setBatchMode(true);
> filename = "C:\\Users\\Jacob\\Desktop\\**ZfishBrains\\SPC00_TM00"+one+**
> two+thr+"_ANG000_CM0_CHN00_**PH0.jp2";
> print(filename);
> open(filename);
> saveAs("Tiff", "X:\\Zebrafish_Brain_Images\\**
> tifs\\SPC00_TM00"+one+two+thr+**"_ANG000_CM0_CHN00_PH0x.tif");
> close();
>
>
>  Jacob
>
>  *******************************************
> Jacob Pearson Keller, PhD
> Postdoctoral Associate
> HHMI Janelia Farms Research Campus
> email: j-keller2 at northwestern.edu
> *******************************************
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20130116/19198fde/attachment.html>


More information about the ome-users mailing list