[Insight-users] how to use ReinitializeLevelSetImageFilter
Luis Ibanez
luis.ibanez at kitware.com
Mon Mar 1 18:50:20 EST 2010
Hi Baoyun,
It looks like you missed to call the method:
SetLevelSetValue()
before you called Update() in the filter.
For guidance, please look at the file:
Insight/Testing/Code/Algorithms/
itkReinitializeLevelSetImageFilterTest.cxx
Regards,
Luis
------------------------------------------------------
On Mon, Mar 1, 2010 at 2:56 PM, Baoyun Li <baoyun_li123 at yahoo.com> wrote:
> Dear All:
>
> I tried to use ReinitializeLevelSetImageFilter. The output looks weird to
> me.
>
> The input to the filter is binary image binary image with float type
> (255 as forground, 0 as background).
>
> I tried narroow band on and off. However, the output of this filter gives
> very high value (10^38) for voxles inside the binary mask. Almost all the
> outside mask voxels has value zero.
>
> Below is my code, can somebody tell where I made mistake.
>
> Baoyun
>
>
> **************************code************************
> typedef typename itk::ReinitializeLevelSetImageFilter< FeatureImageType
> > DistanceFilterType;
> typename DistanceFilterType::Pointer DistanceFilter =
> DistanceFilterType::New();
> DistanceFilter->SetInput( thresholder->GetOutput() );
> // DistanceFilter->NarrowBandingOn();
> // DistanceFilter->SetNarrowBandwidth( 10 );
> try
> {
> DistanceFilter->Update();
> }
> catch( itk::ExceptionObject & excep )
> {
> std::cerr << "Exception caught !" << std::endl;
> std::cerr << excep << std::endl;
> }
>
> m_levelset2=DistanceFilter->GetOutput();
>
> ****************code end*************************
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100301/0919e21e/attachment.htm>
More information about the Insight-users
mailing list