Dear Gabriel,
Thanks for your perfect answer,
ff.fill(x, y); on line 172 does exactly the job I was looking for. Great !
I prefer 4-connectivity because I have 4-connected particles to separate !!!
More precisely, I get masks of MRI brain slices. To separate the two
sides/hemispheres, I select/draw manually the midline with a 1 pixel line
selection and erase the mask. When the line is diagonal, the two particles
remain 4-connected but not 8. All left and right hemispheres in a stack are
then extracted automatically with your (now modified) plugin.
Cheers,
Simon
On Thu, 26 Apr 2007 16:33:39 +0100, Gabriel Landini <
[hidden email]>
wrote:
>On Thursday 26 April 2007 15:15:50 Simon Roussel wrote:
>> BinaryReconstruct plugins (thanks to G Landini) works for 8-connected
>> particles. Is there an equivalent (or a simple way to implement as a macro)
>> for 4-connected particles.
>
>Hi Simon,
>
>Not sure if this will help, but try changing
>BinaryReconstruct_.java, line 172 from:
>
>ff.fill8(x, y);
>
>to :
>
>ff.fill(x, y);
>
>This would do 4-connected filling, but not sure whether it would do the trick.
>It may be quicker if you test this and let me know if you get what you expect.
>
>I am not sure about BinaryFilterReconstruct, because that plugins also uses
>dilation and erosion. I'll have to check this.
>
>Just curious, why do you prefer 4-connectivity?
>
>Regards,
>
>Gabriel
>=========================================================================