Login  Register

Re: hacking help, please

Posted by Kenneth Sloan-2 on Sep 01, 2010; 9:23pm
URL: http://imagej.273.s1.nabble.com/hacking-help-please-tp3687063p3687065.html

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]