I am writing a Java plugin to create and edit a mask.
What I *think* I want to do is to overlay an existing mask on a STACK of registered images,
and then use the Overlay Brush Tool to edit it. When done, I want to extract the finished
product as an image. But, I'm having trouble understanding how to do this (or even if
what I want to do is feasible).
So - the environment is a stack of registered (float) images. There is an existing custom
overlay to display some line ROIs - these are controlled by an extended StackWindow which
tracks cursor movement with the SHIFT key down and redraws them as needed. Preliminarly experiments
indicate that this would not interfere with the proposed overlay I want to edit with the Overlay Brush tool.
If necessary, I can create a separate stack (without the extensions) for the overlay editing task.
I need to initialize the overlay used by the Overlay Brush Tool from an image (can I do that? how?)
I'd like to set the transparency and color of the overlay. (how? - from Java) Is it possible to interactively
modify the transparency on a global basis? (my experiments indicate that changing the color or transparency creates
a separate overlay object)
Finally, when done, I'd like to turn the resulting overlay into an Image. I probably want to convert this image
to Float, add it to my original stack (or replace the one that was there originally) and write it to a file.
I have an old program that did something similar - but the differences are big enough that I want to start from scratch and
do it right, this time.
So - the basic workflow is:
a) create stack of Float images, one of which is labelled as "mask"
b) create an overlay from the "mask" image, and display it at a given color/transparency
on the stack
c) edit the overlay (using Overlay Brush Tool)
d) create/replace the "mask" image in the stack with the overlay.
Any hints?
--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html