Bug #5485

CISS2ISIS: Incorrect pixel value mapping

Added by Klaus-Michael Aye 10 months ago. Updated 6 months ago.

Target version:
Software Version:
Test Reviewer:


Possibly due to the use of an un-initialized variable in the ciss2isis application, all pixel values 255 in the 16 bit ISS images are mapped to be of "High Saturation" (and therefore end up set to -32764 in the int16 data cube).

This is most likely caused by the line number 87 in the ciss2isis.cpp where it seems that the variable dataConversionType is queried uninitialized, and validMax is then set to 255.

if(dataConversionType != "Table") {   //Conversion Type is 12Bit or 8LSB, only save off overclocked pixels
    validMax = 255;

I found this by checking the pixel values of the original PDS raw data at the locations where the cube array had the pixels marked as HighSat. Those values were all = 255.
This results in seemingly random pixels being marked as HighSat, in the middle of rather dark image regions, as can be seen in the attached screenshot.

test.cub (2.09 MB) Justin Hulet, 2018-09-04 07:43 AM


#1 Updated by Klaus-Michael Aye 10 months ago

Attaching files seems to be broken, after uploading, your system suddenly says "Not Found" ? Please change to Github already! ;)

#2 Updated by Makayla Shepherd 10 months ago

  • Status changed from New to Acknowledged

#3 Updated by Justin Hulet 10 months ago

I can also attest to this bug. I followed a workaround advised in an older thread from 2014 that suggested deleltion of the "sample_type = sun_integer" line, with very scary results (see for yourself in the attachment). Another user posted a "safer" alternative to the above suggestion where one simply replaced "SUN_INTEGER" with "LSB_INTEGER"; the results are exactly the same as if you deleted the line (in the attached cub file, I used the line edit method rather than the deletion method.

#5 Updated by Klaus-Michael Aye 6 months ago

I copied this ticket over to Let's continue there.

Also available in: Atom PDF