[Insight-users] opening and closing
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Wed Jun 7 14:27:04 EDT 2006
Hi,
Some time ago (I think it was in January), I sent a modified version of those
filters to Jim, to implement an option to avoid border effects, and to fix
the typedef bug. It seems that's not fixed yet in the toolkit. Jim ?
I'm not a GraftOutput() expert, but I have also done the GraftOutput like you
in those files.
http://voxel.jouy.inra.fr/darcsweb/darcsweb.cgi?r=topHat;a=headblob;f=/itkGrayscaleMorphologicalOpeningImageFilter.txx
Gaetan
On Wednesday 07 June 2006 19:42, Marius Staring wrote:
> Hi,
>
> there are bugs in the GrayscaleMorphologicalClosingImageFilter and
> GrayscaleMorphologicalOpeningImageFilter.
>
> In the GenerateData() method of the closing the following typedefs
>
> /** set up erosion and dilation methods */
> typename GrayscaleDilateImageFilter<TInputImage, TOutputImage,
> TKernel>::Pointer
> dilate = GrayscaleDilateImageFilter<TInputImage, TOutputImage,
> TKernel>::New();
>
> typename GrayscaleErodeImageFilter<TInputImage, TOutputImage,
> TKernel>::Pointer
> erode = GrayscaleErodeImageFilter<TInputImage, TOutputImage,
> TKernel>::New();
>
> should be
>
> /** set up erosion and dilation methods */
> typename GrayscaleDilateImageFilter<TInputImage, TOutputImage,
> TKernel>::Pointer
> dilate = GrayscaleDilateImageFilter<TInputImage, TOutputImage,
> TKernel>::New();
>
> typename GrayscaleErodeImageFilter<TInputImage, TOutputImage,
> TKernel>::Pointer
> erode = GrayscaleErodeImageFilter<TOutputImage, TOutputImage,
> TKernel>::New();
>
> Something similar holds for the opening, but then the other way around.
>
> Another thing: the opening and closing code are not really consistent
> with each other. The ReleaseDataFlagOn() is in the closing set for both
> the erosion and the dilation, but for the opening only for the dilation.
> Also the grafting is strange: for the closing we have:
>
> this->GraftOutput( erode->GetOutput() );
>
> and for the opening
>
> this->GraftOutput( this->GetOutput() );
>
> where I would expect
>
> this->GraftOutput( dilate->GetOutput() );
>
> I don't really get the grafting, but the laws of comparing things tell
> me something could be wrong. Can someone clarify this?
>
> Cheers,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060607/6f5ff49b/attachment.pgp
More information about the Insight-users
mailing list