Login  Register

ImageJ2 size issue with File.openAsString

Posted by Pierre1981 on Aug 18, 2014; 1:54pm
URL: http://imagej.273.s1.nabble.com/ImageJ2-size-issue-with-File-openAsString-tp5009253.html

Hello,

I encounter a different behavior with ImageJ 1.48 and Fiji latest update when reading text files:

**************************
        Two_column_array = File.openAsString("myfilename.txt");

        rows=split(Two_column_array, "\n");

        print(rows.length);

        }
**************************

With ImageJ 1.48 I get "n" (which is the right answer) and with ImageJ2 I get "n+1", from the exact same file, which is quite a problem if you want to use this information in a loop or other...

Anyone for a fix?
Thanks in advance!

Kind regards,
Pierre