If I use the Wand Tool on a thresholded image, which Mode (legacy, 4-connected, 8-connected) is used by default? I changed the Wand Tool mode for a thresholded image, but the contour drawn didn't seem to change, so I thought maybe it's being ignored. (I know that the Tolerance field is ignored when the image is thresholded.)
Thanks, Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Neil,
the Wand uses the mode set in its preferences (legacy, 4-connected, 8-connected) also for thresholded images. You will easily see the difference between 4-connected and 8-connected when selecting a one-pixel wide line running at an arbitrary angle (not along x or y). You also see the difference when two particles are barely touching such that the closest pixels only have one common corner point. The 'legacy' mode usually behaves like 8-connected (there may be exceptions; I don't remember exactly - it's a long time since I worked on this). You can see the difference between 8-connected and legacy if you have a particle with an inner hole: Click at the left side of the inner hole, "8-connected" will select the particle including the hole, "legacy" will select the hole (non-thresholded area). As far as I can say, "Analyze Particles" is always 8-connected. Michael ________________________________________________________________ On Jul 29, 2014, at 00:11, Neil Fazel wrote: > If I use the Wand Tool on a thresholded image, which Mode (legacy, 4-connected, 8-connected) is used by default? I changed the Wand Tool mode for a thresholded image, but the contour drawn didn't seem to change, so I thought maybe it's being ignored. (I know that the Tolerance field is ignored when the image is thresholded.) > > Thanks, > Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Neil Fazel
Hi Neil,
you have encountered a common problem for 16-bit and float (32-bit) images: When thresholding, the 'red' display is based on updating the 8-bit LUT, thus it has only 8 bits accuracy. The Wand uses the exact pixel values (full accuracy), so you will see a difference between the display and the selection of the Wand. The way out would be completely rewriting how the threshold is displayed. Unfortunately, this goes rather deep into the basic structure of ImageJ (ImageProcessor level), it would be a lot of work. I thought about it for a while, but there is a very problem that it could break existing plugins or macros. So I fear that you have to live with this problem. Michael ________________________________________________________________ On Jul 29, 2014, at 00:11, Neil Fazel wrote: > If I use the Wand Tool on a thresholded image, which Mode (legacy, 4-connected, 8-connected) is used by default? I changed the Wand Tool mode for a thresholded image, but the contour drawn didn't seem to change, so I thought maybe it's being ignored. (I know that the Tolerance field is ignored when the image is thresholded.) > > Thanks, > Neil > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Neil Fazel
Thanks, Michael. I get it now. What I don't understand is why this precision mismatch only shows up occasionally. The two images I previously attached, were both very similar 32-bit images. The Wand Tool contour in one of them traced the thresholded region closely. In the other, the contour was a few pixels inside the thresholded region.
Best regards, Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On Tuesday 29 Jul 2014 21:59:48 you wrote:
> Thanks, Michael. I get it now. What I don't understand is why this precision > mismatch only shows up occasionally. The two images I previously attached, > were both very similar 32-bit images. The Wand Tool contour in one of them > traced the thresholded region closely. In the other, the contour was a few > pixels inside the thresholded region. "Similar" does not imply that the LUT has the same boundaries in both images, as these are perhaps determined from the image greyscale range. You could go through the image pixel by pixel and threshold each one based on the exact threshold value you require, without using the thresholder applet. Hope it helps Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |