Login  Register

Re: Analyze particles ...: Help and bug

Posted by Md Tamjidul Hoque on May 27, 2010; 4:11am
URL: http://imagej.273.s1.nabble.com/Analyze-particles-Help-and-bug-tp3688137p3688149.html

Thanks Gabriel to clarify the problem and for providing the suggestion.

-Tamjid

Gabriel Landini wrote:

> On Wednesday 26 May 2010  14:16:58 you wrote:
>  
>> But, the outputs differ and the outlined of the circularity set is not
>> fully overlapped with the previous outline as generated in image #1.
>> So the outcome looks distorted (image #4:
>> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/3_Ci
>> rcularitybasedsubsetMaskfirst.zip?attredirects=0&d=1) and for some
>> images/case the outputs look very bad.
>>    
>
>  
>> So, please help on this issue. I am not sure if it is due to different
>> line-thickness or different outlining algorithms ....
>>    
>
> I think that this may be due to a known mismatch of the outlines of a ROI with
> the pixels of a ROI. This was raised recently in the fiji-devel list.
> I do not think that there is a solution currently unless you treat the blobs
> in the same way.
>
> My suggestion is to make your own routine to draw the boundaries of ROIs as
> the pixels that  touch the background. For example, assuming white objects on
> a black background:
>
> setBatchMode(true);
> a=getTitle();
> run("Duplicate...", "title=test-1");
> selectWindow("test-1");
> run("Minimum...", "radius=0.5");
> imageCalculator("Subtract", a,"test-1");
> setBatchMode(false);
>
> You can do this also with Binary Thinning in a 1 line macro:
>
> run("BinaryThin ", "kernel_a='2 1 2 1 1 1 2 1 2 ' rotations='none'
> iterations=1 white");
>
> This guarantees that all the pixels of the boundary of the blob are contained
> in the blob that you see.
> Otherwise, IJ  gets the ROI of the blob and draws the outline which in not
> completely contained in the blob.
>
> If you want to show certain blobs, then use the XStart YStart coordinates to
> produce an image with only those pixels set and use the BinaryRreconstruct
> plugin in my page to recreate only those particles (the seed is the points you
> set and the mask is the original binary image).
>
> Cheers
> G
>
>