Commit 11a99c68 authored by rhaase's avatar rhaase

add lesson 3: feature extraction + ij macro

parent 91b8f888
//
// This program is our first example
//
// Author: Robert Haase, MPI-CBG,
// rhaase@mpi-cbg.de
// July 2015
print("Hello world");
// This program is our second example.
// It sums up two numbers.
//
// Usage:
// * Run it in FIJI (www.fiji.sc)
//
// Author: Robert Haase, MPI CBG,
// rhaase@extern.mpi-cbg.de
// July 2016
// initialise program
a = 1;
b = 2.5;
// run complicated algorithm
final_result = a + b;
print( final_result );
// initialise program
imageFilename = "blobs.gif";
open( imageFilename );
// get image statistics
getStatistics(area, mean, min, max, std);
// show results
print("The grey value ranges from " + min + " to " + max + ". ");
print("It has an average of " + mean + " +- " + std + ". ");
close();
// initialise program
foldername = "/Users/rhaase/temp/";
// get all files in the folder as list
list = getFileList( foldername );
// print out the list; item by item
for (i = 0; i < list.length; i++) {
filename = list[i];
print( filename );
}
// initialise program
imageFilename = "blobs.gif";
open( imageFilename );
// read image properties
width = getWidth();
height = getHeight();
getPixelSize(unit, pixelWidth, pixelHeight);
// show results
print("The image is " + width + " times " + height + " pixels wide");
print("Each pixels has a size of " + pixelWidth +
" times " + pixelHeight + " " + unit + "^2");
close();
// initialise program
firstname = "Robert";
lastname = "Haase";
// run complicated algorithm
name = firstname + " " + lastname;
// show the result
print("Hello " + name + "!");
start = 0;
end = 10;
// print numbers
for ( i = start; i < end; i++ ) {
if (i > 5) {
print(i);
}
}
// initialise program
a = 1;
b = 2.5;
// run complicated algorithm
c = a + b;
// show the result
print(c);
// initialise program
a = 5;
b = 3;
c = 8;
// execute algorithm
d = (a + b) / c;
// evaluate result
if (b > 0) {
if (a == 5) {
print("Yin");
}
else {
if (c < 5) {
}
}
if (d != 0) {
print("Yang");
}
}
Anne Esslinger, Alberti lab, MPI CBG
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment