Display image from BufferedImage
I am creating a DICOM Viewer. Currently I am using Image, ImageIcon for displaying my image from dicom file. Please check my below code.
sourceImage = new SourceImage(attrList);
ImageIcon icon = null;
Image img = null;
BufferedImage buffImg = sourceImage.getBufferedImage();
img = buffImg;
icon = new ImageIcon(img);
JPanel imagePanel = new JPanel();
JLabel lbl = new JLabel(icon);
Now I want to display the image using JAI. Is it possible? I can get BufferedImage from sourceImage.getBufferedImage(); API. Using BufferedImage is it possible to display the image by using JAI apis? Please help.
Thanks and Regards