Get the 'changes' flag of an image in a macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get the 'changes' flag of an image in a macro

Tiago Ferreira
Sorry if this will sound silly:

I am trying to detect in a macro if changes have been done to an image.

Using built-in macro functions I know I can use ' setOption("Changes",boolean)'
to SET the 'changes' status of an image, but I don't know how to GET it...

I guess I would need to read the value of  'changes' in class ij.ImagePlus...

Does anyone have an idea on how to obtain this in a macro?

T.
Reply | Threaded
Open this post in threaded view
|

Re: Get the 'changes' flag of an image in a macro

Wayne Rasband
On Apr 18, 2009, at 6:30 PM, Tiago Ferreira wrote:

> Sorry if this will sound silly:
>
> I am trying to detect in a macro if changes have been done to an  
> image.
>
> Using built-in macro functions I know I can use ' setOption
> ("Changes",boolean)'
> to SET the 'changes' status of an image, but I don't know how to  
> GET it...
>
> I guess I would need to read the value of  'changes' in class  
> ij.ImagePlus...
>
> Does anyone have an idea on how to obtain this in a macro?

The latest 1.42m daily build has a is("changes") macro function that  
can be used obtain the value of the 'changes' flag.

-wayne