BinaryReconstruct.

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

BinaryReconstruct.

Simon Roussel
Hi,
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.
Thanks in advance,
Simon
Reply | Threaded
Open this post in threaded view
|

Re: BinaryReconstruct.

Gabriel Landini
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
Reply | Threaded
Open this post in threaded view
|

Re: BinaryReconstruct.

Simon Roussel
In reply to this post by Simon Roussel
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
>=========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: BinaryReconstruct.

Gabriel Landini
On Friday 27 April 2007 09:39:14 Simon Roussel wrote:
> ff.fill(x, y); on line 172 does exactly the job I was looking for. Great !

Thanks for checking this. I will modify the plugin to accommodate for
4-connectivity too, and do some more testing to see if I can get the Binary
FilterReconstruct plugin to handle 4-conn. as well.

Regards,

Gabriel