I would like to read FITS file image data and display it like standard image using java and nom.tam.fits library. Right now I manage to read data into two dimensional array. In my case returned 4 dimensional array with size [1][1][1024][1024]. In this array last two dimensions is image data.
Fits fitsFile = new Fits(path);
ImageHDU imageHDU = (ImageHDU) fitsFile.readHDU();
StandardImageTiler tiler = imageHDU.getTiler();
float[][][][] tmp = (float[][][][]) tiler.getCompleteImage();
float[][] imgData = tmp[0][0];
This array contains float numbers like:
8.9243695E-5
7.172857E-5
5.233031E-5
3.137777E-5
-6.0740327E-5
3.137777E-5
-3.7215374E-5
-6.0740327E-5
9.2222035E-6
Do you have any idea how I can convert it to standard image (.img, .jpg, .png...)
There is example of FITS file converting to image in python http://www.astropy.org/astropy-tutorials/FITS-images.html