Monday, July 8, 2013

ImageJ multiple images to stack

File -> Import -> Image Sequence ->

Friday, July 5, 2013

Using Bash To Output To Screen And File At The Same Time

use "tee"

ex:
$ ls -al | tee blah.txt
 
source: http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/ 

Monday, July 1, 2013

Java classpath under linux

You use the -classpath argument. You can use either a relative or absolute path. What that means is you can use a path relative to your current directory, OR you can use an absolute path that starts at the root /.
Example:
bash$ java -classpath path/to/jar/file MyMainClass
In this example the main function is located in MyMainClass and would be included somewhere in the jar file.
For compiling you need to use javac
Example:
bash$ javac -classpath path/to/jar/file MyMainClass.java
You can also specify the classpath via the environment variable, follow this example:
bash$ export CLASSPATH="path/to/jar/file:path/tojar/file2"
bash$ javac MyMainClass.java
THE FIRST LINE MAY APPEAR IN THE .bashrc TO AUTOMATE THINGS A BIT

For any normally complex java project you should look for the ant script named build.xml


source: http://stackoverflow.com/questions/11459664/how-to-add-multiple-jar-files-in-classpath-in-linux

Thursday, June 13, 2013

Emacs comment / uncomment region

Add to config file:

(defun uncomment-region (beg end)
  "Uncomment a region of text"
  (interactive "r")
  (comment-region beg end -1));

(global-set-key "\C-c;"      'comment-region)
(global-set-key "\C-c:"      'uncomment-region)

Emacs overwrite selection

add the line:
(delete-selection-mode 1)
to the file 
~/emacs.d/init.el

Thursday, June 6, 2013

Open Office protect cells

* Select all cells with Ctrl+A
* Format->Cell->Cell Protection, unprotect [all]
* Select the cells to protect
* Format->Cell->Cell Protection, protect
* Tools->Protect Document->Sheet

ImageJ out of memory fix

Solution 1:

run from console:

./jre/bin/java -Xmx512m -jar ij.jar 

for getting 512MB (for example). (Source: http://imagejdocu.tudor.lu/doku.php?id=faq:technical:how_do_i_increase_the_memory_in_imagej)

Solution 2:

 edit the

/usr/bin/imagej

run script OR find it with

$ whereis imagej

then modify the line

declare -i default_mem=768

with the desired memory in MB. Notice limitations depending on total RAM and 32/64 bit system. (Source: http://ubuntuforums.org/archive/index.php/t-1236001.html)