[Insight-users] itk::ChangeLabelImageFilter

Miller, James V (GE, Research) millerjv at crd.ge.com
Thu Jun 8 10:56:13 EDT 2006


I think Dirk Padfield or Tim Kelliher wrote the ChangeLabelImageFilter.  I'll have one them take
a look at the SetChangeMap() issue.

Jim

-----Original Message-----
From: insight-users-bounces+millerjv=crd.ge.com at itk.org
[mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
Henning Meyer
Sent: Wednesday, June 07, 2006 10:15 AM
To: Gaetan Lehmann
Cc: insight-users at itk.org
Subject: Re: [Insight-users] itk::ChangeLabelImageFilter


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
>
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list