How to load an image

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

How to load an image

Shawn-62
Hi, everyone, I try to display an image in a Plugin Frame. Could I do it?
Or, do I have to define an ImageWindow? My code is like following,

ImagePlus img=IJ.openImage(Path);
draw();

However, I have an error, which is "cannot find symbol
symbol  : method draw()", although I already import Java.awt.Frame.

Anyone can give me an idea how to display an image in a Plugin Frame?

Thank you very much
Reply | Threaded
Open this post in threaded view
|

Antwort: How to load an image

Joachim Wesner
Shawn,

the draw you are likely refering to is a method of your ImagePlus, i.e. you
need

img.draw();

(Otherwise "it" also "will not know" WHAT to draw!)


Please lookup such details in the API docs:

http://rsbweb.nih.gov/ij/developer/api/index.html


Did you read the tutorials and take a look at the sample code!?:

http://www.imagingbook.com/fileadmin/goodies/ijtutorial/tutorial171.pdf


Sincerely

JW




                                                                           
             Shawn                                                        
             <shawnz@BOCKOPTRO                                            
             NICS.CA>                                                   An
             Gesendet von:              [hidden email]                
             ImageJ Interest                                         Kopie
             Group                                                        
             <[hidden email].                                       Thema
             GOV>                       How to load an image              
                                                                           
                                                                           
             25.06.2008 15:27                                              
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




Hi, everyone, I try to display an image in a Plugin Frame. Could I do it?
Or, do I have to define an ImageWindow? My code is like following,

ImagePlus img=IJ.openImage(Path);
draw();

However, I have an error, which is "cannot find symbol
symbol  : method draw()", although I already import Java.awt.Frame.

Anyone can give me an idea how to display an image in a Plugin Frame?

Thank you very much



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: How to load an image

Shawn-62
Hi, Joachim,

Sorry to bug you again. I try img.draw(), but the image doesn't show on the
Plugin Frame. I am wondering why.

_Shawn
----- Original Message -----
From: "Joachim Wesner" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, June 25, 2008 9:55 AM
Subject: Antwort: How to load an image


> Shawn,
>
> the draw you are likely refering to is a method of your ImagePlus, i.e.
> you
> need
>
> img.draw();
>
> (Otherwise "it" also "will not know" WHAT to draw!)
>
>
> Please lookup such details in the API docs:
>
> http://rsbweb.nih.gov/ij/developer/api/index.html
>
>
> Did you read the tutorials and take a look at the sample code!?:
>
> http://www.imagingbook.com/fileadmin/goodies/ijtutorial/tutorial171.pdf
>
>
> Sincerely
>
> JW
>
>
>
>
>
>             Shawn
>             <shawnz@BOCKOPTRO
>             NICS.CA>                                                   An
>             Gesendet von:              [hidden email]
>             ImageJ Interest                                         Kopie
>             Group
>             <[hidden email].                                       Thema
>             GOV>                       How to load an image
>
>
>             25.06.2008 15:27
>
>
>              Bitte antworten
>                    an
>              ImageJ Interest
>                   Group
>             <[hidden email].
>                   GOV>
>
>
>
>
>
>
> Hi, everyone, I try to display an image in a Plugin Frame. Could I do it?
> Or, do I have to define an ImageWindow? My code is like following,
>
> ImagePlus img=IJ.openImage(Path);
> draw();
>
> However, I have an error, which is "cannot find symbol
> symbol  : method draw()", although I already import Java.awt.Frame.
>
> Anyone can give me an idea how to display an image in a Plugin Frame?
>
> Thank you very much
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>