Posted by
Adrian Daerr on
Oct 24, 2007; 6:35pm
URL: http://imagej.273.s1.nabble.com/FFT-along-line-in-image-tp3698130p3698142.html
Herbie Gluender wrote:
> can't follow you with the precision issue. You can conveniently access
> all IJ data with the appropriate decimal precision by using IJ-macros.
> Furthermore, import and export of data to and from IJ is straightforward.
Well, if done naively, export of IJ data can be very treacherous. For
example, if you run the following macro:
newImage("Untitled", "32-bit Ramp", 400, 400, 1);
run("Divide...", "value=100");
makeLine(0, 100, 105, 100);
run("Plot Profile");
you get the plot
http://www.msc.univ-paris-diderot.fr/~daerr/tmp/profileIJ.pngThe surprise comes when you save the data to a file (using the Profile
Plot window's "save" button), and plot the data contained in that file
with your favorite program. Here is what you get:
http://www.msc.univ-paris-diderot.fr/~daerr/tmp/profile.pngThere is no reason for this, we have never seen a list in the process!
The rounding behaviour might be a good idea for the list window itself
to present data in a more easily readable format, but it leads to very
annoying surprises when saving. Who wants to save rounded data? Very few
people, very rarely, I suspect. If you bother saving a list, it is not
for printing, it is for post-treatment and data analysis most of the
time, and the corresponding programs don't care reading full precision data.
Whatever the rationale behind this, I consider it a bug, I have had the
bug-report on my TODO-list for a while. Here it is then :-)
Suggested bug-fix: apply rounding only to the list window. When saving,
revert to full precision.
best regards,
Adrian
--
http://www.msc.univ-paris-diderot.fr/~daerr/