Hello everyone,
During image review at high magnification I need to apply threshold. At the time I have "interpolate zoomed images" option turned on. The threshold seems to be working off the original non-interpolated image rather than the current view. To work around I re-size the images and then apply the threshold but this is very inconvenient. I'd appreciate any input or ideas on how to solve this with a macro or any other way. Regards, Maciej Rudzinski |
> Hello everyone,
> > During image review at high magnification I need to apply threshold. At the time I have "interpolate zoomed images" option turned on. The threshold seems to be working off the original non-interpolated image rather than the current view. To work around I re-size the images and then apply the threshold but this is very inconvenient. > > I'd appreciate any input or ideas on how to solve this with a macro or any other way. You can use a macro something like this: run("Capture Image"); run("8-bit"); setAutoThreshold("Otsu"); run("Convert to Mask"); It uses the Plugins>Utilities>Capture Image command to create an interpolated version of the image, then converts it to 8-bits, sets the threshold and applies it. Use setAutoThreshold("Otsu dark") if the image has a dark background. "Otsu" can be replaced with any of the 15 thresholding methods available in ImageJ 1.42 or later. -wayne |
In reply to this post by Maciej Rudzinski
Hi Maciej,
in my view there is no way to improve this: If you zoom in, interpolation is only for display, but the image data are still the original pixels. If you threshold these data, a pixel can be only red or gray. You can't have a pixel that is partially thresholded. For all subsequent operations, such as 'Analyze Particles', a pixel can be inside the thresholded area or outside, nothing in between. There is no way to have an information like "The upper 1/5 of the pixel are thresholded". After all, a pixel is by definition the smallest entity in an image. So your solution of Adjust Size with interpolation is the only way to get what you want. Michael _______________________________________________________________________ On Sat, December 19, 2009 17:59, Maciej Rudzinski wrote: > Hello everyone, > > During image review at high magnification I need to apply threshold. At > the time I have "interpolate zoomed images" option turned on. The > threshold seems to be working off the original non-interpolated image > rather than the current view. To work around I re-size the images and then > apply the threshold but this is very inconvenient. > > > I'd appreciate any input or ideas on how to solve this with a macro or any > other way. > > Regards, > > Maciej Rudzinski > |
In reply to this post by Wayne Rasband
Wayne,
Many thanks! I'll follow you suggestion. Regards, Maciej ----- Original Message ----- From: "Wayne Rasband" <[hidden email]> To: [hidden email] Sent: Saturday, December 19, 2009 8:09:42 PM GMT -08:00 US/Canada Pacific Subject: Re: Threshold on interpolated zoomed view > Hello everyone, > > During image review at high magnification I need to apply threshold. At the time I have "interpolate zoomed images" option turned on. The threshold seems to be working off the original non-interpolated image rather than the current view. To work around I re-size the images and then apply the threshold but this is very inconvenient. > > I'd appreciate any input or ideas on how to solve this with a macro or any other way. You can use a macro something like this: run("Capture Image"); run("8-bit"); setAutoThreshold("Otsu"); run("Convert to Mask"); It uses the Plugins>Utilities>Capture Image command to create an interpolated version of the image, then converts it to 8-bits, sets the threshold and applies it. Use setAutoThreshold("Otsu dark") if the image has a dark background. "Otsu" can be replaced with any of the 15 thresholding methods available in ImageJ 1.42 or later. -wayne |
In reply to this post by Michael Schmid
Michael,
Thank you for your inputs. Regards, Maciej R. ----- Original Message ----- From: "Michael Schmid" <[hidden email]> To: [hidden email] Sent: Sunday, December 20, 2009 12:30:07 PM GMT -08:00 US/Canada Pacific Subject: Re: Threshold on interpolated zoomed view Hi Maciej, in my view there is no way to improve this: If you zoom in, interpolation is only for display, but the image data are still the original pixels. If you threshold these data, a pixel can be only red or gray. You can't have a pixel that is partially thresholded. For all subsequent operations, such as 'Analyze Particles', a pixel can be inside the thresholded area or outside, nothing in between. There is no way to have an information like "The upper 1/5 of the pixel are thresholded". After all, a pixel is by definition the smallest entity in an image. So your solution of Adjust Size with interpolation is the only way to get what you want. Michael _______________________________________________________________________ On Sat, December 19, 2009 17:59, Maciej Rudzinski wrote: > Hello everyone, > > During image review at high magnification I need to apply threshold. At > the time I have "interpolate zoomed images" option turned on. The > threshold seems to be working off the original non-interpolated image > rather than the current view. To work around I re-size the images and then > apply the threshold but this is very inconvenient. > > > I'd appreciate any input or ideas on how to solve this with a macro or any > other way. > > Regards, > > Maciej Rudzinski > |
Free forum by Nabble | Edit this page |