hacking help, please

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

hacking help, please

Kenneth Sloan-2
I would appreciate pointers, clues, and hints on how to do the following:

a) outline a large, blob-like region in an image
b) within that region, outline MANY small included regions
c) report:
        for the large blob: area
        for EACH small included blob:
                centroid
                area
                integrated intensity
d) subtract all of the included blobs from the large blob, and then report:
        remaining area
        integrated intensity over that area

I can see most of the pieces by pointing and clicking and reading the manual - but it would really help
to see something close to an actual implementation.

My immediate stumbling blocks are:
        * displaying the enclosing blob boundary AND the boundaries of all the smaller blobs
          (my problem is that I can only see the current blob - which then disappears when I start on the next one)
        * details on managing the results

I'm probably more comfortable writing Java code - but I'd be happy to try to do this as a macro.

I'll probably want to use a polygon for the large blob boundary - and fit ellipses to the smaller blobs.

If you care - what I'm measuring are cone inner segments in human retina and mitochondria.  (actually, someone else will sit
at the image and count them - I'm the GUI guy).

To calibrate - I've been creating systems to help people make these sorts of measurements for some 30+ years, and am comfortable writing fairly complicated pieces of Java code - what I need help on are the nitty gritty details.

(perhaps all I need are pointers of the form: "check out tutorial #'s 3, 5, 11, and 43")

Thanks very much - all clues gratefully accepted.  

With luck, I can demo the resulting system, and show off some results, in Luxembourg.

--
Kenneth Sloan
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: hacking help, please

David Webster
Have you looked at "Analyze/Analyze Partices.." and "Analyze/Set
Measurements ..."? This should get a,b, and c.

On Tue, Aug 31, 2010 at 8:27 PM, Kenneth Sloan <[hidden email]>wrote:

> I would appreciate pointers, clues, and hints on how to do the following:
>
> a) outline a large, blob-like region in an image
> b) within that region, outline MANY small included regions
> c) report:
>        for the large blob: area
>        for EACH small included blob:
>                centroid
>                area
>                integrated intensity
> d) subtract all of the included blobs from the large blob, and then report:
>        remaining area
>        integrated intensity over that area
>
> I can see most of the pieces by pointing and clicking and reading the
> manual - but it would really help
> to see something close to an actual implementation.
>
> My immediate stumbling blocks are:
>        * displaying the enclosing blob boundary AND the boundaries of all
> the smaller blobs
>          (my problem is that I can only see the current blob - which then
> disappears when I start on the next one)
>        * details on managing the results
>
> I'm probably more comfortable writing Java code - but I'd be happy to try
> to do this as a macro.
>
> I'll probably want to use a polygon for the large blob boundary - and fit
> ellipses to the smaller blobs.
>
> If you care - what I'm measuring are cone inner segments in human retina
> and mitochondria.  (actually, someone else will sit
> at the image and count them - I'm the GUI guy).
>
> To calibrate - I've been creating systems to help people make these sorts
> of measurements for some 30+ years, and am comfortable writing fairly
> complicated pieces of Java code - what I need help on are the nitty gritty
> details.
>
> (perhaps all I need are pointers of the form: "check out tutorial #'s 3, 5,
> 11, and 43")
>
> Thanks very much - all clues gratefully accepted.
>
> With luck, I can demo the resulting system, and show off some results, in
> Luxembourg.
>
> --
> Kenneth Sloan
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: hacking help, please

dscho
In reply to this post by Kenneth Sloan-2
Hi,

On Tue, 31 Aug 2010, Kenneth Sloan wrote:

> I would appreciate pointers, clues, and hints on how to do the following:
>
> a) outline a large, blob-like region in an image
> b) within that region, outline MANY small included regions
> c) report:
> for the large blob: area
>         for EACH small included blob:
> centroid
> area
> integrated intensity
> d) subtract all of the included blobs from the large blob, and then report:
> remaining area
> integrated intensity over that area

My suggestion:

a) mark the big blob with the freehand ROI tool

b) hold down the Alt key and subtract the many small blobs inside (they
   must not overlap!)

c) add the ROI to the ROI Manager and use More>>Split to get at the
   individual blobs

   mark all ROIs in the ROI manager and Measure (after activating all the
   relevant things in Analyze>Set Measurements...)

The first row in the results table will contain the results for the
"remaining area", the second row for the overall area, and then come the
results for the individual blobs.

No need for additional programming, I guess ;-)

Ciao,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: hacking help, please

Kenneth Sloan
In reply to this post by David Webster
On Sep 1, 2010, at 00:43 , David Webster wrote:

> Have you looked at "Analyze/Analyze Partices.." and "Analyze/Set
> Measurements ..."? This should get a,b, and c.

Perhaps I'm mistaken - I thought these worked only with binary images?

>
> On Tue, Aug 31, 2010 at 8:27 PM, Kenneth Sloan <[hidden email]>wrote:
>
>> I would appreciate pointers, clues, and hints on how to do the following:
>>
>> a) outline a large, blob-like region in an image
>> b) within that region, outline MANY small included regions
>> c) report:
>>       for the large blob: area
>>       for EACH small included blob:
>>               centroid
>>               area
>>               integrated intensity
>> d) subtract all of the included blobs from the large blob, and then report:
>>       remaining area
>>       integrated intensity over that area
>>
>> I can see most of the pieces by pointing and clicking and reading the
>> manual - but it would really help
>> to see something close to an actual implementation.
>>
>> My immediate stumbling blocks are:
>>       * displaying the enclosing blob boundary AND the boundaries of all
>> the smaller blobs
>>         (my problem is that I can only see the current blob - which then
>> disappears when I start on the next one)
>>       * details on managing the results
>>
>> I'm probably more comfortable writing Java code - but I'd be happy to try
>> to do this as a macro.
>>
>> I'll probably want to use a polygon for the large blob boundary - and fit
>> ellipses to the smaller blobs.
>>
>> If you care - what I'm measuring are cone inner segments in human retina
>> and mitochondria.  (actually, someone else will sit
>> at the image and count them - I'm the GUI guy).
>>
>> To calibrate - I've been creating systems to help people make these sorts
>> of measurements for some 30+ years, and am comfortable writing fairly
>> complicated pieces of Java code - what I need help on are the nitty gritty
>> details.
>>
>> (perhaps all I need are pointers of the form: "check out tutorial #'s 3, 5,
>> 11, and 43")
>>
>> Thanks very much - all clues gratefully accepted.
>>
>> With luck, I can demo the resulting system, and show off some results, in
>> Luxembourg.
>>
>> --
>> Kenneth Sloan
>> [hidden email]
>>

--
Kenneth Sloan
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: hacking help, please

Kenneth Sloan-2
In reply to this post by dscho
This looks close - except that I'm not sure I can guarantee that the included
objects will not overlap. [actually, I can pretty much guarantee that they WILL
overlap - they are packed in 3D in such a way that it would be truly tedious to freehand all of the
boundaries]  There are also a LOT of them. My hope was to use the
ellipse tool to have the observer fit ellipses by eye.  Eventually, I might be
ambitious enough to tweak the boundaries of the small blobs with some simple image
processing - but a trained observer is clearly required to provide a starting point for this tweaking.

The freehand tool is probably the right choice for the larger, enclosing region.

But, I really think that I want the observer to input all of the regions separately and then
use the smaller ellipses to create a mask which is then subtracted from the outer region.
It's not correct to view the smaller blobs as "holes" in the larger region.  If I didn't also
want the number (and positions, and some information on size and orientation...) of the smaller
blobs, it would be acceptable to freehand the outer boundary and then the boundary of one
very big and oddly shaped hole - plus a few isolated holes.  But, alas, I do want that info.

So...I'm stuck in that uncomfortable spot where "point and click" doesn't quite work, but
the start-up cost of beginning to write the plugin is a bit high.  My problem is that I haven't written
enough ImageJ plugins to be familiar with all the necessary classes - and I haven't (yet) written
any ImageJ plugins that do this sort of user-interaction.

Time to block out an afternoon to slog through the API, I guess.

I could still use advice on:
        *controlling the appearance of the many blobs (I want persistent outlines for multiple ROIs)
        *creating a binary image showing the combined footprint of the many small blobs
        *modifying the large enclosing blob by subtracting out the binary image of that footprint


and, of course - any snippets of concrete code that do anything remotely similar.



On Sep 1, 2010, at 05:13 , Johannes Schindelin wrote:

> Hi,
>
> On Tue, 31 Aug 2010, Kenneth Sloan wrote:
>
>> I would appreciate pointers, clues, and hints on how to do the following:
>>
>> a) outline a large, blob-like region in an image
>> b) within that region, outline MANY small included regions
>> c) report:
>> for the large blob: area
>>        for EACH small included blob:
>> centroid
>> area
>> integrated intensity
>> d) subtract all of the included blobs from the large blob, and then report:
>> remaining area
>> integrated intensity over that area
>
> My suggestion:
>
> a) mark the big blob with the freehand ROI tool
>
> b) hold down the Alt key and subtract the many small blobs inside (they
>   must not overlap!)
>
> c) add the ROI to the ROI Manager and use More>>Split to get at the
>   individual blobs
>
>   mark all ROIs in the ROI manager and Measure (after activating all the
>   relevant things in Analyze>Set Measurements...)
>
> The first row in the results table will contain the results for the
> "remaining area", the second row for the overall area, and then come the
> results for the individual blobs.
>
> No need for additional programming, I guess ;-)
>
> Ciao,
> Johannes

--
Kenneth Sloan
[hidden email]