[Insight-users] Bayesian Classifier Initialization filter

Karthik Krishnan Karthik.Krishnan at kitware.com
Sun Apr 16 21:38:40 EDT 2006


On Sat, 2006-04-15 at 13:42 +0200, Aditya Chandramouli wrote:
> Hi,
> 
> I'm working on a project that requires a quick initial segmentation on brain 
> tissue which will then be refined.
> 
> To do this initial segmentation, I've tried the KMeans classification 
> algorithms in the Statistics package (scalar image as well as the kd-tree 
> one). Unfortunately both run very slow on 3D images. The tree-based algorithm 
> takes a very long time to generate the tree (in the order of a few minutes) 
> whereas the equivalent code in another toolkit (FSL) takes just a few 
> seconds.
> 
> I also tried the new BayesianClassifierInitializationImageFilter which is just 
> as slow. However, I would like to try out this filter using the Euclidian 
> distance as membership functions instead of the defaults(Gaussian density 
> functions) to see if it runs any faster.
> 
> Unfortunately, using "custom" membership functions for this filter is not yet 
> documented in the example code and I've not been able to figure it out on my 
> own so far.

The class provides a method SetMembershipFunctions( .. ) where you can
pass in an itk::VectorContainer of membership functions. (the number of
membership functions being the number of classes).

You code would look like:

  BayesianInitializerFilterType::MembershipFunctionContainerPointer 
    densfuncContainer =
BayesianInitializerFilterType::MembershipFunctionContainerType::New();
    
  for( int i=0; i< nclasses; i++)
    {
    // create your own density function and assign default parameters
    MyDensityFunctionType::Pointer df = MyDensityFunctionType::New();
    df->SetParams(..);

    densfuncContainer->InsertElement( i, df );
    }

  bayesianInitFilter->SetMembershipFunctions( densfuncContainer );

> 
> Any help and advice would be most appreciated.
> 

On a side note, you will need to write your own Euclidean density
function. (deriving from itk::DensityFunction). All it needs is to
provide an evaluate method. The only density function already present in
ITK is the GaussianDensityFunction.

Maybe something that looks like

1/[pi * (1 + <x,x>)]

where x is a measurement vector.
 

PS: Let me know if the documentation lacks anything..
> thanks
> 
> -aditya
> _______________________________________________
> 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