Login  Register

Re: WindowManager.getCurrentImage().getProcessor().reset() not working

Posted by Volker Baecker on Oct 03, 2007; 5:58pm
URL: http://imagej.273.s1.nabble.com/WindowManager-getCurrentImage-getProcessor-reset-not-working-tp3698280p3698281.html

Hi Ganesh,
call snapshot directly after opening the image and before making any
changes.

WindowManager.getCurrentImage().getProcessor().snapshot()

The reset will restore the pixel data from the snapshot.

Volker
Ganesh Jothikumar a écrit :

> Hi All
>    
>           I have written a plugin wherin I open a image and am creating some ROIs pogramatically and drawing some circles over the image.. At some point I press a 'Reset" button and I want teh image to get back to the initial state when it was opened. The code on the reset button is as below
>    
>   WindowManager.getCurrentImage().getProcessor().reset()
>    
>   But unfortunately the image is not getting reset. There is no effect on the reset button. Please let me know what is the proble. Am I doing it teh right way. Or how else whould this be done. It would be gr8 if someone could help me in this.
>    
>   Thanks
>   ganesh
>
>        
> ---------------------------------
> Moody friends. Drama queens. Your life? Nope! - their life, your story.
>  Play Sims Stories at Yahoo! Games.
>

--
passerelle antivirus du campus CNRS de Montpellier
--