I seem to have run into a bug in Analyze -> Tool -> Save XY Coordinates... The Y coordinate that is saved, is incorrect. I have attached a .tiff snapshot showing the offending pixels.
This is what I did: 1) I found the maximum pixel value in my image (it was 126.491), 2) I set all but 2 pixels having this value to NaN (using Process -> Math -> Macro...), 3) the excluded 2 pixels are then thresholded in red in the snapshot and shown using the Pixel Inspection Tool to have Y coordinates 255 and 256. 4) When I saved this image in XYZ format, the 2 pixels with values 126.491 were saved with Y coordinates 293 and 294. The X coordinate was saved correctly to 269. I show the saved file in an emacs window in the snapshot displaying the rows for the 2 pixels in the top and bottom parts. I have uploaded to Dropbox the .txt file produced at the end of step 2 above: https://www.dropbox.com/s/b1428dgt1rbl8ow/5862%20MS%201%201%20S10K%20-%20PSL%20-%20full%20x-ray%20-%20550x550%20-%20thresholded.txt?dl=0 To reproduce: 1) download the file from Dropbox, 2) import as text image, 3) threshold using lower and upper threshold value set to 126.49; 2 pixels will turn red near the center; 4) then export the iimage in XYZ format using Analyze -> Tool -> Save XY Coordinates specifying NaN as background pixels. You'll find that the Y coordinates of the two thresholded pixels are saved incorrectly. Thanks, Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html save XYZ bug.tiff (1M) Download Attachment |
> On Jan 15, 2015, at 3:35 PM, Neil Fazel <[hidden email]> wrote:
> > I seem to have run into a bug in Analyze -> Tool -> Save XY Coordinates... The Y coordinate that is saved, is incorrect. I have attached a .tiff snapshot showing the offending pixels. > > This is what I did: > > 1) I found the maximum pixel value in my image (it was 126.491), > 2) I set all but 2 pixels having this value to NaN (using Process -> Math -> Macro...), > 3) the excluded 2 pixels are then thresholded in red in the snapshot and shown using the Pixel Inspection Tool to have Y coordinates 255 and 256. > 4) When I saved this image in XYZ format, the 2 pixels with values 126.491 were saved with Y coordinates 293 and 294. The X coordinate was saved correctly to 269. I show the saved file in an emacs window in the snapshot displaying the rows for the 2 pixels in the top and bottom parts. The Analyze>Tool>Save XY Coordinates… command will work as expected if you enable the “Invert y coordinates off (0 at top of image)” option in the dialog. -wayne > I have uploaded to Dropbox the .txt file produced at the end of step 2 above: > > https://www.dropbox.com/s/b1428dgt1rbl8ow/5862%20MS%201%201%20S10K%20-%20PSL%20-%20full%20x-ray%20-%20550x550%20-%20thresholded.txt?dl=0 > > To reproduce: > > 1) download the file from Dropbox, > 2) import as text image, > 3) threshold using lower and upper threshold value set to 126.49; 2 pixels will turn red near the center; > 4) then export the iimage in XYZ format using Analyze -> Tool -> Save XY Coordinates specifying NaN as background pixels. You'll find that the Y coordinates of the two thresholded pixels are saved incorrectly. > > Thanks, > Neil > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > <save XYZ bug.tiff> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Neil Fazel
Hi Wayne,
Thanks for the correction. I totally forgot that by default the coordinate origin used by the plugin (bottom left corner of the image) is different from default origin used by ImageJ (top left corner). Best regards, Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |