[Insight-users] opening and closing
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Thu Jun 8 04:23:04 EDT 2006
Quoting "Miller, James V (GE, Research)" <millerjv at crd.ge.com>:
> Gaetan,
>
> If these are the filters with "SafeBordersOn/Off", then we are still at
> the
> stage
> where you need to convince me that the only way to get the correct
> answer is
> to
> pad the images.
Yes, that's those filters.
But I was not thinking about adding this feature, but rather about fixing
the
type bug.
For the border effects, I'm still waiting for someone to comment the
changes
made in the article in Febrary. All the combinations of border values are
tested, and none of those combinations give a correct result...
Gaetan
>
> Jim
>
> -----Original Message-----
> From: Gaetan Lehmann [mailto:gaetan.lehmann at jouy.inra.fr]
> Sent: Wednesday, June 07, 2006 2:27 PM
> To: Miller, James V (GE, Research); Marius Staring
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] opening and closing
>
>
>
> 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,
>
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-users
mailing list