0
返回一個Image對象
我已經使用construstor創建的ImagePlus對象, ImagePlus(java.lang.String中pathOrURL)是否永遠的getImage ImageJ中
imp=new ImagePlus(imgFile.getPath());
現在我想要得到的圖像對象(java中。 awt.Image)通過調用getImage方法。
img=imp.getImage();
jLabel2.setIcon(new ImageIcon(imgFile.getPath()));
jPanel3.validate();
但是當我這樣做,我沒有得到任何回報。如果我期望使用getImage()方法,是否必須使用構造函數(ImagePlus(java.lang.String title, java.awt.Image img))
,這將創建一個對象與圖像對象ImagePlus對象。
img是一個圖像對象,imgFile是一個文件,我使用openDialog – bl1nd5urv1v0r