measuring grayscale of objects in a plate

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

measuring grayscale of objects in a plate

JDing
I have a 48 well plate (6x8) with a corn seed inside each well. I'm trying to get a "results" readout of the grayscale color of each seed, in order (so I want the grayscale for the seed in well A1, then for the seed in B1, ... , then in F8).

I already have some of it figured out. I use the threshold function to identify where the seeds are within a scan of the entire plate, then use "analyze particles" to put the outline of the seeds in the ROI manager, then revert to the original image (so that there's color) and use the ROI manager to measure each individual seed. The only problem is that the ROIs aren't in the correct order of the wells.

I have a saved ROI set that has an ROI corresponding to each well, in order. So if I could select each ROI/well one at a time, and threshold/analyze/measure only the space within that one cell, then revert back to the original image and repeat with the next ROI/well, then all the measurements would be in order at the end. This seems like a relatively simple solution. However, I can't find a way to do this with the functions in ImageJ. Is there a way to do it?

Hopefully I explained the problem clearly. If not, please let me know and I'll try to clarify. Thank you for your help!

JDing
Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

karo03
Hi,

if I understand you well, switch on in "Set Measurements" the Center of Mass add. to your other features. The results sorted by Y and X or vice versa will deliver a wished order.

Karsten

Am 26.07.2013 um 21:10 schrieb JDing <[hidden email]>:

> I have a 48 well plate (6x8) with a corn seed inside each well. I'm trying to
> get a "results" readout of the grayscale color of each seed, in order (so I
> want the grayscale for the seed in well A1, then for the seed in B1, ... ,
> then in F8).
>
> I already have some of it figured out. I use the threshold function to
> identify where the seeds are within a scan of the entire plate, then use
> "analyze particles" to put the outline of the seeds in the ROI manager, then
> revert to the original image (so that there's color) and use the ROI manager
> to measure each individual seed. The only problem is that the ROIs aren't in
> the correct order of the wells.
>
> I have a saved ROI set that has an ROI corresponding to each well, in order.
> So /if/ I could select each ROI/well one at a time, and
> threshold/analyze/measure only the space within that one cell, then revert
> back to the original image and repeat with the next ROI/well, then all the
> measurements would be in order at the end. This seems like a relatively
> simple solution. However, I can't find a way to do this with the functions
> in ImageJ. Is there a way to do it?
>
> Hopefully I explained the problem clearly. If not, please let me know and
> I'll try to clarify. Thank you for your help!
>
> JDing
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Karsten
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

JDing
You understand me correctly, but your suggestion doesn't seem to work. I added "center of mass" to the measurements and it didn't put the wells in order. Here is my explanation: even though the sides of my plate are aligned with the x and y axes, the seeds themselves vary in their position within the well (and their size). So the seed in A1 could be centered at coordinate (50, 50), while B1 is at (100, 49), and C1 is at (150, 49.5), etc. In this case, if ImageJ measured/listed in order of increasing y-coordinate (the default for my computer), it would list B1 and C1 before A1. So this method doesn't work well in real practice.

Thank you for your consideration, though.

JDing
Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

karo03
Assuming your wells build a chequerboard and the image is aligned with it, the coordinates of your ROIs will allow the ordering of the results. Of course the actual list of result entries depend on the sequence of your ROIs in the ROI manager rspw. on the first found pixel per region.

Possibly you have to load the results into Excel or R for the ordering in x and y.

Regards
Karsten

Am 26.07.2013 um 22:55 schrieb JDing <[hidden email]>:

> You understand me correctly, but your suggestion doesn't seem to work. I
> added "center of mass" to the measurements and it didn't put the wells in
> order. Here is my explanation: even though the sides of my plate are aligned
> with the x and y axes, the seeds themselves vary in their position within
> the well (and their size). So the seed in A1 could be centered at coordinate
> (50, 50), while B1 is at (100, 49), and C1 is at (150, 49.5), etc. In this
> case, if ImageJ measured/listed in order of increasing y-coordinate (the
> default for my computer), it would list B1 and C1 before A1. So this method
> doesn't work well in real practice.
>
> Thank you for your consideration, though.
>
> JDing
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004163.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Karsten
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

JDing
I am confused about what "your ROIs" means. Do you mean 1) the ROI set that I have saved, which has one ROI for each of the 48 wells, or 2) the ROIs that I get after I threshold/analyze particles/save to ROI manager?

If you mean (1), my saved ROI set has ROIs that includes each well in its entirety. However, since seeds take up only a fraction of the well, and since seeds can be in many different shapes and sizes and places within the well, my ROI set doesn't actually help very much in identifying the seeds themselves. In my original post, I suggested that if I could apply the threshold/analyze particle functions to only the ROI and not the entire image, then I could apply the process 48 times, one time for each ROI/well, which would then be in order, since my ROI set is already in order, and I do this in the order of my ROI set. However, I do not know how to apply the functions to only the ROI, so I can't use this method (unless you know how to do it).

If you mean (2), the seeds vary in position within each well. So even though in theory, if I tell the program to list in increasing y-coordinate values and then in increasing x-coordinate values, I should get the wells/seeds in order, this is not the case in practice. This is what I tried to explain in my previous post. Unless I am misunderstanding you, in which case you would have to explain your method in slightly more detail.

Thanks

JDing


On Fri, Jul 26, 2013 at 4:09 PM, Karsten Rodenacker-3 [via ImageJ] <[hidden email]> wrote:
Assuming your wells build a chequerboard and the image is aligned with it, the coordinates of your ROIs will allow the ordering of the results. Of course the actual list of result entries depend on the sequence of your ROIs in the ROI manager rspw. on the first found pixel per region.

Possibly you have to load the results into Excel or R for the ordering in x and y.

Regards
Karsten

Am 26.07.2013 um 22:55 schrieb JDing <[hidden email]>:

> You understand me correctly, but your suggestion doesn't seem to work. I
> added "center of mass" to the measurements and it didn't put the wells in
> order. Here is my explanation: even though the sides of my plate are aligned
> with the x and y axes, the seeds themselves vary in their position within
> the well (and their size). So the seed in A1 could be centered at coordinate
> (50, 50), while B1 is at (100, 49), and C1 is at (150, 49.5), etc. In this
> case, if ImageJ measured/listed in order of increasing y-coordinate (the
> default for my computer), it would list B1 and C1 before A1. So this method
> doesn't work well in real practice.
>
> Thank you for your consideration, though.
>
> JDing
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004163.html

> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Karsten
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004164.html
To unsubscribe from measuring grayscale of objects in a plate, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

karo03
Centroid coordinates of any ROI (1 and 2) are coordinates of your plate image. Sorting in y means that you can group the "lines" and sorting in x allows to group the "columns". Each well covers a box in which the related roi coordinates are falling, if not, than the roi is not inside the well. Where is the problem?

Regards,
Karsten

Is it possible that you think image coordinates of ImageJ are no
Am 27.07.2013 um 00:14 schrieb JDing <[hidden email]>:

> I am confused about what "your ROIs" means. Do you mean 1) the ROI set that
> I have saved, which has one ROI for each of the 48 wells, or 2) the ROIs
> that I get after I threshold/analyze particles/save to ROI manager?
>
> If you mean (1), my saved ROI set has ROIs that includes each well in its
> entirety. However, since seeds take up only a fraction of the well, and
> since seeds can be in many different shapes and sizes and places within the
> well, my ROI set doesn't actually help very much in identifying the seeds
> themselves. In my original post, I suggested that if I could apply the
> threshold/analyze particle functions to only the ROI and not the entire
> image, then I could apply the process 48 times, one time for each ROI/well,
> which would then be in order, since my ROI set is already in order, and I
> do this in the order of my ROI set. However, I do not know how to apply the
> functions to only the ROI, so I can't use this method (unless you know how
> to do it).
>
> If you mean (2), the seeds vary in position within each well. So even
> though in theory, if I tell the program to list in increasing y-coordinate
> values and then in increasing x-coordinate values, I should get the
> wells/seeds in order, this is not the case in practice. This is what I
> tried to explain in my previous post. Unless I am misunderstanding you, in
> which case you would have to explain your method in slightly more detail.
>
> Thanks
>
> JDing
>
>
> On Fri, Jul 26, 2013 at 4:09 PM, Karsten Rodenacker-3 [via ImageJ] <
> [hidden email]> wrote:
>
>> Assuming your wells build a chequerboard and the image is aligned with it,
>> the coordinates of your ROIs will allow the ordering of the results. Of
>> course the actual list of result entries depend on the sequence of your
>> ROIs in the ROI manager rspw. on the first found pixel per region.
>>
>> Possibly you have to load the results into Excel or R for the ordering in
>> x and y.
>>
>> Regards
>> Karsten
>>
>> Am 26.07.2013 um 22:55 schrieb JDing <[hidden email]<http://user/SendEmail.jtp?type=node&node=5004164&i=0>>:
>>
>>
>>> You understand me correctly, but your suggestion doesn't seem to work. I
>>> added "center of mass" to the measurements and it didn't put the wells
>> in
>>> order. Here is my explanation: even though the sides of my plate are
>> aligned
>>> with the x and y axes, the seeds themselves vary in their position
>> within
>>> the well (and their size). So the seed in A1 could be centered at
>> coordinate
>>> (50, 50), while B1 is at (100, 49), and C1 is at (150, 49.5), etc. In
>> this
>>> case, if ImageJ measured/listed in order of increasing y-coordinate (the
>>> default for my computer), it would list B1 and C1 before A1. So this
>> method
>>> doesn't work well in real practice.
>>>
>>> Thank you for your consideration, though.
>>>
>>> JDing
>>>
>>>
>>>
>>> --
>>> View this message in context:
>> http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004163.html
>>
>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> Karsten
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5004164&i=1>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004164.html
>> To unsubscribe from measuring grayscale of objects in a plate, click here<
>> .
>> NAML<
http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004166.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Karsten
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

JDing
Maybe an illustrative example will clear up the confusion:

I begin with my plate with 48 seeds. I threshold it so the image is black and white, and my seeds are black, so I now use analyze particles to move the outlines of the seeds to the ROI manager. Since I want to measure color, and the image I have now is black and white, I now revert to my original colored image. Now I use the measure function on the ROI manager to get my results table, with a measurement of the grayscale for each seed.

Assume well A1 is a circle centered at (50, 50) with radius 20. B1 is a circle is centered at (100, 50), with radius 20, etc. Assume that the seed in well A1 is a circle centered at (50, 60) with radius 5. Assume that the seed in B1 is a circle centered at (100, 40) with radius 5. Assume the seed in C1 is circle centered at (150, 50) with radius 10. My ROI manager labels the seed in B1 as "001-35", its smallest y-coordinate is 35, which is the number 1 smallest y-coordinate among all the seeds. (I believe it names based on smallest y coordinate, though it might be the center.) The seed in C1 is labeled "002-40" and the seed in A1 is labeled "003-55." Then on the results table, it lists "001-35" then "002-40" then "003-55." The labels A1, B1, and C1 do not appear anywhere on the results table, because ImageJ does not know that the well at (50, 50) is called A1. so I have no way of telling that 001-35 in fact comes from B1 unless I go back to the ROI manager and manually click each one to check. That would take too much time. So from here, how should I reorder the rows without having to do it manually?

I can't use my saved ROI set to measure the grayscale of the seeds, since the ROI set has ROIs for the wells. So, for example, I have an ROI labeled "A1" that corresponds with well A1. However, if I measured the color of the ROI "A1" I would not get a correct grayscale for  the seed in A1, because I'm also measuring the part of the well that does not contain the seed. In short, my saved ROI set is useless in this task, and should be ignored, unless it is possible to perform the functions of ImageJ only within the boundaries a certain selected ROI (and not to the entire image), in which case my problem would be solved.

Hopefully this makes clear what my exact problem is.

JDing




On Fri, Jul 26, 2013 at 5:57 PM, Karsten Rodenacker-3 [via ImageJ] <[hidden email]> wrote:
Centroid coordinates of any ROI (1 and 2) are coordinates of your plate image. Sorting in y means that you can group the "lines" and sorting in x allows to group the "columns". Each well covers a box in which the related roi coordinates are falling, if not, than the roi is not inside the well. Where is the problem?

Regards,
Karsten

Is it possible that you think image coordinates of ImageJ are no
Am 27.07.2013 um 00:14 schrieb JDing <[hidden email]>:

> I am confused about what "your ROIs" means. Do you mean 1) the ROI set that
> I have saved, which has one ROI for each of the 48 wells, or 2) the ROIs
> that I get after I threshold/analyze particles/save to ROI manager?
>
> If you mean (1), my saved ROI set has ROIs that includes each well in its
> entirety. However, since seeds take up only a fraction of the well, and
> since seeds can be in many different shapes and sizes and places within the
> well, my ROI set doesn't actually help very much in identifying the seeds
> themselves. In my original post, I suggested that if I could apply the
> threshold/analyze particle functions to only the ROI and not the entire
> image, then I could apply the process 48 times, one time for each ROI/well,
> which would then be in order, since my ROI set is already in order, and I
> do this in the order of my ROI set. However, I do not know how to apply the
> functions to only the ROI, so I can't use this method (unless you know how
> to do it).
>
> If you mean (2), the seeds vary in position within each well. So even
> though in theory, if I tell the program to list in increasing y-coordinate
> values and then in increasing x-coordinate values, I should get the
> wells/seeds in order, this is not the case in practice. This is what I
> tried to explain in my previous post. Unless I am misunderstanding you, in
> which case you would have to explain your method in slightly more detail.
>
> Thanks
>
> JDing
>
>
> On Fri, Jul 26, 2013 at 4:09 PM, Karsten Rodenacker-3 [via ImageJ] <
> [hidden email]> wrote:

>
>> Assuming your wells build a chequerboard and the image is aligned with it,
>> the coordinates of your ROIs will allow the ordering of the results. Of
>> course the actual list of result entries depend on the sequence of your
>> ROIs in the ROI manager rspw. on the first found pixel per region.
>>
>> Possibly you have to load the results into Excel or R for the ordering in
>> x and y.
>>
>> Regards
>> Karsten
>>
>> Am 26.07.2013 um 22:55 schrieb JDing <[hidden email]<http://user/SendEmail.jtp?type=node&node=5004164&i=0>>:
>>

>>
>>> You understand me correctly, but your suggestion doesn't seem to work. I
>>> added "center of mass" to the measurements and it didn't put the wells
>> in
>>> order. Here is my explanation: even though the sides of my plate are
>> aligned
>>> with the x and y axes, the seeds themselves vary in their position
>> within
>>> the well (and their size). So the seed in A1 could be centered at
>> coordinate
>>> (50, 50), while B1 is at (100, 49), and C1 is at (150, 49.5), etc. In
>> this
>>> case, if ImageJ measured/listed in order of increasing y-coordinate (the
>>> default for my computer), it would list B1 and C1 before A1. So this
>> method
>>> doesn't work well in real practice.
>>>
>>> Thank you for your consideration, though.
>>>
>>> JDing
>>>
>>>
>>>
>>> --
>>> View this message in context:
>> http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004163.html
>>
>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> Karsten
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5004164&i=1>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>> ------------------------------
Karsten
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004167.html
To unsubscribe from measuring grayscale of objects in a plate, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

Gabriel Landini
On Saturday 27 Jul 2013 01:21:06 JDing wrote:
> Maybe an illustrative example will clear up the confusion:

I think you are complicating things unnecessarily. The order of the analysis
is on the x,y scan order of the image, so unless you have things aligned in a
pixel-accurate manner you can't tell easily which is the next seed that will
be found.
Perhaps it would be easier to break down the image into a stack with NxM
slices with one object each and analyse one slice at a time. There is an
unmontage command that does the reverse of the montage command.
That way it does not matter where within the sub-image the seeds are.
Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

JDing
Gabriel, I think your idea would work, but I can't find any unmontage command in ImageJ. Perhaps it is known by a different name?

Your idea led me to try a related idea: I used my saved ROI set to crop each well one at a time, in the correct order, and then I apply threshold/analyze particles and measure the new ROI generated for the seed. This way the results table will have measurements in the correct order. I believe this should work (I just tried it for the first well, and it worked), and I'll run a full test on Monday. I'll keep you updated if I run into any trouble.

Thank you for your very helpful suggestions.

JDing


On Sat, Jul 27, 2013 at 3:54 AM, Gabriel Landini [via ImageJ] <[hidden email]> wrote:
On Saturday 27 Jul 2013 01:21:06 JDing wrote:
> Maybe an illustrative example will clear up the confusion:

I think you are complicating things unnecessarily. The order of the analysis
is on the x,y scan order of the image, so unless you have things aligned in a
pixel-accurate manner you can't tell easily which is the next seed that will
be found.
Perhaps it would be easier to break down the image into a stack with NxM
slices with one object each and analyse one slice at a time. There is an
unmontage command that does the reverse of the montage command.
That way it does not matter where within the sub-image the seeds are.
Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/measuring-grayscale-of-objects-in-a-plate-tp5004160p5004174.html
To unsubscribe from measuring grayscale of objects in a plate, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: measuring grayscale of objects in a plate

Gabriel Landini
On Saturday 27 Jul 2013 18:33:52 JDing wrote:
> Gabriel, I think your idea would work, but I can't find any unmontage
> command in ImageJ. Perhaps it is known by a different name?

Image>Stacks>Tools>Montage to Stack...

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html