[Insight-users] itk::ChangeLabelImageFilter

Henning Meyer tutmann at gmail.com
Wed Jun 7 10:15:10 EDT 2006


I see. But what do I do wrong:

This works:

	ChangeLabelFilterType::ChangeMapType changeMap;
// some code to set the map
	LabeledImageIteratorType watershedIt( watershedImage,
watershedImage->GetBufferedRegion() );
	for(watershedIt.GoToBegin(); !watershedIt.IsAtEnd(); ++watershedIt)
		watershedIt.Set( changeMap[ watershedIt.Get() ] );

But this does not:
	ChangeLabelFilterType::Pointer labelChanger = ChangeLabelFilterType::New();
	labelChanger->SetInput( watershedImage );
	labelChanger->SetChangeMap( changeMap );
	labelChanger->Update();
	LabeledImageType::Pointer labelChangedImage = labelChanger->GetOutput();

Thanks for your help!

Henning


2006/6/7, Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
> Hi,
>
> The ChangeLabelImageFilter works without problem (for me).
> Most of the code is in the functor declared in the header: this filter use
> the UnaryFunctorImageFilter to simplify its implementation.
>
> Gaetan
>
>
> On Wed, 07 Jun 2006 15:36:52 +0200, Henning Meyer <tutmann at gmail.com>
> wrote:
>
> > Hello,
> >
> > maybe a stupid question:
> > Does itk::ChangeLabelImageFilter (ITK 2.6) do anything usefull at all?
> > The source just looks like an empty template generated filter.
> >
> > Did I do something wrong?
> >
> > Thanks for your help!
> >
> > Henning
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
>
> --
> 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