[Insight-users] Mean shift clustering example

David Doria daviddoria+itk at gmail.com
Tue Mar 16 18:52:05 EDT 2010


I am trying to make an example out of the Test for
SampleMeanShiftClusteringFilter

http://www.itk.org/Wiki/ITK/InsightClopedia/MeanShiftClustering

Can anyone comment on what the KdTreeGenerator is doing? and the
HypersphereKernelMeanShiftModeSeeker? and MeanShiftModeCacheMethod?
and this:

  while ( fo_iter != fo_end )
    {
    io_iter.Set( (PixelType) fo_iter.GetMeasurementVector()[0]) ;
    ++fo_iter ;
    ++io_iter ;
    }

I understand that the image needs to be blurred before running any
segmentation, but can this filter be used in a simple way like:

 typedef itk::Statistics::SampleMeanShiftBlurringFilter< TreeType >
    FilterType ;
  FilterType::Pointer filter = FilterType::New() ;
  filter->SetInputSample( tree ) ;
  filter->Update() ;

  typedef itk::Statistics::SampleMeanShiftClusteringFilter< TreeType >
    ClusteringMethodType ;

  ClusteringMethodType::Pointer clusteringMethod =
    ClusteringMethodType::New() ;
  clusteringMethod->SetInputSample( treeGenerator2->GetOutput() ) ;
  clusteringMethod->SetThreshold( 0.5 ) ;
  clusteringMethod->SetMinimumClusterSize( 16 ) ;
  clusteringMethod->Update() ;

It seems like 150 lines to run this filter is a bit outrageous, no?

Thanks,

David


More information about the Insight-users mailing list