[Insight-users] how to use ReinitializeLevelSetImageFilter
Baoyun Li
baoyun_li123 at yahoo.com
Mon Mar 1 14:56:14 EST 2010
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*************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100301/60fef9aa/attachment.htm>
More information about the Insight-users
mailing list