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

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

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

ganeshjothikumar
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.
Reply | Threaded
Open this post in threaded view
|

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

Volker Baecker
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
--