[Insight-users] simple contour extractor for binary images

jerome schmid jerome.schmid at ircad.u-strasbg.fr
Mon Jul 12 04:36:12 EDT 2004


Hi everybody,

Reading the mailing lists, I have noticed that a user Yu long was looking
for a contour extractor in itk. Luis Ibanez answered him that such filter is
not directly implemented in ikt but that it will be easy to do it. I have
done one for my personal use and I test it on binary images, and it seems to
work fine... So please test it freely and send me any feddback if there are
some porblems.

Simple use:

typedef itk::SimpleContourExtractorImageFilter< InImageType, OutImageType >
ContourFilterType;
ContourFilterType::Pointer contourFilter	= ContourFilterType::New();

// set input foreground and background values
contourFilter->SetInputForegroundValue( 255 ); // let's suppose for example
that 0, 255 belong to InImage and OutImage pixel type
contourFilter->SetInputBackgroundValue( 0 );

// idem for background
contourFilter->SetOutputForegroundValue( 255 );
contourFilter->SetOutputBackgroundValue( 0 );

contourFilter->SetInput( previousFilter->GetOutput() );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkSimpleContourExtractorImageFilter.h
Type: application/octet-stream
Size: 5673 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040712/27a92587/itkSimpleContourExtractorImageFilter.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkSimpleContourExtractorImageFilter.txx
Type: application/octet-stream
Size: 6514 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040712/27a92587/itkSimpleContourExtractorImageFilter-0001.obj


More information about the Insight-users mailing list