Planetary Data System (PDS) format is hard coded to 8-bit
Posted: Sat Oct 02, 2010 6:41 pm
This is a bug report. XnView always assumes that Planetary Data System (PDS) format images are in 8-bit format, rather than correctly reading the following line in a PDS file header:
SAMPLE_BITS = xx
where xx specifies the bit depth of the image (usually either 8-bit or 16-bit).
So, while it is extremely cool that XnView, when the "Display all image types" is checked under XnView's General options, will automatically display any files which are encoded in the Planetary Data System format (files with .IMG or .PDS extensions for example, the resulting displayed image is totally incorrect for 16-bit PDS images because a 16-bit PDS image file is being incorrectly read. Likewise, using XnView to convert 16-bit PDS images to another format such as TIFF results in a meaningless conversion since the original 16-bit image data is being incorrectly interpreted as 8-bit image data.
This presents a problem with Lunar Reconnaissance Orbiter (LRO) Narrow Angle Camera (NAC) images. These images are available in two formats. The raw Engineering Data Record (EDR) images are in companded 8-bit format. XnView has no problem converting these images into other formats since at present XnView assumes that all PDS images are in 8-bit format. The Calibrated Data Record (CDR) images have been decompanded by the LRO team and then converted into 16-bit format. This is where XnView runs into a problem since XnView does not look at the SAMPLE BITS file header line, as described above, in order to allow XnView to either properly display the image (by converting the 16-bit greyscale to 8-bit greyscale for display) or when converting the 16-bit greyscale to a TIFF image. Ideally XnView should offer the option to convert the 16-bit greyscale CDR image to another 16-bit file format such as a 16-bit TIFF image or to another 8-bit file format such as a 8-bit TIFF image.
The reason I would like this bug resolved is so that I can subsequently deconvolve 16-bit LRO CDR images, using deconvolution software, after first converting the 16-bit CDR images to either 16-bit TIFF or FITS images. NASA offers their NASAView program, but the Windows version of NASAView will not correctly display 16-bit PDS images. XnView is the only Windows product available which potentially can (if the above bug is fixed) either display 16-bit PDS images (after converting them on-the-fly to 8-bit in memory for display purposes) or convert them to other 16-bit image formats which the user can work with in image processing programs. Converting them to 16-bit TIFF format is a must. Also optionally converting them to 16-bit FITS format would be nice too.
In any event, getting XnView to properly handle 16-bit PDS images would open up a whole new world to Windows users who would love to work with 16-bit PDS images from a variety of NASA missions.
Best regards,
GoneToPlaid
SAMPLE_BITS = xx
where xx specifies the bit depth of the image (usually either 8-bit or 16-bit).
So, while it is extremely cool that XnView, when the "Display all image types" is checked under XnView's General options, will automatically display any files which are encoded in the Planetary Data System format (files with .IMG or .PDS extensions for example, the resulting displayed image is totally incorrect for 16-bit PDS images because a 16-bit PDS image file is being incorrectly read. Likewise, using XnView to convert 16-bit PDS images to another format such as TIFF results in a meaningless conversion since the original 16-bit image data is being incorrectly interpreted as 8-bit image data.
This presents a problem with Lunar Reconnaissance Orbiter (LRO) Narrow Angle Camera (NAC) images. These images are available in two formats. The raw Engineering Data Record (EDR) images are in companded 8-bit format. XnView has no problem converting these images into other formats since at present XnView assumes that all PDS images are in 8-bit format. The Calibrated Data Record (CDR) images have been decompanded by the LRO team and then converted into 16-bit format. This is where XnView runs into a problem since XnView does not look at the SAMPLE BITS file header line, as described above, in order to allow XnView to either properly display the image (by converting the 16-bit greyscale to 8-bit greyscale for display) or when converting the 16-bit greyscale to a TIFF image. Ideally XnView should offer the option to convert the 16-bit greyscale CDR image to another 16-bit file format such as a 16-bit TIFF image or to another 8-bit file format such as a 8-bit TIFF image.
The reason I would like this bug resolved is so that I can subsequently deconvolve 16-bit LRO CDR images, using deconvolution software, after first converting the 16-bit CDR images to either 16-bit TIFF or FITS images. NASA offers their NASAView program, but the Windows version of NASAView will not correctly display 16-bit PDS images. XnView is the only Windows product available which potentially can (if the above bug is fixed) either display 16-bit PDS images (after converting them on-the-fly to 8-bit in memory for display purposes) or convert them to other 16-bit image formats which the user can work with in image processing programs. Converting them to 16-bit TIFF format is a must. Also optionally converting them to 16-bit FITS format would be nice too.
In any event, getting XnView to properly handle 16-bit PDS images would open up a whole new world to Windows users who would love to work with 16-bit PDS images from a variety of NASA missions.
Best regards,
GoneToPlaid