Romain Francois, Professional R Enthusiast - Tag - java - CommentsIndependant statistical/R consultant2013-03-24T15:53:22+01:00Romain Francoisurn:md5:2cdb21a695f56bfe2b31ee2133c51b42Dotclearraster images and RImageJ - Thomasurn:md5:ec388da568cbe39cb590f8397bead7be2010-10-26T09:08:47+02:00Thomas<p>Great!</p>
<p>Could you comment a bit on as.raster.jobjRef…<br />
using as.raster(image), I can get the array of rgb strings, is there a way to get integers directly or to convert it to pixmap format…</p>
<p>My interest is mostly in grey images, 8 and 16 bits</p>
<p>Thank you in adavnce,</p>
<p>Thomas</p>raster images and RImageJ - Romainurn:md5:9977b04fd0255dabb93959955f51544a2010-10-24T17:32:14+02:00Romain<p>I uploaded it to CRAN just now. It turns out "raster" was renamed "rasterImage", I updated the example in the documentation accordingly. See</p>
<pre> ?as.raster.jobjRef</pre>raster images and RImageJ - Thomasurn:md5:7e8745677860b1e0f921d6cd0505f8272010-10-24T16:47:03+02:00Thomas<p>next week, really?<br />
still waiting for it… <img src="/themes/default/smilies/smile.png" alt=":)" class="smiley" /></p>
<p>Just to let you know I'd really enjoy playing with that…</p>
<p>best,</p>
<p>Thomas</p>raster images and RImageJ - Romainurn:md5:de686ec6fdae4cb251b2d093f4bf5ce02010-10-10T19:47:48+02:00Romain<p>Hi,</p>
<p>This version of RImageJ has not been released yet. I should release it sometime next week.</p>
<p>Romain</p>raster images and RImageJ - Thomasurn:md5:392eee6dc0a34700cb3a267a367e3d112010-10-09T13:36:07+02:00Thomas<p>I tried this with R 2.11.1 on mac os 10.5.8 with JGR 1.7-2 without success...</p>
<p>raster() appears not be defined as a function? Was it finally not included in R 2.11?</p>
<p>Thank you in advance for your help.</p>Completion for java objects - Simon Urbanekurn:md5:5b69348f6c281e29bc1e50f7d03a8fb02009-08-20T16:11:09+02:00Simon Urbanek<p>This functionality is now part of rJava 0.6-4. Thanks, Romain!</p>using ImageJ from R: the RImageJ package - Romain Francoisurn:md5:edc9ed4079193c03e33eb05a941f6e8d2009-07-29T18:41:05+02:00Romain Francois<p>... at the moment, the only thing that the package does is create the IJ object, and then it is a case of looking at the methods of the <a href="http://rsbweb.nih.gov/ij/developer/api/ij/IJ.html" title="http://rsbweb.nih.gov/ij/developer/api/ij/IJ.html" rel="nofollow">IJ</a> class the way you did.</p>
<p>I would also describe myself as a casual ImageJ user and just though it was a bit more convenient for me to have it running at the R command line.</p>
<p>I have not though yet on how to use additional ImageJ plugins, I would probably start by looking at the Changing Location of Plugins Directory part of this <a href="http://rsbweb.nih.gov/ij/docs/menus/plugins.html" title="http://rsbweb.nih.gov/ij/docs/menus/plugins.html" rel="nofollow">page</a></p>
<p>Romain</p>using ImageJ from R: the RImageJ package - Brandon Whitcherurn:md5:4ea76b38096fe60c6fb01a40ec4a39172009-07-28T19:24:06+02:00Brandon Whitcher<p>Romain,</p>
<p>Is there a list of all available ImageJ functionality in the current version of this package? I cannot find this information in the current documentation. I have found additional functions that work via trial-and-error; e.g.,</p>
<p>IJ$run("RGB Color") # assuming "8-bit Color" gif<br />
IJ$run("Smooth")<br />
IJ$run("Add Noise")<br />
IJ$save("newfilename.gif")</p>
<p>However, it is unclear how to provide additional arguments when necessary; e.g.,</p>
<p>IJ$run("8-bit Color")</p>
<p>brings up a dialog box requesting an additional parameter. When I use the command</p>
<p>IJ$run("8-bit Color", "2")</p>
<p>the dialog box does not appear, but the second variable is ignored and the default value ("256") appears to be used.</p>
<p>Thanks in advance for your help.</p>
<p>Brandon</p>using ImageJ from R: the RImageJ package - Brandon Whitcherurn:md5:1edfcec3a44a8cb3c2151e25e80b43532009-07-28T18:39:08+02:00Brandon Whitcher<p>I have successfully installed RImageJ and run the example code. I am only a casual ImageJ user, but experienced R user. How can additional functionality, via ImageJ plugins, be accessed through this R package?</p>
<p>cheers...</p>
<p>Brandon</p>using ImageJ from R: the RImageJ package - Romain Francoisurn:md5:cbe34c5036aac5d21453bfcad52b54d42009-07-21T13:56:53+02:00Romain Francois<p>Great. The package is maintained in r-forge here:<br />
<a href="http://r-forge.r-project.org/projects/rimagej/" title="http://r-forge.r-project.org/projects/rimagej/" rel="nofollow">http://r-forge.r-project.org/projec...</a></p>
<p>If you have a login on r-forge, then please request to join the project.</p>
<p>Romain</p>using ImageJ from R: the RImageJ package - Dimiter Prodanovurn:md5:c273e215efe5729e1be038a602678eff2009-07-21T11:45:22+02:00Dimiter Prodanov<p>Hello Romain ,</p>
<p>I also have some code which integrates R and ImageJ but I am just a beginner in R so I think it worths combining our efforts. Where can I get the source of your plugin/inerface?</p>
<p>best regards,</p>
<p>Dimiter Prodanov</p>using ImageJ from R: the RImageJ package - Jean Thioulouseurn:md5:1239b3edd4f2116f16dbc8cb308a7ddb2009-07-20T16:37:15+02:00Jean Thioulouse<p>Yes indeed, it works with JGR.</p>
<p>Thanks</p>using ImageJ from R: the RImageJ package - Romain Francoisurn:md5:8ab92139c74e3d62f6fe12756ac7fb892009-07-20T14:11:01+02:00Romain Francois<p>For the first problem, I am not sure what is causing it, and do not have a mac to test it on. It might be worth asking the question on the sig for mac R users: <a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mac" title="https://stat.ethz.ch/mailman/listinfo/r-sig-mac" rel="nofollow">https://stat.ethz.ch/mailman/listin...</a></p>
<p>Have you tried within JGR ? It might make a difference since in that case the jvm is started first as opposed to started from R.</p>using ImageJ from R: the RImageJ package - Everett Ramerurn:md5:12a7dd5ac419141b02b0889045aa74252009-07-13T20:49:42+02:00Everett Ramer<p>I was able to get the demo script to work by replacing image = IJ$openImage( "google.gif" )<br />
with<br />
image = IJ$openImage( "myImage.jpg" )<br />
where myImage.jpg is a jpeg image I happen to have in the active R directory. I was unable to open "google.gif" directly in ImageJ. Perhaps IJ$openImage doesn't work with gif images.</p>using ImageJ from R: the RImageJ package - Everett Ramerurn:md5:2fb921dba6857bb137c3335cf0a362882009-07-13T20:36:42+02:00Everett Ramer<p>"Attempt to apply non function" when trying to execute an IJ function:<br />
(Windows XP, R 2.9.0, Java 6)</p>
<p>> library('RImageJ')<br />
> download.file( "<a href="http://www.google.fr/intl/en_en/images/logo.gif" title="http://www.google.fr/intl/en_en/images/logo.gif" rel="nofollow">http://www.google.fr/intl/en_en/ima...</a>", dest = "google.gif" )<br />
trying URL '<a href="http://www.google.fr/intl/en_en/images/logo.gif'" title="http://www.google.fr/intl/en_en/images/logo.gif'" rel="nofollow">http://www.google.fr/intl/en_en/ima...</a><br />
Content type 'image/gif' length 8558 bytes<br />
opened URL<br />
downloaded 8558 bytes</p>
<p>> image = IJ$openImage( "google.gif" )<br />
> image$show()<br />
Error: attempt to apply non-function<br />
> IJ$run( "8-bit" )<br />
NULL<br />
> IJ$run( "Invert" )<br />
NULL<br />
> image$close()<br />
Error: attempt to apply non-function</p>using ImageJ from R: the RImageJ package - Thomson Comerurn:md5:851f8f0a919deaefe69501b535c0887e2009-07-13T20:02:50+02:00Thomson Comer<p>I get the same error with a nearly identical configuration.</p>using ImageJ from R: the RImageJ package - Jean Thioulouseurn:md5:7296b8cfe9b5616436dfd1e60678d3492009-07-10T10:23:01+02:00Jean Thioulouse<p>Hello,</p>
<p>Trying to use RImageJ on MacOS 10.5.7, I get the error "Apple AWT Java VM was loaded on first thread -- can't start AWT." when trying to execute the example.</p>
<p>Any idea what it is ?</p>
<p>Thanks<br />
Jean</p>
<p>> library(RImageJ)#<br />
Le chargement a n'ecessit'e le package : rJava<br />
ImageJ version : 1.42n<br />
> download.file( "<a href="http://www.google.fr/intl/en_en/images/logo.gif" title="http://www.google.fr/intl/en_en/images/logo.gif" rel="nofollow">http://www.google.fr/intl/en_en/ima...</a>", dest = "google.gif" )<br />
essai de l'URL '<a href="http://www.google.fr/intl/en_en/images/logo.gif'" title="http://www.google.fr/intl/en_en/images/logo.gif'" rel="nofollow">http://www.google.fr/intl/en_en/ima...</a><br />
Content type 'image/gif' length 8558 bytes<br />
URL ouverte<br />
==================================================<br />
downloaded 8558 bytes</p>
<p>> image = IJ$openImage( "google.gif" )<br />
2009-07-10 10:14:34.924 R<a href="87902:60b" title="87902:60b" rel="nofollow">87902:60b</a> Apple AWT Java VM was loaded on first thread -- can't start AWT.<br />
> sessionInfo()<br />
R version 2.9.1 (2009-06-26)<br />
i386-apple-darwin8.11.1</p>
<p>locale:<br />
fr_FR/fr_FR/fr_FR/C/fr_FR/fr_FR</p>
<p>attached base packages:<br />
<a href="http://romainfrancois.blog.free.fr/index.php?post/2009/06/22/1" title="1" rel="nofollow">1</a> stats graphics grDevices utils datasets methods base</p>
<p>other attached packages:<br />
<a href="http://romainfrancois.blog.free.fr/index.php?post/2009/06/22/1" title="1" rel="nofollow">1</a> RImageJ_0.0-142 rJava_0.6-3</p>
<p>loaded via a namespace (and not attached):<br />
<a href="http://romainfrancois.blog.free.fr/index.php?post/2009/06/22/1" title="1" rel="nofollow">1</a> grid_2.9.1 lattice_0.17-25<br />
></p>with semantics for java objects in rJava - Romain Francoisurn:md5:04a30c913e8c4e55bc753f74b7dce3962009-06-18T17:15:42+02:00Romain Francois<p>This has been integrated in rJava 0.6-4, <a href="http://www.rforge.net/rJava/" title="http://www.rforge.net/rJava/" rel="nofollow">http://www.rforge.net/rJava/</a></p>Build java software with "R CMD build" and ant - Romain Francoisurn:md5:1d3f1ad0faacc054130a4f8e8969cd462009-04-10T15:56:12+02:00Romain Francois<p>Not sure why this happens. Which version of R is this ? I have used R-devel when writing the post.</p>Build java software with "R CMD build" and ant - Nickurn:md5:afd04a491f62cd4f6504c1c53c0de4702009-04-09T19:35:47+02:00Nick<p>Many thanks for sharing this! However, I seem to have run across a problem during package creation.... any ideas on this!? After running "R CMD build ", I get the following output:</p>
<ul>
<li>checking for file 'helloJavaWorld/DESCRIPTION' ... OK</li>
<li>preparing 'helloJavaWorld':</li>
<li>checking DESCRIPTION meta-information ... OK</li>
<li>cleaning src</li>
<li>installing the package to re-build vignettes</li>
<li>Installing *source* package 'helloJavaWorld' ...
<ul>
<li>libs</li>
</ul></li>
</ul>
<p>ant clean<br />
Buildfile: build.xml</p>
<p>clean:</p>
<p>BUILD SUCCESSFUL<br />
Total time: 0 seconds<br />
cp: cannot stat `*.so': No such file or directory<br />
ERROR: compilation failed for package 'helloJavaWorld'<br />
<br />** Removing '/tmp/Rinst1682516141/helloJavaWorld'<br />
ERROR<br />
Installation failed.<br />
Removing '/tmp/Rinst1682516141'</p>