[Rimagej-commits] r16 - in pkg/RImageJ: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Oct 31 18:03:49 CET 2010
Author: phgrosjean
Date: 2010-10-31 18:03:49 +0100 (Sun, 31 Oct 2010)
New Revision: 16
Added:
pkg/RImageJ/R/ImageJ.R
pkg/RImageJ/man/ImageJ.Rd
Modified:
pkg/RImageJ/DESCRIPTION
pkg/RImageJ/NAMESPACE
pkg/RImageJ/R/onLoad.R
pkg/RImageJ/man/IJ.Rd
pkg/RImageJ/man/IJWindowManager.Rd
pkg/RImageJ/man/RImageJ-package.Rd
Log:
Added an ImageJ object that instanciates ImageJ's menus and toolbar (full access of all ImageJ's functions from within R)!
Modified: pkg/RImageJ/DESCRIPTION
===================================================================
--- pkg/RImageJ/DESCRIPTION 2010-10-24 15:28:00 UTC (rev 15)
+++ pkg/RImageJ/DESCRIPTION 2010-10-31 17:03:49 UTC (rev 16)
@@ -1,5 +1,5 @@
Package: RImageJ
-Version: 0.3-144
+Version: 0.2-146
Date: 2010-10-24
Title: R bindings for ImageJ
Author: Romain Francois, Philippe Grosjean with contributions from Paul Murrell
Modified: pkg/RImageJ/NAMESPACE
===================================================================
--- pkg/RImageJ/NAMESPACE 2010-10-24 15:28:00 UTC (rev 15)
+++ pkg/RImageJ/NAMESPACE 2010-10-31 17:03:49 UTC (rev 16)
@@ -2,7 +2,8 @@
importFrom("grDevices", "as.raster")
-export(IJ,
+export(ImageJ,
+ IJ,
IJWindowManager)
S3method("as.raster", "jobjRef")
Added: pkg/RImageJ/R/ImageJ.R
===================================================================
--- pkg/RImageJ/R/ImageJ.R (rev 0)
+++ pkg/RImageJ/R/ImageJ.R 2010-10-31 17:03:49 UTC (rev 16)
@@ -0,0 +1,4 @@
+delayedAssign("ImageJ", {
+ res <- try(.jnew("ij/ImageJ"), silent = TRUE)
+ if (inherits(res, "try-error")) NULL else res
+})
Modified: pkg/RImageJ/R/onLoad.R
===================================================================
--- pkg/RImageJ/R/onLoad.R 2010-10-24 15:28:00 UTC (rev 15)
+++ pkg/RImageJ/R/onLoad.R 2010-10-31 17:03:49 UTC (rev 16)
@@ -9,5 +9,11 @@
# rely on genericDialog still do not work. The only solution I [PhG]
# have found until now is to start RImageJ from within JGR.
.jpackage(pkgname)
+ if (!is.null(ImageJ)) ImageJ$show()
packageStartupMessage("ImageJ version: ", IJ$getVersion(), "\n", sep = "")
}
+
+.onUnload <- function (libpath) {
+ ## Close ImageJ
+ try(ImageJ$quit(), silent = TRUE)
+}
Modified: pkg/RImageJ/man/IJ.Rd
===================================================================
--- pkg/RImageJ/man/IJ.Rd 2010-10-24 15:28:00 UTC (rev 15)
+++ pkg/RImageJ/man/IJ.Rd 2010-10-31 17:03:49 UTC (rev 16)
@@ -32,7 +32,7 @@
\url{http://rsbweb.nih.gov/ij/developer/macro/macros.html}
}
-\seealso{ \code{\link{IJWindowManager}} }
+\seealso{ \code{\link{ImageJ}}, \code{\link{IJWindowManager}} }
\examples{
\dontrun{
Modified: pkg/RImageJ/man/IJWindowManager.Rd
===================================================================
--- pkg/RImageJ/man/IJWindowManager.Rd 2010-10-24 15:28:00 UTC (rev 15)
+++ pkg/RImageJ/man/IJWindowManager.Rd 2010-10-31 17:03:49 UTC (rev 16)
@@ -23,7 +23,7 @@
\url{http://rsbweb.nih.gov/ij/developer/api/ij/WindowManager.html}
}
-\seealso{ \code{\link{IJ}} }
+\seealso{ \code{\link{ImageJ}}, \code{\link{IJ}} }
\examples{
\dontrun{
Added: pkg/RImageJ/man/ImageJ.Rd
===================================================================
--- pkg/RImageJ/man/ImageJ.Rd (rev 0)
+++ pkg/RImageJ/man/ImageJ.Rd 2010-10-31 17:03:49 UTC (rev 16)
@@ -0,0 +1,52 @@
+\name{ImageJ}
+\alias{ImageJ}
+\docType{data}
+
+\title{ ImageJ object }
+
+\description{
+ This represents an object of class \code{ij.ImageJ} created when the RImageJ
+ package is loaded.
+}
+
+\usage{
+ImageJ
+}
+
+\format{
+ This is a Java object, instance of the class \code{ij.ImageJ}, that is created
+ when the package is loaded. In case the ImageJ instance cannot be created,
+ it contains \code{NULL} (for example, when AWT cannot be instanciated on this
+ machine). In this case, you still can access a few \code{IJ} methods that do
+ not require AWT, but most of ImageJ features will not be available. You should
+ rather make sure ImageJ can be fully instanciated on your machine, and you can
+ test this by looking if the ImageJ object contains something else than
+ \code{NULL}.
+}
+
+\details{
+ The ImageJ routines are loaded within R, and all theirs features are
+ accessible through the menus and toolbar. Many other aspects of ImageJ can be
+ manipulated from within R, by using the associated methods (see
+ \code{.jmethods(ImageJ)}).
+}
+
+\references{
+ The Java documentation of the class IJ:
+ \url{http://rsbweb.nih.gov/ij/developer/api/ij/ImageJ.html}
+}
+
+\seealso{ \code{\link{IJ}}, \code{\link{IJWindowManager}} }
+
+\examples{
+\dontrun{
+## Normally the ImageJ toolbar and menus are visible, but you can hide them
+ImageJ$hide()
+ImageJ$isVisible()
+## Redisplay them again
+ImageJ$show()
+ImageJ$isVisible()
+}
+}
+
+\keyword{utilities}
Modified: pkg/RImageJ/man/RImageJ-package.Rd
===================================================================
--- pkg/RImageJ/man/RImageJ-package.Rd 2010-10-24 15:28:00 UTC (rev 15)
+++ pkg/RImageJ/man/RImageJ-package.Rd 2010-10-31 17:03:49 UTC (rev 16)
@@ -13,14 +13,14 @@
\tabular{ll}{
Package: \tab RImageJ\cr
Type: \tab Package\cr
- Version: \tab 0.2-145\cr
- Date: \tab 2010-10-11\cr
+ Version: \tab 0.2-146\cr
+ Date: \tab 2010-10-24\cr
License: \tab GPL-3\cr
LazyLoad: \tab yes\cr
}
- On certain Mac OS X systems (like Snow Leopard), it is impossible to start AWT
+ On certain Mac OS X versions (like Snow Leopard), it is impossible to start AWT
from rJava started from R.app or from the terminal. Since ImageJ depends on
AWT, it will not run. The solution is to use R and RImageJ from within JGR
\url{http://www.rforge.net/JGR/}.
More information about the Rimagej-commits
mailing list