[Insight-developers] RE: [Insight-users] Bug in itkFloodFilledFunctionConditionalItera
tor
Miller, James V (Research)
millerjv@crd.ge.com
Mon, 9 Sep 2002 09:28:57 -0400
This is why the non-const versions should be subclasses of the const versions
(with the meet of the algorithm kept in the const version).
> -----Original Message-----
> From: Damion Shelton [mailto:dmshelto@andrew.cmu.edu]
> Sent: Friday, September 06, 2002 3:16 PM
> To: Alberto Bert
> Cc: insight-users@public.kitware.com
> Subject: Re: [Insight-users] Bug in
> itkFloodFilledFunctionConditionalIterator
>
>
> Hi,
>
> Thanks for the fix. It turns out this fix was applied to
> itkFloodFilledFunctionConditionalConstIterator but not the non-const
> version. Both base classes are functionally identical except for the
> const enforcement, so it can be a bit of challenge keeping
> both in sync.
> I've committed the changes you requested to CVS.
>
> Let me know if you have any more problems with flood fill code.
>
> Cheers,
> -Damion-
>
> Alberto Bert wrote:
>
> >On Sep 06 at 03:42PM+0200, Alberto Bert wrote:
> >
> >
> >>>I think I found a little bug in the
> >>>itkFloodFilledFunctionConditionalIterator.txx file.
> >>>
> >>>This bug prevent the floodfill iterator to work correctly
> when used on
> >>>boundaries,
> >>>if you use the iterator on the first slice it will only
> stay on this slice
> >>>because as soon as an index in one dimension is considered
> invalid the other
> >>>is also considered invalid.
> >>>
> >>>
> >>I've found the same problem. I'm using that class, so
> please warn me when it
> >>will be fixed.
> >>
> >>
> >
> >I've watched to the code, and I've seen the bug (thanks Yann.)
> >The problem was the initialization of the m_IsValidIndex
> variable, isn't it?
> >For other users, the following code seems to work:
> >
> >...
> >for(int i=0; i<NDimensions; i++)
> > {
> > // IndexType tempIndex;
> > // m_IsValidIndex = true;
> >
> > // The j loop establishes either left or right
> neighbor (+-1)
> > for(int j=-1; j<=1; j+=2)
> > {
> > IndexType tempIndex;
> > m_IsValidIndex = true;
> > // build the index of a neighbor
> > for(int k=0; k<NDimensions; k++)
> > ...
> >
> >Bye,
> >Alberto
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users@public.kitware.com
> >http://public.kitware.com/mailman/listinfo/insight-users
> >
> >
> >
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>