ij-macro-programming-workshop

Previous            Solution            Next

Exercise 14.01 - Open related files

Aim:

The folder images/14 contains a number of images of cells. The images come in pairs belonging together. One channel contains the dapi-staining the other the rhodamine.

Let the user select a dapi-image. The macro should then open the dapi image and the corresponding rhodamine image.

Useful commands:

Your code starts after this line

// replace this comment by your code
path = File.directory;
imageDAPI = File.name;
imageRHOD = replace(/*replace this comment by your code*/);
// replace this comment by your code

Your code ends before this line

The code below is for automatically checking the result. Please ignore it!

ok = (nImages == 2);
ok = ok && (isOpen(imageDAPI));
ok = ok && (isOpen(imageRHOD));
if (ok)
	showMessage("That's right. Great, you did it!");
else 
	showMessage("Your result is wrong! Please check your macro and try again!");

Previous            Solution            Next