Posted by
Garvalov, Boyan on
Nov 19, 2012; 2:17pm
URL: http://imagej.273.s1.nabble.com/Incorrect-density-values-when-quantifying-PNG-files-exported-from-GIMP-tp5000862p5000868.html
Dear Gabriel,
Thanks a lot for the reply! It is nice to get one from you, I have already read many helpful pieces of advice on ImageJ from you and have used a number of your plugins for years! Thank you for all that!
I am aware of the limitations of lossy formats like jpeg and the pitfalls of film scanning and quantification, and I included a couple of comments on that below. But I just wanted to note that the question still remains why in contrast to other programs ImageJ doesn't show and quantify correctly PNG files exported from GIMP. This may be an important question, as millions of people use GIMP and PNG is the default export format in that program. So it may be that there are many people who are quantifying GIMP-generated PNG files with ImageJ and getting substantially incorrect results without realizing it. I myself realized it by accident, after I had already prepared a quantification graph for publication. And the errors, as I mentioned, can be quite substantial, orders of magnitude higher than the differences between a tif scan and a jpg scan.
Regarding scanning, we do pay careful attention to getting the scanner settings right (which is not the default situation), but the scanner itself is not calibrated. Following your tip I found some instructions on how to do that at
http://imagej.nih.gov/ij/docs/examples/calibration/ and will look into the possibility of doing this for our lab scanner.
Regarding the information loss when saving to jpeg, I have found that it can definitely be an issue e.g. when thresholding and analysing thresholded particles, so there using tif there is better. On the other hand, tests I did with films scanned using our scanner indicate that the differences in density between a tiff scan and a jpeg scan are in the order of 0.01-0.12%. We so far found this to be an acceptable compromise between information preservation and file size.
Best wishes
Boyan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr. Boyan K. Garvalov
Institut für Neuropathologie
Justus-Liebig-Universität
Aulweg 123, 3. OG
35392 Giessen
Tel: (+49-641) 99-41401
Fax: (+49-641) 99-41689
E-mail:
[hidden email]
Website:
http://www.ukgm.de/ugm_2/deu/ugi_npa/5424.html~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Ursprüngliche Nachricht-----
Von: ImageJ Interest Group [mailto:
[hidden email]] Im Auftrag von Gabriel Landini
Gesendet: 19 November, 2012 13:40
An:
[hidden email]
Betreff: Re: Incorrect density values when quantifying PNG files exported from GIMP
On Monday 19 Nov 2012 11:24:04 you wrote:
> I have been using ImageJ to quantify some images (western blot scans,
> grayscale). The blots were first scanned in JPG format, then were
> rotated and cropped using GIMP and finally exported from GIMP either
> in JPG or PNG format.
Jpegs (unless the non-lossy version) for imaging are a very bad idea. There are non-lossy formats (like TIFF or PNG) that retain all the scanned information.
If you load the jpeg to rotate it and save it again in jpeg, you get more lost information. Once saved in jpeg, there is no benefit in converting to PNG, as the loss of information already took place.
It would be better to scan directly to TIFF, then load in IJ and use the
Image>Transform menu entry to rotate it (no need for the GIMP step).
It is also necessary to calibrate the scanner too, otherwise the meaning of the darkness in terms of optical density units is unknown.
Regards
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html