We recently got a project where we would like to import ROIs into ImageJ from an svg file containing closed paths.
First I though it would be simple to just parse the svg and append each segment to make a polygon ROI, however there are also cubic bezier curves involved.
Most of what I found on the net involves creating svg paths, but not going from SVG to something else, like a sampled point ROI.
So before I embark on a quest to make a semi-generic SVG to ImageJ ROI reader, I would like to know if anyone has experimented with this.
Finally, the ROIs will inherit the stroke color of the SVG unless it’s black, wherefore it will default to the stored preference color. Names will also be assigned if an ID tag exists.
I have seen lots of tools for converting B-Splines to Bezier Curves but not the other way, so for now I am going to leave that behind. The bezier curves will simply be sampled an arbitrary number of times.
Lastly, @ctrueden: is there something shipped with Fiji to parse XML files? Thanks for everyone’s support!