Login  Register

Re: Antwort: Re: Setting "Data changed flag" from plugin/macro?

Posted by Wayne Rasband on Oct 24, 2006; 5:45pm
URL: http://imagej.273.s1.nabble.com/can-i-draw-cylinders-tp3701211p3701224.html

> Hi,
>
> YEP, that seems to be one. Thanx a lot! I will give it a try!
>
> Sometimes things can be very easy! This field somehow missed my
> attention, it also seems not to be mentioned in the plugin tutorial.
> There is the NO_CHANGES mask, but I need to also force newly
> created ImagePlus and Stacks to be saved!
>
> Is there a way to access this flag from a macro, too??

Run a command that sets it. Here is code that sets the changes flag but
leaves the image unchanged:

    makeRectangle(0, 0, 1, 1);
    run("Invert");
    run("Invert");

-wayne