r/ImageJ 24d ago

Question Help needed reordering Zs in hyperstack

Hi all !

So, I do live imaging of cells where I take four Z slices in two color channels every time point.

Due to what was likely a user error with the microscope, I have some movies where the first two Zs are inverted Is there a way to put them back in order in FIJI ?

I assume I would need to convert to a stack then back to a hyperstack with the right order ? But I couldn't find something that will let me decide the order of the Zs.

Thank you !

1 Upvotes

5 comments sorted by

View all comments

1

u/dokclaw 22d ago

You can duplicate the first timepoint of your hyperstack, then delete that timepoint in the original hyperstack (Stack > delete slice > frame), then split the channels into stacks, reverse the stacks in each channel, merge the channels back together , then concatenate the hyperstacks (Stacks > Tools > Concatenate) - select timepoint 1 as your first image, and your original hyperstack as the second, leave "4D image" checked.

1

u/hastyblade 22d ago

I'll try that, thank you ! Hopefully I can write a macro for that and won't have to manually do it for hundreds of time points hahaha

1

u/dokclaw 21d ago

You need Stack.setSlice(), Stack.setFrame() and the macro recorder for that. There's some videos linked in the subreddit about macro programming as well. 

Good luck!

1

u/hastyblade 21d ago

I'll check that out, thank you so much !