I tried to use the RImageJROI
package from David C Sterratt to transfer multiple ROIs
into R and convert them to Spatstat
.
This is a minimal example of my R-code
library(RImageJROI)
ROI = read.ijzip("path/ROI.zip")
spat.ROI = ij2spatstat(ROI)
Reading the zip-file works well but when I run the converting command I get the following error:
Error in conv.fun(k, window = window, unitname = unitname, scale = scale, : object 'out' not found
Attached there is a file for creating a ROI.zip
-file which causes the error after processing it in ImageJ
with:
run("Analyze Particles...", "add");
roiManager("Save", "Path\\Roi.zip");
Is there a way to get RImageJROI
working, am I missing something obvious, or does anyone know another solution for my project?
You can use Bio7 for that with has special methods to transfer different ImageJ ROI's and image data to R.
Some methods where especially designed for spatstat after a great spatstat tutorial on the R conference in 2015.
Here a link to some ImageJ spatstat notes and simple scripts:
http://bio7.org/?p=2618
https://github.com/Bio7/Bio7_Workshop
Here some video tutorials to transfer ROI data:
3D Point Pattern: https://youtu.be/DmfSASgJa_g
Line Segments: https://youtu.be/EPan7kibYpo
Polygons: https://youtu.be/bS_2ejOt7Tg
Point Patterns: https://youtu.be/7t5V2o8jFJw
Particle Measurments: https://youtu.be/7t5V2o8jFJw
Georeferenced Polygons (which can be converted to spatstat objects):
https://youtu.be/P2NflfBB2Tg