Stack to Hyperstack batch macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Stack to Hyperstack batch macro

ky730
Hi,

I just started to learn writing ij macros.

I'm trying to create a macro to batch process "Stack to Hyperstack" on all the files in a folder, using the following command:

run("Stack to Hyperstack...", "order=xyczt(default) channels=3 slices=7 frames=?? display=Color");

You notice "frame=??". This is the part that I don't know how to work on. The problem is the files (as stacks) are made up of 3 channels, 7 z-slices, BUT with different number of time frames. Is there a way that I could write a command to automatically count the number of frames (i.e. divide the total number of slices by 21 (3 channels x 7 z-slices))?

Thanks very much.

Kian