[Insight-users] confidence connected filter applied to brain web data: the example gives incorrect segmentation!

Luis Ibanez luis.ibanez at kitware.com
Sun Sep 14 11:48:15 EDT 2008



Hi Sara,


                 Thanks for pointing this out.


You have indeed found a bug in this section of the ITK Software Guide.

After playing with the code, and reviewing the locations of the seed
point, we found that three of them are poorly located.


We have fine tunned their locations to the following indices:


  InternalImageType::IndexType index1;
  index1[0] = 118;
  index1[1] = 133;
  index1[2] = 92;
  confidenceConnected->AddSeed( index1 );

  InternalImageType::IndexType index2;
  index2[0] = 63;
  index2[1] = 135;
  index2[2] = 94;
  confidenceConnected->AddSeed( index2 );

  InternalImageType::IndexType index3;
  index3[0] = 63;
  index3[1] = 157;
  index3[2] = 90;
  confidenceConnected->AddSeed( index3 );

  InternalImageType::IndexType index4;
  index4[0] = 111;
  index4[1] = 150;
  index4[2] = 90;
  confidenceConnected->AddSeed( index4 );

  InternalImageType::IndexType index5;
  index5[0] = 111;
  index5[1] = 50;
  index5[2] = 88;
  confidenceConnected->AddSeed( index5 );


Please find attached a corrected version of the source code.


You can run this program with the following command line:

  ./ConfidenceConnected brainweb165a10f17.mha segment.mhd

It should run in about 20 seconds.



Please give it a try and let us know if you find
any problems,


     Thanks


        Luis


----------------------------

BTW:
Please note that you don't need to use atoi() in the expression

       index1[0] = atoi("118");

You can simply do

       index1[0] = 118;


------------------------------------------------------------------
sara meghellati wrote:
> Hi Luis ,
> Unless I'm mistaken, I have applied the confidence connected filter as 
> descripted in the itk book page 507,  but I couldn't get te same result 
> as in the book ! the segmentation is very bad.
> I have applied this filter to the 
> volume /BrainPart2/Brain/brainweb165a10f17.mha  using 
> itk::GradientAnisotropicDiffusionImageFilter
> with the folling param
> //filter->SetNumberOfIterations( 2 );
> //filter->SetTimeStep( 0.05 );
> //filter->SetConductanceParameter( 3 );
> and
> confidenceConnected->SetMultiplier(2.5 );
> // confidenceConnected->SetNumberOfIterations(5);
> // confidenceConnected->SetReplaceValue(255);
> // confidenceConnected->SetInitialNeighborhoodRadius(2);
>  
> and the seeds points
>  
> InputImageType::IndexType index1;
> // index1[0] = atoi("118"); // Convert a string to integer.
> // index1[1] = atoi("85");
> // index1[2] = atoi("92");
> //
> // InputImageType::IndexType index2;
> // index2[0] = atoi( "63" );
> // index2[1] = atoi( "87" );
> // index2[2] = atoi( "94" );
> //
> // InputImageType::IndexType index3;
> // index3[0] = atoi( "63" );
> // index3[1] = atoi( "157" );
> // index3[2] = atoi( "90" );
> //
> // InputImageType::IndexType index4;
> // index4[0] = atoi( "111" );
> // index4[1] = atoi( "188" );
> // index4[2] = atoi( "90" );
> //
> // InputImageType::IndexType index5;
> // index5[0] = atoi( "111" );
> // index5[1] = atoi( "50" );
> // index5[2] = atoi( "88" );
>  
> As you can see all the parms that I have used as the same as described 
> in the book.
> please could you chek and tell me if I'm wrong.
>  
> Thanks
> Sara
>  
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConfidenceConnected.cxx
Type: text/x-c++src
Size: 3852 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080914/4b7b4950/attachment.cxx>


More information about the Insight-users mailing list