Ossim reports error/warnings reading 12 bits/pixel tif generated with extended options gdal:co:NBITS=12
Mantis Issue 1034, reported by mgrizonnet, assigned to jmichel, created: 2015-04-22
Error happen with multispectral image only and using the gdal options to generate tiff file coded on 12 bits (see example below).
The error/warnings is reported in the console and seems to come from ossimTiffTileSource.Note that it does not block the execution of the application.
ossimTiffTileSource cannot determine scalar type of input tif.
Steps to reproduce:
~/projets/otb/bin/release/OTB/bin/otbcli_ExtractROI -in IMG_PHR1A_MS_201205021030191_SEN_558815101-002_R1C1.JP2 -out "/home/grizonnetm/temporary/tile_trunk.tif?&gdal:co:NBITS=12" uint16 -sizex 3000 -sizey 3000
~/projets/otb/bin/release/OTB/bin/otbcli_ReadImageInfo -in ~/temporary/tile_trunk.tif
Complete message in the console:
ossimTiffTileSource::open Error:
Cannot determine scalar type.
Trace dump follows:
image_file: /home/grizonnetm/temporary/tile_trunk.tif
samples_per_pixel: 4
bits_per_sample: 12
sample_format_unit: 1
min_sample_value: -nan
max_sample_value: -nan
null_sample_value: -nan
theNumberOfDirectories: 1
r0_is_full_res: 1
directory[0]
image width: 3000
image_length: 3000
read method: UNKNOWN
planar: 1
photometric: 1
tile_width: 256
tile_length: 256
ossimSource::print:
theEnableFlag: 1
theInitializedFlag: 0
ossimErrorStatusInterface::print
theErrorStatus: 0
theErrorStatus string: OSSIM_OK
ossimTiffTileSource::open Error:
Cannot determine scalar type.
Trace dump follows:
image_file: /home/grizonnetm/temporary/tile_trunk.tif
samples_per_pixel: 4
bits_per_sample: 12
sample_format_unit: 1
min_sample_value: -nan
max_sample_value: -nan
null_sample_value: -nan
theNumberOfDirectories: 1
r0_is_full_res: 1
directory[0]
image width: 3000
image_length: 3000
read method: UNKNOWN
planar: 1
photometric: 1
tile_width: 256
tile_length: 256
ossimSource::print:
theEnableFlag: 1
theInitializedFlag: 0
ossimErrorStatusInterface::print
theErrorStatus: 0
theErrorStatus string: OSSIM_OK
ossimTiffTileSource::open Error:
Cannot determine scalar type.
Trace dump follows:
image_file: /home/grizonnetm/temporary/tile_trunk.tif
samples_per_pixel: 4
bits_per_sample: 12
sample_format_unit: 1
min_sample_value: -nan
max_sample_value: -nan
null_sample_value: -nan
theNumberOfDirectories: 1
r0_is_full_res: 1
directory[0]
image width: 3000
image_length: 3000
read method: UNKNOWN
planar: 1
photometric: 1
tile_width: 256
tile_length: 256
ossimSource::print:
theEnableFlag: 1
theInitializedFlag: 0
ossimErrorStatusInterface::print
theErrorStatus: 0
theErrorStatus string: OSSIM_OK
ossimTiffTileSource::open Error:
Cannot determine scalar type.
Trace dump follows:
image_file: /home/grizonnetm/temporary/tile_trunk.tif
samples_per_pixel: 4
bits_per_sample: 12
sample_format_unit: 1
min_sample_value: -nan
max_sample_value: -nan
null_sample_value: -nan
theNumberOfDirectories: 1
r0_is_full_res: 1
directory[0]
image width: 3000
image_length: 3000
read method: UNKNOWN
planar: 1
photometric: 1
tile_width: 256
tile_length: 256
ossimSource::print:
theEnableFlag: 1
theInitializedFlag: 0
ossimErrorStatusInterface::print
theErrorStatus: 0
theErrorStatus string: OSSIM_OK