nitfread not working Matlab2020a Windows 10

Is anybody else having trouble with the nitf functions in Matlab 2020a? Nothing seems to be working correctly, even with standard data sets for testing.

6 comentarios

Steven Lord
Steven Lord el 11 de Ag. de 2020
Can you clarify what "nothing seems to be working correctly" means?
  • Do you receive warning and/or error messages? If so the full and exact text of those messages (all the text displayed in orange and/or red in the Command Window) may be useful in determining what's going on and how to avoid the warning and/or error.
  • Does it do something different than what you expected? If so, what did it do and what did you expect it to do?
  • Did MATLAB crash? If so please send the crash log file (with a description of what you were running or doing in MATLAB when the crash occured) to Technical Support using the telephone icon in the upper-right corner of this page so we can investigate.
Shane Sullivan
Shane Sullivan el 11 de Ag. de 2020
The error is as follows, for multiple nitf files from all over, including standard reference nitfs from NGA (creator of format), of all different versions. Making sure to use versions 'supported' by matlab.
Error using *
Integers can only be combined with integers of the same class, or scalar doubles.
Error in nitfinfo>convertToLargeInt (line 225)
out = out + sscanf(in(ndigits - i + 1), '%d') * uint64(10)^(i - 1);
Error in nitfinfo>cleandata (line 206)
element = convertToLargeInt(element);
Error in nitfinfo (line 77)
nitf_metaOut.(fldname) = cleandata(nitf_meta(currElement).value, fldname);
Error in nitfread (line 44)
nitfMeta = nitfinfo(filename); % NITFINFO will check the file and the version
Error in testing (line 9)
data = nitfread(file)
Walter Roberson
Walter Roberson el 17 de Ag. de 2020
replace the %d with %ld
Shane Sullivan
Shane Sullivan el 19 de Ag. de 2020
Did not work Walter. Note, that is a Mathworks function so had to edit it outside of Matlab. Still same error except it has the %ld.
Kojiro Saito
Kojiro Saito el 19 de Ag. de 2020
@Shane
What your testing.m looks like? We need how you call nitfread function in your cusom codes.
It is literally an empty script that just has
ntftest = nitfread('FileName.ntf'); %Where filename is the correct file name, just removed long filename from here

Iniciar sesión para comentar.

 Respuesta aceptada

Shane Sullivan
Shane Sullivan el 20 de Ag. de 2020
I solved the issue. I edited the Mathworks .m file @ 'C:\Program Files\MATLAB\R2020a\toolbox\images\iptformats\nitfinfo.m
And replaced line 255 with (cast to unit64), hopefully Mathworks can fix this in the next update for everyone.
%out = out + sscanf(in(ndigits - i + 1), '%d') * uint64(10)^(i - 1);
out = out + uint64(sscanf(in(ndigits - i + 1), '%d')) * uint64(10)^(i - 1);

Más respuestas (0)

Categorías

Productos

Versión

R2020a

Preguntada:

el 11 de Ag. de 2020

Respondida:

el 20 de Ag. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by