User Tools

Site Tools


documents:100922imagej_cluster

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documents:100922imagej_cluster [2010/10/01 14:34] kotadocuments:100922imagej_cluster [2016/05/24 12:46] (current) – external edit 127.0.0.1
Line 7: Line 7:
   * headless.jar   * headless.jar
     * This .jar file manages to work with ImageJ headlessly.      * This .jar file manages to work with ImageJ headlessly. 
-    * download headless.jar file from [[http://sourceforge.net/projects/imageja|http://sourceforge.net/projects/imageja]]. Place it in the current directory /home/miura/test +    * accessible by /g/almf/software/ij/headless.jar from within EMBL network.  
 +      * Otherwise, download headless.jar file from [[http://sourceforge.net/projects/imageja|http://sourceforge.net/projects/imageja]]. Place it somewhere you could access.  
   * blobs.tif   * blobs.tif
-    * You could download this by Normal ImageJ (with-head, or GUI). [File -> Open Samples -> Blob]. Save it in the current directory /home/miura/test+    * You could download this by Normal ImageJ (with-head, or GUI). [File -> Open Samples -> Blob]. Save it in the current directory /home/<your username>/test
   * headlesstest.ijm   * headlesstest.ijm
-    * You must created this ImageJ macro file and save it in the current directory. See below.  +    * You must write an ImageJ macro file and save it in the current directory. See below.  
   * testpbs.sh   * testpbs.sh
-    * You must created this ImageJ macro file and save it in the current directory. See below.  +    * You must write a shell script and save it in the current directory. See below.  
    
 **Write an ImageJ macro** that does the actual processing. **Write an ImageJ macro** that does the actual processing.
Line 33: Line 34:
 #PBS -N TestPBS #PBS -N TestPBS
 #PBS -l walltime=1:00:00 #PBS -l walltime=1:00:00
-/usr/struct/bin/java -classpath headless.jar:/struct/software/linux/imagej-1.42/ij.jarr -Djava.awt.headless=true ij.ImageJ -batch headlesstest.ijm /home/miura/test/blobs.tif+/usr/struct/bin/java -classpath /g/almf/software/ij/headless.jar:/g/almf/software/ij/ij-1.44h.jar -Djava.awt.headless=true ij.ImageJ -batch /home/<your user name>/test/headlesstest.ijm /home/<your user name>/test/blobs.tif
 </code> </code>
 Some more explanation: Some more explanation:
Line 60: Line 61:
 Using plugin is a bit tricky. In case of desktop ImageJ, what you need to install plugin is simply drug and drop .class or .jar files to plugins folder within imageJ folder. With headless mode, you need to do the following: Using plugin is a bit tricky. In case of desktop ImageJ, what you need to install plugin is simply drug and drop .class or .jar files to plugins folder within imageJ folder. With headless mode, you need to do the following:
   * explicitly state where the plugins folder resides by setting -ijpath.    * explicitly state where the plugins folder resides by setting -ijpath. 
-  * all plugins must not be in jar. They all have to be class files.  +  * <del>all plugins must not be in jar. They all have to be class files.</del>  
-    * if you only have jar file, then you should open it by zip archiver and extract all class files. File hierarchy should be maintained within the plugin folder.  +    * <del>if you only have jar file, then you should open it by zip archiver and extract all class files. File hierarchy should be maintained within the plugin folder.</del>  
-... so the java command would look like this:+... so the java command would look like this: Macro file "headlesstest2.ijm" is supposed to be at $HOME and images to be processed are under ~/test, and headlesstest2.ijm takes this path as an argument.  
 <code> <code>
-/usr/struct/bin/java -cp /home/miura/test/headless.jar:/home/miura/test/ij-1.44h.jar -Djava.awt.headless=true ij.ImageJ -ijpath /home/miura/test -batch headlesstest2.ijm /home/miura/test+cd ~ 
 + 
 +/usr/struct/bin/java -cp /g/almf/software/ij/headless.jar:/g/almf/software/ij/ij-1.44h.jar -Djava.awt.headless=true ij.ImageJ -ijpath /g/almf/software/ij -batch headlesstest2.ijm /home/miura/test
 </code> </code>
-and the plugins folder resides within /home/miura/test.+and the plugins folder resides within /g/almf/software/ij/ in the above case. If you need to add a plugin, please ask Kota 
 ===== Spreading Jobs with qsub ===== ===== Spreading Jobs with qsub =====
  
Line 158: Line 163:
  
 </sxh> </sxh>
- 
- 
- 
- 
 ===== Automated Script (Only from within EMBL network) ===== ===== Automated Script (Only from within EMBL network) =====
  
-Automated Script is available, with which you need to change only two lines defining the ImageJ macro that you want to apply to images in a folder+Automated Script is available in the ALMF server (clust5fullp.sh). With this script, you only need to invoke the script with two arguments.  
 +  * arg[0]: full path to the directory containing image/stack files 
 +  * arg[1]: name of the imageJ macro you want to apply. 
  
-[[http://cmci.embl.de/documents/100922imagej_cluster#jobarray_generator|clust5fulllpath.sh]] 
- 
-lines to be changed are 
 <code> <code>
-    64  IJMACROPATH="/g/almf/miura/pub" +sh /g/almf/software/ij/clust5fullp.sh <path>/<to>/<ImageContainingFolder> <Name of ImageJ Macro>
-... +
-    67  IJMACRONAME="headlesstest3.ijm"+
 </code> </code>
-Path to the macro and name of the macro file should be replaced according to your situation.  
  
-rename and save the script, and do+argument <path>/<to>/<ImageContainingFolder> is full path to the folder where images / stacks are stored. 
 + 
 +argument <Name of ImageJ Macro> is the file name of ImageJ macro, and **this file should be placed under /g/almf/software/ij**. 
 + 
 +For example, your command could be
 <code> <code>
-sh <renamedFile>.sh <path>/<to>/<ImageContainingFolder>+sh /g/almf/software/ij/clust5fullp.sh /g/almf/miura/testsmalls headlesstest3.ijm
 </code> </code>
  
-argument <path>/<to>/<ImageContainingFolder> is full path to the folder where images stacks are stored.+This script will create two new folders in the directory same as where the image directory is (*_job and *_proc). Processed images or stacks will be saved under *_proc. \\ 
 +Besides, so-called job reports (text files containing output messages) will appear in your current directory where you executed the command.  
 + 
 +The script could be viewed in the link below: [[http://cmci.embl.de/documents/100922imagej_cluster#jobarray_generator|clust5fulllpath.sh]]
  
 ===== Example Scripts ===== ===== Example Scripts =====
documents/100922imagej_cluster.1285943672.txt.gz · Last modified: 2016/05/24 12:46 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki