Hi, I have some binary mask images, and I need to get the coordinates and
size of a box surrounding the part of interest. Basically the images are all black, except for a clump of white pixels somewhere in the image, which I call the "target". So what I could do is open each image in ImageJ, move the cursor to the left most pixel of the "target", then the right side, top side, and bottom side, writing down the pixel location for each of these. Then I can find the center of the target, and the tolerances for the bounding box, side to side and top to bottom. However, this is very tedious, and I have many such images. Is there some automated way of getting these coordinates, either using ImageJ or something else? Thanks for any suggestions. -jmd |
> Hi, I have some binary mask images, and I need to get the
> coordinates and size of a box surrounding the part of > interest. Basically the images are all black, except for a > clump of white pixels somewhere in the image, which I call > the "target". > > So what I could do is open each image in ImageJ, move the > cursor to the left most pixel of the "target", then the > right side, top side, and bottom side, writing down the > pixel location for each of these. Then I can find the center > of the target, and the tolerances for the bounding box, side > to side and top to bottom. > > However, this is very tedious, and I have many such images. > Is there some automated way of getting these coordinates, > either using ImageJ or something else? Thanks for any > suggestions. 1. Check "Bounding Rectangle" in Analyze>Set Measurements 2. Click inside the "target" with the wand tool 3. Press 'm' (Analyze>Measure) -wayne |
In reply to this post by Josh Doe
Thanks Wayne, that works perfectly. I'm greedy though, and want to
extrapolate this to batch process a couple hundred images. I've thought of a few ways to do this: 1) Is there any sort of a "select by color" tool? If so, I could simply select any white portions, and then Analyze->Measure. In this case, is there some way to pull off the values using a macro or something, so that I can batch this? 2) I found that "Analyze Particles" takes care of the first part of the problem from (1). I'd still need some way to pull off the measured values. Since I have some non-contiguous regions, I get multiple "particles". I could just then do some math to find the min and max dimensions from all measured particles, to come up with one bounding box that encloses all of them. 3) Write a program. I did a quick m-file for Matlab that does the job, but takes a VERY long time, even for just one image. Besides, I don't like to rely on non-free software. :) Thanks for any suggestions. -jmd On Thu, 23 Mar 2006 09:44:07 -0500, Wayne Rasband <[hidden email]> wrote: >> Hi, I have some binary mask images, and I need to get the >> coordinates and size of a box surrounding the part of >> interest. Basically the images are all black, except for a >> clump of white pixels somewhere in the image, which I call >> the "target". >> >> So what I could do is open each image in ImageJ, move the >> cursor to the left most pixel of the "target", then the >> right side, top side, and bottom side, writing down the >> pixel location for each of these. Then I can find the center >> of the target, and the tolerances for the bounding box, side >> to side and top to bottom. >> >> However, this is very tedious, and I have many such images. >> Is there some automated way of getting these coordinates, >> either using ImageJ or something else? Thanks for any >> suggestions. > > 1. Check "Bounding Rectangle" in Analyze>Set Measurements > 2. Click inside the "target" with the wand tool > 3. Press 'm' (Analyze>Measure) > >-wayne |
Hi,
I've been trying to do this on my own, but can't seem to combine all the right elements. What I need to do is the following: 1. Pick the nuclei from a widefield fluorescence image visualized with an antibody that is very clean for only the nuclei (I have no problem doing this by itself). 2. Determine the "intensity" of staining for each nuclei (this I'm having trouble figuring out). 3. Graph the intensity versus number of nuclei to see the distribution. I would appreciate any help. Thanks, Robert -- Robert E. Peterson, Ph.D. - Assistant Professor Confocal & Multiphoton Imaging Facility Director UNC-Chapel Hill Neuroscience Center 105 Mason Farm Road, NRB Rm. 7109A Campus Box 7250 Chapel Hill, NC 27599 (919) 966-5807 |
Robert Peterson schrieb:
> 2. Determine the "intensity" of staining for each nuclei (this I'm > having trouble figuring out). If you just need the intensity in arbitrary units, then you should be fine with the sum of all grey values detected for each of your nuclei. If you actually want to count the number of dyes, you would have to do some sort of calibration. Of course, background subtraction is mandatory for quantitative measurements in either case. Fading might be a problem too. Thomas |
In reply to this post by Josh Doe
Josh,
If your image is not a binary mask already, use something like: setThreshold(140, 255); run("Threshold", "thresholded remaining black"); to convert to a mask. then the ConvertMaskToCompositeROI macro can create a single ROI outlining all the (BLACK) particles and add it to the ROI manager. Analyze->Measure is able to calculate a bounding box on the composite ROI If this isn't what you wanted, there's also the MaskToSelectionMacros http://rsb.info.nih.gov/ij/macros/MaskToSelectionMacros.txt Jon On Thu, 23 Mar 2006 13:31:22 -0500, Josh Doe <[hidden email]> wrote: >Thanks Wayne, that works perfectly. I'm greedy though, and want to >extrapolate this to batch process a couple hundred images. I've thought of a >few ways to do this: > >1) Is there any sort of a "select by color" tool? If so, I could simply >select any white portions, and then Analyze->Measure. In this case, is there >some way to pull off the values using a macro or something, so that I can >batch this? > >2) I found that "Analyze Particles" takes care of the first part of the >problem from (1). I'd still need some way to pull off the measured values. >Since I have some non-contiguous regions, I get multiple "particles". I >could just then do some math to find the min and max dimensions from all >measured particles, to come up with one bounding box that encloses all of them. > >3) Write a program. I did a quick m-file for Matlab that does the job, but >takes a VERY long time, even for just one image. Besides, I don't like to >rely on non-free software. :) > >Thanks for any suggestions. > >-jmd > >On Thu, 23 Mar 2006 09:44:07 -0500, Wayne Rasband <[hidden email]> wrote: > >>> Hi, I have some binary mask images, and I need to get the >>> coordinates and size of a box surrounding the part of >>> interest. Basically the images are all black, except for a >>> clump of white pixels somewhere in the image, which I call >>> the "target". >>> >>> So what I could do is open each image in ImageJ, move the >>> cursor to the left most pixel of the "target", then the >>> right side, top side, and bottom side, writing down the >>> pixel location for each of these. Then I can find the center >>> of the target, and the tolerances for the bounding box, side >>> to side and top to bottom. >>> >>> However, this is very tedious, and I have many such images. >>> Is there some automated way of getting these coordinates, >>> either using ImageJ or something else? Thanks for any >>> suggestions. >> >> 1. Check "Bounding Rectangle" in Analyze>Set Measurements >> 2. Click inside the "target" with the wand tool >> 3. Press 'm' (Analyze>Measure) >> >>-wayne >======================================================================== |
Free forum by Nabble | Edit this page |