Login  Register

Need help with running a macro with hyperstacks in a folder.

Posted by Faizul on Jan 16, 2019; 12:08pm
URL: http://imagej.273.s1.nabble.com/Need-help-with-running-a-macro-with-hyperstacks-in-a-folder-tp5021652.html

I am very new to ImageJ so I am really sorry if this is common knowledge that
I am not aware of but basically I have a hyperstack that I unstack to
images. I want to close certain images because I only need 4 out of 12
images from the hyperstack.

I run this macro (below) and it works fine for one image but if I try to run
it on another, it doesn't let me.

run ("Stack to Images");
run ("Tile");
selectWindow("c:1/6 t:1/2 - TS2_546_1 #1");
close();
selectWindow("c:2/6 t:1/2 - TS2_546_1 #1");
close();
selectWindow("c:3/6 t:1/2 - TS2_546_1 #1");
close();
selectWindow("c:5/6 t:1/2 - TS2_546_1 #1");
close();
selectWindow("c:5/6 t:2/2 - TS2_546_1 #1");
close();
selectWindow("c:3/6 t:2/2 - TS2_546_1 #1");
close();
selectWindow("c:2/6 t:2/2 - TS2_546_1 #1");
close();
selectWindow("c:1/6 t:2/2 - TS2_546_1 #1");
close();

From what I understand is that the hyperstack ''TS2_546_1'' needs to be
changed to ''TS2_546_2'' and so on but I am not sure how to go about with
that. I am not looking to save these images because I have to run a plugin
to evaluate FRET.



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html