swelling of objects over time

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

swelling of objects over time

Aryeh Weiss
I have a stack of objects which swell over time, and want to follow the
area of each object over time. The objects do not move. A typical stack,
following thresholding, can be found here:
https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
Notice how the objects swell as the slider is advanced. There is an
occasional artifact in the form of a spurious object that pops up in
some slice, but that is easily rejected (for example by noting that is
is very different than anything in the previous slice).

I can measure the objects with the particle analyzer, and then use the
results table to find the areas. However, associating an object in one
slice with the corresponding object in the next slice is a bit awkward,
though certainly doable. I figured that the many powerful tracking tools
can help, and indeed they can find tracks quick easily, because there is
practically no movement. Yet I cannot quite get what I want, which is a
table for each "track" that contains the areas of the objects in that
track. With each tracking plugin I have some problem. For example,
Trackmate does not seem to like having objects of widely varying size
(there is an inquiry about this in the archives). Most of the tracking
plugins assume some size, or expect that we are working with particles
or droplets. MTrack2 did pretty well, but I did not see how to go  back
and identify the objects that belong to each track. And it also split
some of the largest objects.

So before I just do it by brute force using the results table, I am
wondering if someone has already done this, and can show me a simple way
to do it.

Thanks in advance
--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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

Re: swelling of objects over time

Adrian Daerr-2
Hello Aryeh,

Maybe you can achieve what you are looking for by writing a small
script: Considering that your objects are not moving, and monotonously
swelling, one approach consists in eliminating all objects but one,
iterating over all objects:

1 identify particles on the last slide, and then
2 for each particle/object
   a create a mask from that object in the last slide
   b apply this mask to the whole stack with a logical operation to
remove all other objects
   c Analyze->measure that object's properties over the whole stack
3 concatenate all the measurement tables for the different objects

If your objects also shrink then the masking becomes a bit more involved
but not fundamentally more complicated (z-project:max before creating
mask, or use centroid coordinate and fill from there, or ..)

Anyway, maybe someone will post a quicker solution using existing tools.
good luck
Adrian


On 09/11/2017 02:52 PM, Aryeh Weiss wrote:

> I have a stack of objects which swell over time, and want to follow the
> area of each object over time. The objects do not move. A typical stack,
> following thresholding, can be found here:
> https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing 
>
> Notice how the objects swell as the slider is advanced. There is an
> occasional artifact in the form of a spurious object that pops up in
> some slice, but that is easily rejected (for example by noting that is
> is very different than anything in the previous slice).
>
> I can measure the objects with the particle analyzer, and then use the
> results table to find the areas. However, associating an object in one
> slice with the corresponding object in the next slice is a bit awkward,
> though certainly doable. I figured that the many powerful tracking tools
> can help, and indeed they can find tracks quick easily, because there is
> practically no movement. Yet I cannot quite get what I want, which is a
> table for each "track" that contains the areas of the objects in that
> track. With each tracking plugin I have some problem. For example,
> Trackmate does not seem to like having objects of widely varying size
> (there is an inquiry about this in the archives). Most of the tracking
> plugins assume some size, or expect that we are working with particles
> or droplets. MTrack2 did pretty well, but I did not see how to go  back
> and identify the objects that belong to each track. And it also split
> some of the largest objects.
>
> So before I just do it by brute force using the results table, I am
> wondering if someone has already done this, and can show me a simple way
> to do it.
>
> Thanks in advance
> --aryeh
>

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

Re: swelling of objects over time

Michael Schmid-3
In reply to this post by Aryeh Weiss
On 11/09/2017 14:52, Aryeh Weiss wrote:
 > I have a stack of objects which swell over time, and want to follow
the area of each object over time. The objects do not move...


Hi Aryeh,

for me, the easiest solution seems to be a macro:

run 'Analyze Particles' for the first image (center positions and area)
for each subsequent image:
    for all particles in the results table:
       doWand at the (center) position of that particle
       getStatistics, and enter the area in the table

Before getStatistics, you might check that the wand operation has been
successful: Roi.getBounds(x, y, width, height) should not reurn the
dimensions of the full image and the original center should be within
the Roi.getBounds rectangle.

Michael
________________________________________________________________
On 11/09/2017 14:52, Aryeh Weiss wrote:
 > I have a stack of objects which swell over time, and want to follow
the area of each object over time. The objects do not move. A typical
stack, following thresholding, can be found here:
 >
https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
 > Notice how the objects swell as the slider is advanced. There is an
occasional artifact in the form of a spurious object that pops up in
some slice, but that is easily rejected (for example by noting that is
is very different than anything in the previous slice).
 >
 > I can measure the objects with the particle analyzer, and then use
the results table to find the areas. However, associating an object in
one slice with the corresponding object in the next slice is a bit
awkward, though certainly doable. I figured that the many powerful
tracking tools can help, and indeed they can find tracks quick easily,
because there is practically no movement. Yet I cannot quite get what I
want, which is a table for each "track" that contains the areas of the
objects in that track. With each tracking plugin I have some problem.
For example, Trackmate does not seem to like having objects of widely
varying size (there is an inquiry about this in the archives). Most of
the tracking plugins assume some size, or expect that we are working
with particles or droplets. MTrack2 did pretty well, but I did not see
how to go  back and identify the objects that belong to each track. And
it also split some of the largest objects.
 >
 > So before I just do it by brute force using the results table, I am
wondering if someone has already done this, and can show me a simple way
to do it.
 >
 > Thanks in advance
 > --aryeh
 >

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

Re: swelling of objects over time

Michael Doube-4
In reply to this post by Adrian Daerr-2
Dear Aryeh,

I'm not exactly sure how to carry this through to a complete solution, but perhaps it would help to consider your particles as 3D (swapping time for depth).

Then you could segment each particle so it gets a unique ID in every slice, and for each slice count the number of pixels with each ID.

I'm biased, but I like BoneJ's Particle Analyser to do this kind of segmentation because it's a lot faster than the original 3D Objects Counter that it started life as.

http://bonej.org/particles

Michael

On 11/09/17 14:51, Adrian Daerr wrote:

> Hello Aryeh,
>
> Maybe you can achieve what you are looking for by writing a small script: Considering that your objects are not moving, and monotonously swelling, one approach consists in eliminating all objects but one, iterating over all objects:
>
> 1 identify particles on the last slide, and then
> 2 for each particle/object
>   a create a mask from that object in the last slide
>   b apply this mask to the whole stack with a logical operation to remove all other objects
>   c Analyze->measure that object's properties over the whole stack
> 3 concatenate all the measurement tables for the different objects
>
> If your objects also shrink then the masking becomes a bit more involved but not fundamentally more complicated (z-project:max before creating mask, or use centroid coordinate and fill from there, or ..)
>
> Anyway, maybe someone will post a quicker solution using existing tools.
> good luck
> Adrian
>
>
> On 09/11/2017 02:52 PM, Aryeh Weiss wrote:
>> I have a stack of objects which swell over time, and want to follow the area of each object over time. The objects do not move. A typical stack, following thresholding, can be found here:
>> https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
>> Notice how the objects swell as the slider is advanced. There is an occasional artifact in the form of a spurious object that pops up in some slice, but that is easily rejected (for example by noting that is is very different than anything in the previous slice).
>>
>> I can measure the objects with the particle analyzer, and then use the results table to find the areas. However, associating an object in one slice with the corresponding object in the next slice is a bit awkward, though certainly doable. I figured that the many powerful tracking tools can help, and indeed they can find tracks quick easily, because there is practically no movement. Yet I cannot quite get what I want, which is a table for each "track" that contains the areas of the objects in that track. With each tracking plugin I have some problem. For example, Trackmate does not seem to like having objects of widely varying size (there is an inquiry about this in the archives). Most of the tracking plugins
>> assume some size, or expect that we are working with particles or droplets. MTrack2 did pretty well, but I did not see how to go  back and identify the objects that belong to each track. And it also split some of the largest objects.
>>
>> So before I just do it by brute force using the results table, I am wondering if someone has already done this, and can show me a simple way to do it.
>>
>> Thanks in advance
>> --aryeh
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

<http://www.rvc.ac.uk>

This message, together with any attachments, is intended for the stated addressee(s) only and may contain privileged or confidential information. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Royal Veterinary College.

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

Re: swelling of objects over time

Aryeh Weiss
In reply to this post by Michael Schmid-3
I want to thank the many list members who responded to my question.
Most of the ideas revolved around using the particle analyzer and
results table in various  ways.
Michael suggested using the Wand tool -- I had not thought of that, and
it  looks promising.
No one  suggested the tracking tools, but I may combine a tracking tool
that provides coordinates of a track with the wand tool that will
provide the object stats.

Best regards to all
--aryeh

On 11/09/2017 17:24, Michael Schmid wrote:

> On 11/09/2017 14:52, Aryeh Weiss wrote:
> > I have a stack of objects which swell over time, and want to follow
> the area of each object over time. The objects do not move...
>
>
> Hi Aryeh,
>
> for me, the easiest solution seems to be a macro:
>
> run 'Analyze Particles' for the first image (center positions and area)
> for each subsequent image:
>    for all particles in the results table:
>       doWand at the (center) position of that particle
>       getStatistics, and enter the area in the table
>
> Before getStatistics, you might check that the wand operation has been
> successful: Roi.getBounds(x, y, width, height) should not reurn the
> dimensions of the full image and the original center should be within
> the Roi.getBounds rectangle.
>
> Michael
> ________________________________________________________________
> On 11/09/2017 14:52, Aryeh Weiss wrote:
> > I have a stack of objects which swell over time, and want to follow
> the area of each object over time. The objects do not move. A typical
> stack, following thresholding, can be found here:
> >
> https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
> > Notice how the objects swell as the slider is advanced. There is an
> occasional artifact in the form of a spurious object that pops up in
> some slice, but that is easily rejected (for example by noting that is
> is very different than anything in the previous slice).
> >
> > I can measure the objects with the particle analyzer, and then use
> the results table to find the areas. However, associating an object in
> one slice with the corresponding object in the next slice is a bit
> awkward, though certainly doable. I figured that the many powerful
> tracking tools can help, and indeed they can find tracks quick easily,
> because there is practically no movement. Yet I cannot quite get what
> I want, which is a table for each "track" that contains the areas of
> the objects in that track. With each tracking plugin I have some
> problem. For example, Trackmate does not seem to like having objects
> of widely varying size (there is an inquiry about this in the
> archives). Most of the tracking plugins assume some size, or expect
> that we are working with particles or droplets. MTrack2 did pretty
> well, but I did not see how to go  back and identify the objects that
> belong to each track. And it also split some of the largest objects.
> >
> > So before I just do it by brute force using the results table, I am
> wondering if someone has already done this, and can show me a simple
> way to do it.
> >
> > Thanks in advance
> > --aryeh
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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

Re: swelling of objects over time

ctrueden
Hi Aryeh,

> No one  suggested the tracking tools, but I may combine a tracking
> tool that provides coordinates of a track with the wand tool that will
> provide the object stats.

Firstly, I think your data is very clean, and there is no need here for
manual analysis with e.g. the wand tool.

There may be a couple of reasons no one discussed the tracking tools:

1) Your stated goal, to compute areas of largely stationary objects over
time, can be done with a connected component analysis (CCA).

I briefly played with your data in TrackMate [1]. I was able to get
reasonable tracks using the DoG segmenter, with 120 micron blob size, and
threshold of 5, and everything else default settings:

[image: Inline image 1]

However, the current version of TrackMate always has fixed spot size, which
does not jive with your stated goal of computing area which varies over
time. You would need to take the resultant spots, and then use their
centroids to do a CCA or similar thing regardless. IIUC, a future version
of TrackMate [2] will be a lot more flexible in this regard.

I then tried the Connected Components Labeling plugin, part of MorphoLibJ
[3], and it did an excellent job of labeling your regions.

[image: Inline image 3]

Relevant macro code:

  run("Connected Components Labeling", "connectivity=6 type=[16 bits]");
  run("glasbey");

I am not sure of the best way to perform the next step of computing the
area of each label. The "Region Morphometry" plugin of MorphoLibJ seems to
work, but current slice only. Maybe someone else knows a better way?

2) You asked this question on the ImageJ mailing list, which tends to have
people offering more ImageJ-1.x-centric solutions, rather than on the
ImageJ Forum (http://forum.imagej.net/), which tends to have more
ImageJ2-and-Fiji-centric advice. If you had posted on the ImageJ Forum, I
am guessing you would have gotten a wider breadth of suggestions. There are
several tools which could potentially help here—e.g., TrackMate;
MorphoLibJ; BioVoxxel toolbox [4]; Bio7 [5]; KNIME Image Processing [6].
Any or all of these tools have features which are relevant here.
Unfortunately, it is not possible to @mention these folks on the mailing
list, except to CC them in reply, which for many people's email
configuration is likely to make no difference in whether they see it.

Regards,
Curtis

[1] https://imagej.net/TrackMate
[2] https://github.com/fiji/TrackMate3
[3] https://imagej.net/MorphoLibJ
[4] https://imagej.net/BioVoxxel_Toolbox
[5] https://imagej.net/Bio7
[6] https://imagej.net/KNIME

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Wed, Sep 13, 2017 at 1:41 AM, Aryeh Weiss <[hidden email]> wrote:

> I want to thank the many list members who responded to my question.
> Most of the ideas revolved around using the particle analyzer and results
> table in various  ways.
> Michael suggested using the Wand tool -- I had not thought of that, and
> it  looks promising.
> No one  suggested the tracking tools, but I may combine a tracking tool
> that provides coordinates of a track with the wand tool that will provide
> the object stats.
>
> Best regards to all
> --aryeh
>
>
> On 11/09/2017 17:24, Michael Schmid wrote:
>
>> On 11/09/2017 14:52, Aryeh Weiss wrote:
>> > I have a stack of objects which swell over time, and want to follow the
>> area of each object over time. The objects do not move...
>>
>>
>> Hi Aryeh,
>>
>> for me, the easiest solution seems to be a macro:
>>
>> run 'Analyze Particles' for the first image (center positions and area)
>> for each subsequent image:
>>    for all particles in the results table:
>>       doWand at the (center) position of that particle
>>       getStatistics, and enter the area in the table
>>
>> Before getStatistics, you might check that the wand operation has been
>> successful: Roi.getBounds(x, y, width, height) should not reurn the
>> dimensions of the full image and the original center should be within the
>> Roi.getBounds rectangle.
>>
>> Michael
>> ________________________________________________________________
>> On 11/09/2017 14:52, Aryeh Weiss wrote:
>> > I have a stack of objects which swell over time, and want to follow the
>> area of each object over time. The objects do not move. A typical stack,
>> following thresholding, can be found here:
>> > https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M
>> /view?usp=sharing
>> > Notice how the objects swell as the slider is advanced. There is an
>> occasional artifact in the form of a spurious object that pops up in some
>> slice, but that is easily rejected (for example by noting that is is very
>> different than anything in the previous slice).
>> >
>> > I can measure the objects with the particle analyzer, and then use the
>> results table to find the areas. However, associating an object in one
>> slice with the corresponding object in the next slice is a bit awkward,
>> though certainly doable. I figured that the many powerful tracking tools
>> can help, and indeed they can find tracks quick easily, because there is
>> practically no movement. Yet I cannot quite get what I want, which is a
>> table for each "track" that contains the areas of the objects in that
>> track. With each tracking plugin I have some problem. For example,
>> Trackmate does not seem to like having objects of widely varying size
>> (there is an inquiry about this in the archives). Most of the tracking
>> plugins assume some size, or expect that we are working with particles or
>> droplets. MTrack2 did pretty well, but I did not see how to go  back and
>> identify the objects that belong to each track. And it also split some of
>> the largest objects.
>> >
>> > So before I just do it by brute force using the results table, I am
>> wondering if someone has already done this, and can show me a simple way to
>> do it.
>> >
>> > Thanks in advance
>> > --aryeh
>> >
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

TrackMate-capture.gif (160K) Download Attachment
swellingStack-lbl.gif (65K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swelling of objects over time

Aryeh Weiss
Hi Curtiss

Thank you for your detailed reply.

On 13/09/2017 17:31, Curtis Rueden wrote:

> Hi Aryeh,
>
> > No one  suggested the tracking tools, but I may combine a tracking
> > tool that provides coordinates of a track with the wand tool that will
> > provide the object stats.
>
> Firstly, I think your data is very clean, and there is no need here
> for manual analysis with e.g. the wand tool.
>
> There may be a couple of reasons no one discussed the tracking tools:
>
> 1) Your stated goal, to compute areas of largely stationary objects
> over time, can be done with a connected component analysis (CCA).
>
> I briefly played with your data in TrackMate [1]. I was able to get
> reasonable tracks using the DoG segmenter, with 120 micron blob size,
> and threshold of 5, and everything else default settings:
>
> Inline image 1
>
> However, the current version of TrackMate always has fixed spot size,
> which does not jive with your stated goal of computing area which
> varies over time. You would need to take the resultant spots, and then
> use their centroids to do a CCA or similar thing regardless. IIUC, a
> future version of TrackMate [2] will be a lot more flexible in this
> regard.
>
Indeed, Trackmate does ok, but notice that it still has split some of
the objects in some of the slices.

> I then tried the Connected Components Labeling plugin, part of
> MorphoLibJ [3], and it did an excellent job of labeling your regions.
>
> Inline image 3
>
> Relevant macro code:
>
>   run("Connected Components Labeling", "connectivity=6 type=[16 bits]");
>   run("glasbey");
>
> I am not sure of the best way to perform the next step of computing
> the area of each label. The "Region Morphometry" plugin of MorphoLibJ
> seems to work, but current slice only. Maybe someone else knows a
> better way?
>
I think that CCA and Region morphology is the way to go. each level has
the same labeling, so I can loop through the slices, append the areas to
an array, where one index is the label, and that should do it. 
Artifacts that occur in fewer than all of the slices will have zeros in
their array, and I can discard them.

I am really glad that you sent this.

> 2) You asked this question on the ImageJ mailing list, which tends to
> have people offering more ImageJ-1.x-centric solutions, rather than on
> the ImageJ Forum (http://forum.imagej.net/), which tends to have more
> ImageJ2-and-Fiji-centric advice. If you had posted on the ImageJ
> Forum, I am guessing you would have gotten a wider breadth of
> suggestions. There are several tools which could potentially help
> here—e.g., TrackMate; MorphoLibJ; BioVoxxel toolbox [4]; Bio7 [5];
> KNIME Image Processing [6]. Any or all of these tools have features
> which are relevant here. Unfortunately, it is not possible to @mention
> these folks on the mailing list, except to CC them in reply, which for
> many people's email configuration is likely to make no difference in
> whether they see it.
>
I am still "old fashioned" in this respect, and am not comfortable with
forums.
I am very glad that the IJ mailing list is still going. I remember when
Image Pro Plus moved to a forum, they shut down the mailing list to
force us to move to the forum. That was about when I dropped out and
switched to ImageJ, and I never looked back.

Best regards
--aryeh

> Regards,
> Curtis
>
> [1] https://imagej.net/TrackMate
> [2] https://github.com/fiji/TrackMate3
> [3] https://imagej.net/MorphoLibJ
> [4] https://imagej.net/BioVoxxel_Toolbox
> [5] https://imagej.net/Bio7
> [6] https://imagej.net/KNIME
>
> --
> Curtis Rueden
> LOCI software architect - https://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden 
> <https://imagej.net/User:Rueden>
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Wed, Sep 13, 2017 at 1:41 AM, Aryeh Weiss <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I want to thank the many list members who responded to my question.
>     Most of the ideas revolved around using the particle analyzer and
>     results table in various  ways.
>     Michael suggested using the Wand tool -- I had not thought of
>     that, and it  looks promising.
>     No one  suggested the tracking tools, but I may combine a tracking
>     tool that provides coordinates of a track with the wand tool that
>     will provide the object stats.
>
>     Best regards to all
>     --aryeh
>
>
>     On 11/09/2017 17:24, Michael Schmid wrote:
>
>         On 11/09/2017 14:52, Aryeh Weiss wrote:
>         > I have a stack of objects which swell over time, and want to
>         follow the area of each object over time. The objects do not
>         move...
>
>
>         Hi Aryeh,
>
>         for me, the easiest solution seems to be a macro:
>
>         run 'Analyze Particles' for the first image (center positions
>         and area)
>         for each subsequent image:
>            for all particles in the results table:
>               doWand at the (center) position of that particle
>               getStatistics, and enter the area in the table
>
>         Before getStatistics, you might check that the wand operation
>         has been successful: Roi.getBounds(x, y, width, height) should
>         not reurn the dimensions of the full image and the original
>         center should be within the Roi.getBounds rectangle.
>
>         Michael
>         ________________________________________________________________
>         On 11/09/2017 14:52, Aryeh Weiss wrote:
>         > I have a stack of objects which swell over time, and want to
>         follow the area of each object over time. The objects do not
>         move. A typical stack, following thresholding, can be found here:
>         >
>         https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
>         <https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing>
>         > Notice how the objects swell as the slider is advanced.
>         There is an occasional artifact in the form of a spurious
>         object that pops up in some slice, but that is easily rejected
>         (for example by noting that is is very different than anything
>         in the previous slice).
>         >
>         > I can measure the objects with the particle analyzer, and
>         then use the results table to find the areas. However,
>         associating an object in one slice with the corresponding
>         object in the next slice is a bit awkward, though certainly
>         doable. I figured that the many powerful tracking tools can
>         help, and indeed they can find tracks quick easily, because
>         there is practically no movement. Yet I cannot quite get what
>         I want, which is a table for each "track" that contains the
>         areas of the objects in that track. With each tracking plugin
>         I have some problem. For example, Trackmate does not seem to
>         like having objects of widely varying size (there is an
>         inquiry about this in the archives). Most of the tracking
>         plugins assume some size, or expect that we are working with
>         particles or droplets. MTrack2 did pretty well, but I did not
>         see how to go  back and identify the objects that belong to
>         each track. And it also split some of the largest objects.
>         >
>         > So before I just do it by brute force using the results
>         table, I am wondering if someone has already done this, and
>         can show me a simple way to do it.
>         >
>         > Thanks in advance
>         > --aryeh
>         >
>
>         --
>         ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>         <http://imagej.nih.gov/ij/list.html>
>
>
>     --
>     Aryeh Weiss
>     Faculty of Engineering
>     Bar Ilan University
>     Ramat Gan 52900 Israel
>
>     Ph:  972-3-5317638
>     FAX: 972-3-7384051
>
>     --
>     ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>     <http://imagej.nih.gov/ij/list.html>
>
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


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

TrackMate-capture.gif (161K) Download Attachment
swellingStack-lbl.gif (65K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swelling of objects over time

ctrueden
Hi Aryeh,

> Indeed, Trackmate does ok, but notice that it still has split some of
> the objects in some of the slices.

Right. That's why I said, "You would need to take the resultant spots, and
then use their centroids to do a CCA or similar thing regardless." Because
the current TrackMate explicitly assumes blobs of fixed size.

> I think that CCA and Region morphology is the way to go.

Great, very glad this will work! :-)

> I am still "old fashioned" in this respect, and am not comfortable
> with forums.

What would make it comfortable for you? Would it be enough if you could: A)
receive email notification of new posts in categories and/or tags of
interest; B) reply to those posts via email; and maybe C) start new topics
via email? At that point you could largely just treat it like a mailing
list, right? Any other requirements which would make it more palatable?

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Wed, Sep 13, 2017 at 10:39 AM, Aryeh Weiss <[hidden email]> wrote:

> Hi Curtiss
>
> Thank you for your detailed reply.
>
> On 13/09/2017 17:31, Curtis Rueden wrote:
>
> Hi Aryeh,
>
> > No one  suggested the tracking tools, but I may combine a tracking
> > tool that provides coordinates of a track with the wand tool that will
> > provide the object stats.
>
> Firstly, I think your data is very clean, and there is no need here for
> manual analysis with e.g. the wand tool.
>
> There may be a couple of reasons no one discussed the tracking tools:
>
> 1) Your stated goal, to compute areas of largely stationary objects over
> time, can be done with a connected component analysis (CCA).
>
> I briefly played with your data in TrackMate [1]. I was able to get
> reasonable tracks using the DoG segmenter, with 120 micron blob size, and
> threshold of 5, and everything else default settings:
>
> [image: Inline image 1]
>
> However, the current version of TrackMate always has fixed spot size,
> which does not jive with your stated goal of computing area which varies
> over time. You would need to take the resultant spots, and then use their
> centroids to do a CCA or similar thing regardless. IIUC, a future version
> of TrackMate [2] will be a lot more flexible in this regard.
>
> Indeed, Trackmate does ok, but notice that it still has split some of the
> objects in some of the slices.
>
> I then tried the Connected Components Labeling plugin, part of MorphoLibJ
> [3], and it did an excellent job of labeling your regions.
>
> [image: Inline image 3]
>
> Relevant macro code:
>
>   run("Connected Components Labeling", "connectivity=6 type=[16 bits]");
>   run("glasbey");
>
> I am not sure of the best way to perform the next step of computing the
> area of each label. The "Region Morphometry" plugin of MorphoLibJ seems to
> work, but current slice only. Maybe someone else knows a better way?
>
> I think that CCA and Region morphology is the way to go. each level has
> the same labeling, so I can loop through the slices, append the areas to an
> array, where one index is the label, and that should do it.  Artifacts that
> occur in fewer than all of the slices will have zeros in their array, and I
> can discard them.
>
> I am really glad that you sent this.
>
> 2) You asked this question on the ImageJ mailing list, which tends to have
> people offering more ImageJ-1.x-centric solutions, rather than on the
> ImageJ Forum (http://forum.imagej.net/), which tends to have more
> ImageJ2-and-Fiji-centric advice. If you had posted on the ImageJ Forum, I
> am guessing you would have gotten a wider breadth of suggestions. There are
> several tools which could potentially help here—e.g., TrackMate;
> MorphoLibJ; BioVoxxel toolbox [4]; Bio7 [5]; KNIME Image Processing [6].
> Any or all of these tools have features which are relevant here.
> Unfortunately, it is not possible to @mention these folks on the mailing
> list, except to CC them in reply, which for many people's email
> configuration is likely to make no difference in whether they see it.
>
> I am still "old fashioned" in this respect, and am not comfortable with
> forums.
> I am very glad that the IJ mailing list is still going. I remember when
> Image Pro Plus moved to a forum, they shut down the mailing  list to force
> us to move to the forum. That was about when I dropped out and switched to
> ImageJ, and I never looked back.
>
> Best regards
> --aryeh
>
>
> Regards,
> Curtis
>
> [1] https://imagej.net/TrackMate
> [2] https://github.com/fiji/TrackMate3
> [3] https://imagej.net/MorphoLibJ
> [4] https://imagej.net/BioVoxxel_Toolbox
> [5] https://imagej.net/Bio7
> [6] https://imagej.net/KNIME
>
> --
> Curtis Rueden
> LOCI software architect - https://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Wed, Sep 13, 2017 at 1:41 AM, Aryeh Weiss <[hidden email]> wrote:
>
>> I want to thank the many list members who responded to my question.
>> Most of the ideas revolved around using the particle analyzer and results
>> table in various  ways.
>> Michael suggested using the Wand tool -- I had not thought of that, and
>> it  looks promising.
>> No one  suggested the tracking tools, but I may combine a tracking tool
>> that provides coordinates of a track with the wand tool that will provide
>> the object stats.
>>
>> Best regards to all
>> --aryeh
>>
>>
>> On 11/09/2017 17:24, Michael Schmid wrote:
>>
>>> On 11/09/2017 14:52, Aryeh Weiss wrote:
>>> > I have a stack of objects which swell over time, and want to follow
>>> the area of each object over time. The objects do not move...
>>>
>>>
>>> Hi Aryeh,
>>>
>>> for me, the easiest solution seems to be a macro:
>>>
>>> run 'Analyze Particles' for the first image (center positions and area)
>>> for each subsequent image:
>>>    for all particles in the results table:
>>>       doWand at the (center) position of that particle
>>>       getStatistics, and enter the area in the table
>>>
>>> Before getStatistics, you might check that the wand operation has been
>>> successful: Roi.getBounds(x, y, width, height) should not reurn the
>>> dimensions of the full image and the original center should be within the
>>> Roi.getBounds rectangle.
>>>
>>> Michael
>>> ________________________________________________________________
>>> On 11/09/2017 14:52, Aryeh Weiss wrote:
>>> > I have a stack of objects which swell over time, and want to follow
>>> the area of each object over time. The objects do not move. A typical
>>> stack, following thresholding, can be found here:
>>> > https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M
>>> /view?usp=sharing
>>> > Notice how the objects swell as the slider is advanced. There is an
>>> occasional artifact in the form of a spurious object that pops up in some
>>> slice, but that is easily rejected (for example by noting that is is very
>>> different than anything in the previous slice).
>>> >
>>> > I can measure the objects with the particle analyzer, and then use the
>>> results table to find the areas. However, associating an object in one
>>> slice with the corresponding object in the next slice is a bit awkward,
>>> though certainly doable. I figured that the many powerful tracking tools
>>> can help, and indeed they can find tracks quick easily, because there is
>>> practically no movement. Yet I cannot quite get what I want, which is a
>>> table for each "track" that contains the areas of the objects in that
>>> track. With each tracking plugin I have some problem. For example,
>>> Trackmate does not seem to like having objects of widely varying size
>>> (there is an inquiry about this in the archives). Most of the tracking
>>> plugins assume some size, or expect that we are working with particles or
>>> droplets. MTrack2 did pretty well, but I did not see how to go  back and
>>> identify the objects that belong to each track. And it also split some of
>>> the largest objects.
>>> >
>>> > So before I just do it by brute force using the results table, I am
>>> wondering if someone has already done this, and can show me a simple way to
>>> do it.
>>> >
>>> > Thanks in advance
>>> > --aryeh
>>> >
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>>
>> --
>> Aryeh Weiss
>> Faculty of Engineering
>> Bar Ilan University
>> Ramat Gan 52900 Israel
>>
>> Ph:  972-3-5317638
>> FAX: 972-3-7384051
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
>
>
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

TrackMate-capture.gif (160K) Download Attachment
swellingStack-lbl.gif (65K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swelling of objects over time

Jeffrey Murphy
In reply to this post by Aryeh Weiss
Hi Aryeh,

I have a suggestion to offer for your tracking challenge. There was a
chemist seeking help in the ImageJ subreddit with a time-series showing
crystals growing in situ. The challenge is quite similar to what you
described, so I'd suggest checking the thread:

https://www.reddit.com/r/ImageJ/comments/3euehw/need_help_creating_a_particle_numbering_scheme/

Here's an example macro that I wrote to illustrate an approach, similar to
what others have described here:

https://github.com/MurphysLab/r_ImageJ/blob/master/itemize_stack_particles.ijm

The macro is self-contained: It generates a set of sample images as a test
and analyzes them, as would be expected, as a proof of concept. If that's
what you're working toward, feel free to adapt it further.

Cheers,
Jeffrey Murphy

*Postdoctoral ResearcherFunctional Materials and Devices
LaboratoryEindhoven University of Technology*


On Wed, Sep 13, 2017 at 5:39 PM, Aryeh Weiss <[hidden email]> wrote:

> Hi Curtiss
>
> Thank you for your detailed reply.
>
> On 13/09/2017 17:31, Curtis Rueden wrote:
>
>> Hi Aryeh,
>>
>> > No one  suggested the tracking tools, but I may combine a tracking
>> > tool that provides coordinates of a track with the wand tool that will
>> > provide the object stats.
>>
>> Firstly, I think your data is very clean, and there is no need here for
>> manual analysis with e.g. the wand tool.
>>
>> There may be a couple of reasons no one discussed the tracking tools:
>>
>> 1) Your stated goal, to compute areas of largely stationary objects over
>> time, can be done with a connected component analysis (CCA).
>>
>> I briefly played with your data in TrackMate [1]. I was able to get
>> reasonable tracks using the DoG segmenter, with 120 micron blob size, and
>> threshold of 5, and everything else default settings:
>>
>> Inline image 1
>>
>> However, the current version of TrackMate always has fixed spot size,
>> which does not jive with your stated goal of computing area which varies
>> over time. You would need to take the resultant spots, and then use their
>> centroids to do a CCA or similar thing regardless. IIUC, a future version
>> of TrackMate [2] will be a lot more flexible in this regard.
>>
>> Indeed, Trackmate does ok, but notice that it still has split some of the
> objects in some of the slices.
>
> I then tried the Connected Components Labeling plugin, part of MorphoLibJ
>> [3], and it did an excellent job of labeling your regions.
>>
>> Inline image 3
>>
>> Relevant macro code:
>>
>>   run("Connected Components Labeling", "connectivity=6 type=[16 bits]");
>>   run("glasbey");
>>
>> I am not sure of the best way to perform the next step of computing the
>> area of each label. The "Region Morphometry" plugin of MorphoLibJ seems to
>> work, but current slice only. Maybe someone else knows a better way?
>>
>> I think that CCA and Region morphology is the way to go. each level has
> the same labeling, so I can loop through the slices, append the areas to an
> array, where one index is the label, and that should do it.  Artifacts that
> occur in fewer than all of the slices will have zeros in their array, and I
> can discard them.
>
> I am really glad that you sent this.
>
> 2) You asked this question on the ImageJ mailing list, which tends to have
>> people offering more ImageJ-1.x-centric solutions, rather than on the
>> ImageJ Forum (http://forum.imagej.net/), which tends to have more
>> ImageJ2-and-Fiji-centric advice. If you had posted on the ImageJ Forum, I
>> am guessing you would have gotten a wider breadth of suggestions. There are
>> several tools which could potentially help here—e.g., TrackMate;
>> MorphoLibJ; BioVoxxel toolbox [4]; Bio7 [5]; KNIME Image Processing [6].
>> Any or all of these tools have features which are relevant here.
>> Unfortunately, it is not possible to @mention these folks on the mailing
>> list, except to CC them in reply, which for many people's email
>> configuration is likely to make no difference in whether they see it.
>>
>> I am still "old fashioned" in this respect, and am not comfortable with
> forums.
> I am very glad that the IJ mailing list is still going. I remember when
> Image Pro Plus moved to a forum, they shut down the mailing list to force
> us to move to the forum. That was about when I dropped out and switched to
> ImageJ, and I never looked back.
>
> Best regards
> --aryeh
>
> Regards,
>> Curtis
>>
>> [1] https://imagej.net/TrackMate
>> [2] https://github.com/fiji/TrackMate3
>> [3] https://imagej.net/MorphoLibJ
>> [4] https://imagej.net/BioVoxxel_Toolbox
>> [5] https://imagej.net/Bio7
>> [6] https://imagej.net/KNIME
>>
>> --
>> Curtis Rueden
>> LOCI software architect - https://loci.wisc.edu/software
>> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden <
>> https://imagej.net/User:Rueden>
>> Did you know ImageJ has a forum? http://forum.imagej.net/
>>
>>
>> On Wed, Sep 13, 2017 at 1:41 AM, Aryeh Weiss <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     I want to thank the many list members who responded to my question.
>>     Most of the ideas revolved around using the particle analyzer and
>>     results table in various  ways.
>>     Michael suggested using the Wand tool -- I had not thought of
>>     that, and it  looks promising.
>>     No one  suggested the tracking tools, but I may combine a tracking
>>     tool that provides coordinates of a track with the wand tool that
>>     will provide the object stats.
>>
>>     Best regards to all
>>     --aryeh
>>
>>
>>     On 11/09/2017 17:24, Michael Schmid wrote:
>>
>>         On 11/09/2017 14:52, Aryeh Weiss wrote:
>>         > I have a stack of objects which swell over time, and want to
>>         follow the area of each object over time. The objects do not
>>         move...
>>
>>
>>         Hi Aryeh,
>>
>>         for me, the easiest solution seems to be a macro:
>>
>>         run 'Analyze Particles' for the first image (center positions
>>         and area)
>>         for each subsequent image:
>>            for all particles in the results table:
>>               doWand at the (center) position of that particle
>>               getStatistics, and enter the area in the table
>>
>>         Before getStatistics, you might check that the wand operation
>>         has been successful: Roi.getBounds(x, y, width, height) should
>>         not reurn the dimensions of the full image and the original
>>         center should be within the Roi.getBounds rectangle.
>>
>>         Michael
>>         ________________________________________________________________
>>         On 11/09/2017 14:52, Aryeh Weiss wrote:
>>         > I have a stack of objects which swell over time, and want to
>>         follow the area of each object over time. The objects do not
>>         move. A typical stack, following thresholding, can be found here:
>>         >
>>         https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M
>> /view?usp=sharing
>>         <https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3
>> M/view?usp=sharing>
>>
>>         > Notice how the objects swell as the slider is advanced.
>>         There is an occasional artifact in the form of a spurious
>>         object that pops up in some slice, but that is easily rejected
>>         (for example by noting that is is very different than anything
>>         in the previous slice).
>>         >
>>         > I can measure the objects with the particle analyzer, and
>>         then use the results table to find the areas. However,
>>         associating an object in one slice with the corresponding
>>         object in the next slice is a bit awkward, though certainly
>>         doable. I figured that the many powerful tracking tools can
>>         help, and indeed they can find tracks quick easily, because
>>         there is practically no movement. Yet I cannot quite get what
>>         I want, which is a table for each "track" that contains the
>>         areas of the objects in that track. With each tracking plugin
>>         I have some problem. For example, Trackmate does not seem to
>>         like having objects of widely varying size (there is an
>>         inquiry about this in the archives). Most of the tracking
>>         plugins assume some size, or expect that we are working with
>>         particles or droplets. MTrack2 did pretty well, but I did not
>>         see how to go  back and identify the objects that belong to
>>         each track. And it also split some of the largest objects.
>>         >
>>         > So before I just do it by brute force using the results
>>         table, I am wondering if someone has already done this, and
>>         can show me a simple way to do it.
>>         >
>>         > Thanks in advance
>>         > --aryeh
>>         >
>>
>>         --         ImageJ mailing list: http://imagej.nih.gov/ij/list.
>> html
>>         <http://imagej.nih.gov/ij/list.html>
>>
>>
>>     --     Aryeh Weiss
>>     Faculty of Engineering
>>     Bar Ilan University
>>     Ramat Gan 52900 Israel
>>
>>     Ph:  972-3-5317638
>>     FAX: 972-3-7384051
>>
>>     --
>>     ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>     <http://imagej.nih.gov/ij/list.html>
>>
>>
>>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: swelling of objects over time

Aryeh Weiss
Hi Jeffrey,

Thank you for your reply. Your macro does what is needed, and can be
modified ot provide what I need.
However, the Connected Component Analysis plugin in MorphoLibj
eliminated to the need for the double loop
that finds the connected path, so I will use that.  Try it on the the
synthetic image that your macro generates.

Not only that, but I realized that I can easily get the areas by just
taking a histogram of each slice, since the objects are consistently
numbered. Or even better, I can get it in one shot by using the particle
analyzer on the labeled stack that CCA generates, because the mean value
of the objects is also their label, so the results table contains the
slice number and object label in each line.

This is  great program, and what makes it really great is this community
that in two days has provided me with 3 or 4 solutions.

Best regards
--aryeh

On 13/09/2017 20:10, Jeffrey Murphy wrote:

> Hi Aryeh,
>
> I have a suggestion to offer for your tracking challenge. There was a
> chemist seeking help in the ImageJ subreddit with a time-series
> showing crystals growing in situ. The challenge is quite similar to
> what you described, so I'd suggest checking the thread:
>
> https://www.reddit.com/r/ImageJ/comments/3euehw/need_help_creating_a_particle_numbering_scheme/
>
> Here's an example macro that I wrote to illustrate an approach,
> similar to what others have described here:
>
> https://github.com/MurphysLab/r_ImageJ/blob/master/itemize_stack_particles.ijm
>
> The macro is self-contained: It generates a set of sample images as a
> test and analyzes them, as would be expected, as a proof of concept.
> If that's what you're working toward, feel free to adapt it further.
>
> Cheers,
> Jeffrey Murphy
>
> *
> Postdoctoral Researcher
> Functional Materials and Devices Laboratory
> Eindhoven University of Technology
> *
>
>
> On Wed, Sep 13, 2017 at 5:39 PM, Aryeh Weiss <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Curtiss
>
>     Thank you for your detailed reply.
>
>     On 13/09/2017 17:31, Curtis Rueden wrote:
>
>         Hi Aryeh,
>
>         > No one  suggested the tracking tools, but I may combine a
>         tracking
>         > tool that provides coordinates of a track with the wand tool
>         that will
>         > provide the object stats.
>
>         Firstly, I think your data is very clean, and there is no need
>         here for manual analysis with e.g. the wand tool.
>
>         There may be a couple of reasons no one discussed the tracking
>         tools:
>
>         1) Your stated goal, to compute areas of largely stationary
>         objects over time, can be done with a connected component
>         analysis (CCA).
>
>         I briefly played with your data in TrackMate [1]. I was able
>         to get reasonable tracks using the DoG segmenter, with 120
>         micron blob size, and threshold of 5, and everything else
>         default settings:
>
>         Inline image 1
>
>         However, the current version of TrackMate always has fixed
>         spot size, which does not jive with your stated goal of
>         computing area which varies over time. You would need to take
>         the resultant spots, and then use their centroids to do a CCA
>         or similar thing regardless. IIUC, a future version of
>         TrackMate [2] will be a lot more flexible in this regard.
>
>     Indeed, Trackmate does ok, but notice that it still has split some
>     of the objects in some of the slices.
>
>         I then tried the Connected Components Labeling plugin, part of
>         MorphoLibJ [3], and it did an excellent job of labeling your
>         regions.
>
>         Inline image 3
>
>         Relevant macro code:
>
>           run("Connected Components Labeling", "connectivity=6
>         type=[16 bits]");
>           run("glasbey");
>
>         I am not sure of the best way to perform the next step of
>         computing the area of each label. The "Region Morphometry"
>         plugin of MorphoLibJ seems to work, but current slice only.
>         Maybe someone else knows a better way?
>
>     I think that CCA and Region morphology is the way to go. each
>     level has the same labeling, so I can loop through the slices,
>     append the areas to an array, where one index is the label, and
>     that should do it.  Artifacts that occur in fewer than all of the
>     slices will have zeros in their array, and I can discard them.
>
>     I am really glad that you sent this.
>
>         2) You asked this question on the ImageJ mailing list, which
>         tends to have people offering more ImageJ-1.x-centric
>         solutions, rather than on the ImageJ Forum
>         (http://forum.imagej.net/), which tends to have more
>         ImageJ2-and-Fiji-centric advice. If you had posted on the
>         ImageJ Forum, I am guessing you would have gotten a wider
>         breadth of suggestions. There are several tools which could
>         potentially help here—e.g., TrackMate; MorphoLibJ; BioVoxxel
>         toolbox [4]; Bio7 [5]; KNIME Image Processing [6]. Any or all
>         of these tools have features which are relevant here.
>         Unfortunately, it is not possible to @mention these folks on
>         the mailing list, except to CC them in reply, which for many
>         people's email configuration is likely to make no difference
>         in whether they see it.
>
>     I am still "old fashioned" in this respect, and am not comfortable
>     with forums.
>     I am very glad that the IJ mailing list is still going. I remember
>     when Image Pro Plus moved to a forum, they shut down the mailing
>     list to force us to move to the forum. That was about when I
>     dropped out and switched to ImageJ, and I never looked back.
>
>     Best regards
>     --aryeh
>
>         Regards,
>         Curtis
>
>         [1] https://imagej.net/TrackMate
>         [2] https://github.com/fiji/TrackMate3
>         <https://github.com/fiji/TrackMate3>
>         [3] https://imagej.net/MorphoLibJ
>         [4] https://imagej.net/BioVoxxel_Toolbox
>         <https://imagej.net/BioVoxxel_Toolbox>
>         [5] https://imagej.net/Bio7
>         [6] https://imagej.net/KNIME
>
>         --
>         Curtis Rueden
>         LOCI software architect - https://loci.wisc.edu/software
>         ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
>         <https://imagej.net/User:Rueden <https://imagej.net/User:Rueden>>
>         Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
>         On Wed, Sep 13, 2017 at 1:41 AM, Aryeh Weiss
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>
>             I want to thank the many list members who responded to my
>         question.
>             Most of the ideas revolved around using the particle
>         analyzer and
>             results table in various  ways.
>             Michael suggested using the Wand tool -- I had not thought of
>             that, and it  looks promising.
>             No one  suggested the tracking tools, but I may combine a
>         tracking
>             tool that provides coordinates of a track with the wand
>         tool that
>             will provide the object stats.
>
>             Best regards to all
>             --aryeh
>
>
>             On 11/09/2017 17:24, Michael Schmid wrote:
>
>                 On 11/09/2017 14:52, Aryeh Weiss wrote:
>                 > I have a stack of objects which swell over time, and
>         want to
>                 follow the area of each object over time. The objects
>         do not
>                 move...
>
>
>                 Hi Aryeh,
>
>                 for me, the easiest solution seems to be a macro:
>
>                 run 'Analyze Particles' for the first image (center
>         positions
>                 and area)
>                 for each subsequent image:
>                    for all particles in the results table:
>                       doWand at the (center) position of that particle
>                       getStatistics, and enter the area in the table
>
>                 Before getStatistics, you might check that the wand
>         operation
>                 has been successful: Roi.getBounds(x, y, width,
>         height) should
>                 not reurn the dimensions of the full image and the
>         original
>                 center should be within the Roi.getBounds rectangle.
>
>                 Michael
>                
>         ________________________________________________________________
>                 On 11/09/2017 14:52, Aryeh Weiss wrote:
>                 > I have a stack of objects which swell over time, and
>         want to
>                 follow the area of each object over time. The objects
>         do not
>                 move. A typical stack, following thresholding, can be
>         found here:
>                 >
>         https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
>         <https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing>
>                
>         <https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing
>         <https://drive.google.com/file/d/0Bytu294eIohja1poTDRwbUctN3M/view?usp=sharing>>
>
>
>                 > Notice how the objects swell as the slider is advanced.
>                 There is an occasional artifact in the form of a spurious
>                 object that pops up in some slice, but that is easily
>         rejected
>                 (for example by noting that is is very different than
>         anything
>                 in the previous slice).
>                 >
>                 > I can measure the objects with the particle
>         analyzer, and
>                 then use the results table to find the areas. However,
>                 associating an object in one slice with the corresponding
>                 object in the next slice is a bit awkward, though
>         certainly
>                 doable. I figured that the many powerful tracking
>         tools can
>                 help, and indeed they can find tracks quick easily,
>         because
>                 there is practically no movement. Yet I cannot quite
>         get what
>                 I want, which is a table for each "track" that
>         contains the
>                 areas of the objects in that track. With each tracking
>         plugin
>                 I have some problem. For example, Trackmate does not
>         seem to
>                 like having objects of widely varying size (there is an
>                 inquiry about this in the archives). Most of the tracking
>                 plugins assume some size, or expect that we are
>         working with
>                 particles or droplets. MTrack2 did pretty well, but I
>         did not
>                 see how to go  back and identify the objects that
>         belong to
>                 each track. And it also split some of the largest objects.
>                 >
>                 > So before I just do it by brute force using the results
>                 table, I am wondering if someone has already done
>         this, and
>                 can show me a simple way to do it.
>                 >
>                 > Thanks in advance
>                 > --aryeh
>                 >
>
>                 --         ImageJ mailing list:
>         http://imagej.nih.gov/ij/list.html
>         <http://imagej.nih.gov/ij/list.html>
>                 <http://imagej.nih.gov/ij/list.html
>         <http://imagej.nih.gov/ij/list.html>>
>
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


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

Re: swelling of objects over time

Aryeh Weiss
In reply to this post by ctrueden
Hi Curtis,

On 13/09/2017 19:49, Curtis Rueden wrote:

> Hi Aryeh,
>
> > Indeed, Trackmate does ok, but notice that it still has split some of
> > the objects in some of the slices.
>
> Right. That's why I said, "You would need to take the resultant spots,
> and then use their centroids to do a CCA or similar thing regardless."
> Because the current TrackMate explicitly assumes blobs of fixed size.
>
> > I think that CCA and Region morphology is the way to go.
>
> Great, very glad this will work! :-)
>
> > I am still "old fashioned" in this respect, and am not comfortable
> > with forums.
>
> What would make it comfortable for you? Would it be enough if you
> could: A) receive email notification of new posts in categories and/or
> tags of interest; B) reply to those posts via email; and maybe C)
> start new topics via email? At that point you could largely just treat
> it like a mailing list, right? Any other requirements which would make
> it more palatable?
A and B would do it. C is less important, since I do not initiate
threads that often, but it would be convenient.

I just logged onto the forum, and set mailing list mode, which may
implement A.
It would be nice to find a way to integrate the forum with the mailing list.

Best regards
--aryeh

>
> Regards,
> Curtis
>
> --
> Curtis Rueden
> LOCI software architect - https://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden 
> <https://imagej.net/User:Rueden>
> Did you know ImageJ has a forum? http://forum.imagej.net/
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


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

Re: swelling of objects over time

Gabriel Landini
Hi Aryeh,
An interesting problem. If your regions do not merge (and the temporary small
mergings and splits are considered to be just artefacts), I thought that a
slight modification of what was posted before is much simpler:
Do a *Z-maximum* projection for the stack.
Then analyse the regions in that projection, they will contain all the
subregions that get momentarily detached and merged in the final footprint and
the footprint regions will be as large as the largest swollen area.
As an estimate of the area, you can use the Integer density (divided by 255)
to get the number of white pixel in the stack based on the footprint regions
in the projection.

You can do this using Particles 8 plugin and this macro code (mind the line
breaks:

//---------------8<---------------------
selectWindow("swellingStack.tif");
sl=nSlices();
run("Z Project...", "projection=[Max Intensity]");
selectWindow("MAX_swellingStack.tif");
for (i=1;i<=sl;i++){
  selectWindow("swellingStack.tif");
  setSlice(i);
  run("Duplicate...", "title=ttt");
  selectWindow("MAX_swellingStack.tif");
  run("Particles8 ", "white show=Particles display  redirect=ttt");
  close("ttt");
}
//---------------8<---------------------

The results table will list the regions in the projection in the same order in
the stack, slice by slice. So it would me a matter of looking at equidistant
rows to follow the fate of a given region across the stack.
The column you want is labelled GrIntDen in the results table.
You can also spot the regions in the projection that are not constant across
the stack as they will have a GrIntDen of 0 in some row.

You could also do this via region connection calculus, doing it on 2
consecutive slices at a time:
 http://www.mecourse.com/landinig/software/spatial/rcc8d.html
but the above seems much simpler.

Hope it helps.

Gabriel

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

Re: swelling of objects over time

Aryeh Weiss
Hi Gabriel,

Thank you for your reply. It is very clever.
In my case, I found that the following  lines did the trick:

run("Connected Components Labeling", "connectivity=6 type=[16 bits]");
labeledTitle = getTitle();  // I always like to get a handle on
generated images.
setThreshold(1, 65535);
run("Analyze Particles...", "display exclude clear summarize add in_situ
stack");

The results table is set to include the mean and the slice number.
The mean is the object number,  the slice number is the time point, and
the area measurement is what I need.

The small regions are indeed artifacts, but I now eliminate them in the
segmentation phase.
Any small objects that are disconnected and do not appear in every frame
are eliminated when I analyze the results.
It does not get much simpler...

Best regards
--aryeh

On 14/09/2017 11:40, Gabriel Landini wrote:

> Hi Aryeh,
> An interesting problem. If your regions do not merge (and the temporary small
> mergings and splits are considered to be just artefacts), I thought that a
> slight modification of what was posted before is much simpler:
> Do a *Z-maximum* projection for the stack.
> Then analyse the regions in that projection, they will contain all the
> subregions that get momentarily detached and merged in the final footprint and
> the footprint regions will be as large as the largest swollen area.
> As an estimate of the area, you can use the Integer density (divided by 255)
> to get the number of white pixel in the stack based on the footprint regions
> in the projection.
>
> You can do this using Particles 8 plugin and this macro code (mind the line
> breaks:
>
> //---------------8<---------------------
> selectWindow("swellingStack.tif");
> sl=nSlices();
> run("Z Project...", "projection=[Max Intensity]");
> selectWindow("MAX_swellingStack.tif");
> for (i=1;i<=sl;i++){
>    selectWindow("swellingStack.tif");
>    setSlice(i);
>    run("Duplicate...", "title=ttt");
>    selectWindow("MAX_swellingStack.tif");
>    run("Particles8 ", "white show=Particles display  redirect=ttt");
>    close("ttt");
> }
> //---------------8<---------------------
>
> The results table will list the regions in the projection in the same order in
> the stack, slice by slice. So it would me a matter of looking at equidistant
> rows to follow the fate of a given region across the stack.
> The column you want is labelled GrIntDen in the results table.
> You can also spot the regions in the projection that are not constant across
> the stack as they will have a GrIntDen of 0 in some row.
>
> You could also do this via region connection calculus, doing it on 2
> consecutive slices at a time:
>   http://www.mecourse.com/landinig/software/spatial/rcc8d.html
> but the above seems much simpler.
>
> Hope it helps.
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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