[Zooimage-commits] r138 - pkg/zooimage/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue May 19 19:01:39 CEST 2009
Author: romain
Date: 2009-05-19 19:01:38 +0200 (Tue, 19 May 2009)
New Revision: 138
Modified:
pkg/zooimage/R/gui.r
Log:
using the ijplugin function to call imagej instaed of switching directories
Modified: pkg/zooimage/R/gui.r
===================================================================
--- pkg/zooimage/R/gui.r 2009-05-19 15:31:17 UTC (rev 137)
+++ pkg/zooimage/R/gui.r 2009-05-19 17:01:38 UTC (rev 138)
@@ -452,11 +452,8 @@
# Create ZID files, possibly processing imqges first
# TODO: get the list of all available processes and select it automatically from the ZIM file
defval <- "Scanner_Gray16"
- opts <- c("Scanner_Gray16",
- "Scanner_Color",
- "Macrophoto_Gray16",
- "Microscope_Color",
- "-- None --")
+ processes <- getProcessList()
+ opts <- c( processes, "-- None --")
# Then, show the dialog box
plugin <- modalAssistant(paste(getTemp("ZIname"), "process images"),
c("Process images with associated metadata (ZIM files)",
@@ -470,18 +467,7 @@
if (length(dir) == 0) return(invisible())
# Do we need to process the images with ImageJ?
if (plugin != "-- None --") {
- # Apparently, we have to be in the imagej directory for the command line
- # tools to work
- odir <- getwd()
- setwd(file.path(.path.package(package = "zooimage")[1], "imagej")); on.exit(setwd(odir))
- # This is the file that starts an ImageJ process from the command line
- #logClear()
- # TODO: use this to capture result, but we need to send feedback too
- #res <- system(paste('./zooimage ', plugin, ' "', dir, '"', sep = ""), intern = TRUE)
- res <- system(paste('./zooimage ', plugin, ' "', dir, '"', sep = ""))
- # report result returned by ImageJ
- # TODO: get a feedback of the analysis and display it in a progressbox
- #logProcess(res, show.log = TRUE)
+ ijplugin( dir, plugin = plugin )
}
# Finalize .zid files (and possibly also .zip files by updating their comment)
More information about the Zooimage-commits
mailing list