Posted by
Krs5 on
URL: http://imagej.273.s1.nabble.com/Need-help-with-running-a-macro-with-hyperstacks-in-a-folder-tp5021652p5021653.html
Assuming that the name of your image is TS2_546_1 #1 you can try:
title = getTitle();
run ("Stack to Images");
run ("Tile");
selectWindow("c:1/6 t:1/2 - "+title); close();
selectWindow("c:2/6 t:1/2 - "+title); close();
etc
Best wishes
Kees
Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
www.le.ac.uk/advanced-imaging-facility
-----Original Message-----
From: scoopwarr <
[hidden email]>
Sent: 16 January 2019 12:08
To:
[hidden email]
Subject: Need help with running a macro with hyperstacks in a folder.
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--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html