Use ImageJ ROI files in Inkscape?

Post questions on how to use or achieve an effect in Inkscape.
avamk
Posts: 12
Joined: Fri Jul 27, 2012 12:42 am

Use ImageJ ROI files in Inkscape?

Postby avamk » Sat Aug 04, 2012 6:05 am

Hello,

As I try to migrate from ImageJ and Fiji to Inkscape, I am trying to find a way to open its own vector-based format files (*.roi) in Inkscape. These *.roi files are used for annotating images in ImageJ in the form of lines, polygons, etc.

The folks on the ImageJ IRC channel were not aware of a direct way to import *.roi files into Inkscape, and suggested I might have to write an ImageJ plugin to export *.roi to *.svg. However, I don't know any Java to write the plugin, so I would like to ask if anyone here has experience with ImageJ, and knows if there is a way to use *.roi in Inkscape???

BTW, I have uploaded a ZIP file containing example *.roi files in case that might be helpful in developing a solution.

Thank you very much!
Attachments
RoiSet.zip
Example *.roi files.
(963 Bytes) Downloaded 167 times

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Use ImageJ ROI files in Inkscape?

Postby chriswww » Mon Aug 06, 2012 9:49 am

You could try saving as PDF in Fiji and open it in inkscape.
inkscape converts pdf to vector on open. your mileage may vary depending on complexity of the drawing/diagram.

avamk
Posts: 12
Joined: Fri Jul 27, 2012 12:42 am

Re: Use ImageJ ROI files in Inkscape?

Postby avamk » Tue Aug 07, 2012 12:58 am

I tried saving it as PDF, but apparently ImageJ flattens the image, and no vector information is retained to be used in Inkscape... Thanks for the suggestion, though!

I may have to manually write an ImageJ/Fiji script to do this after all. Would I have to make it export to SVG, or are there easier formats that would work well with Inkscape? I ask because ImageJ does not come with XML or SVG libraries to export to such formats, so I will have to manually parse my objects in ImageJ into SVG XML format... In the meantime if anyone has other suggestions please let me know. Thanks!

dscho
Posts: 1
Joined: Tue Aug 07, 2012 1:05 am

Re: Use ImageJ ROI files in Inkscape?

Postby dscho » Tue Aug 07, 2012 1:11 am

I gave pretty detailed instructions how to write that plugin. Actually, I was almost writing the plugin down line by line: http://fiji.sc/cgi-bin/fiji-irc?times=p ... 801T161556

It should be very straight-forward for a C programmer to turn that conversation into a working plugin, and it should not even take half an hour to do that.

So I am a bit at a loss what more you want me to do to enable you to solve your problem.


Return to “Help with using Inkscape”