How can I call/execute an imageJ macro with R? -
i've written macro in imagej spits out data frame analyze in r. i'd love able have whole procedure work in r without having first run macro manually in imagej. macro prompts user input , output directories , it's thing. i'm thinking there must function in r allow me specify macro , input , output directories (i recode these variables in macro somehow take these arguments through r script?)
i gather can use system() command , found tantalizing clue somewhere else on web:
system("./javaapplicationstub directory file[i] -batch zmacro")
but not sure how implement (my macro utilizes batch processing part unnecessary).
here example run macro file "test.ijm" cl (in osx). wrap command in r (not tested). path macro file should full path, not relative path.
/applications/imagej/imagej.app/contents/macos/javaapplicationstub -batchpath /tmp/test.ijm
Comments
Post a Comment