How to program an interactive menu for ImageJ1?

Hej hej everyone,
I am looking for example scripts to see how one can link a menu interactively to a 3-D image. More specifically, I want the user to be able to scroll through the image and select ROIs. The ROIs should then be added to an ArrayList upon clicking a button in the menu that interacts with the image.
thanks for your help and best regards,
John