質問

I'm trying to make an ImageJ plugin that generates a stack of masks based on a selection in each frame in an active stack.

To do that, I need to clear the mask and save it when the frame in the stack changed. I don't see any event options available on the API for ImageStack; how would I trigger a sequence of steps when the stack frame is changed? Is there an event to do this?

役に立ちましたか?

解決

The event options are implemented in the ImagePlus class, not in the ImageStack.

Your plugin should implement the ImageListener interface. In its imageUpdated() method, you should be able to get the current slice number and react accordingly.

Use the static method ImagePlus.addImageListener(this) to add your plugin as an ImageListener.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top