When I run this code, I get the following error message:
Your image contains only one frame and thus can't be processed.
Note: Eventually in your image frames and slices are incorrectly defined.
Check this at Image > Hyperstacks > Reorder Hyperstack.
If you have many slices that should be frames, change slices and frames here and run macro again.
Could you please tell me which step went wrong? How can I fix it? Looking forward to your reply, thank you!