[Insight-users] How to set parameters of LaplacianSegmentationLevelSetImageFilter?

Jane Meinel myitk at yahoo.com
Fri Sep 3 10:33:52 EDT 2004


I have figured out this problem. It is because of the data type. Thanks.
Anyway, the comments or suggestions are welcome!
 
Jane


Jane Meinel <myitk at yahoo.com> wrote:
Dear all,
I want to build one hybrid image segmentation framework with ITK class. The work flow is:
Input Image -->(1) FuzzyConnectedness Segmentation -->(2) VoronoiDiagram Segmentation -->(3) Laplacian Level Set Segmentation
I use BrainT1Slice.png to do a test. The result of every step is written to a .png file. The (1) and (2) work well. The result .png is reasonable. But (3) has no result. The .png file is just black.
I set output of (2) as itk::Image<float, 2 > to fit the (3)'s input.
And the main code of (3) step is:
**************************************************************************************
 ReaderType::Pointer reader = ReaderType::New();
 reader->SetFileName("BrainT1Slice.png");

 BinaryThresholdType::Pointer thresholder = BinaryThresholdType::New();
                        
 thresholder->SetUpperThreshold( 10.0 );
 thresholder->SetLowerThreshold( 0.0 );
 thresholder->SetOutsideValue(  0  );
 thresholder->SetInsideValue(  255 );
 DiffusionFilterType::Pointer diffusion = DiffusionFilterType::New();
 diffusion->SetNumberOfIterations( 10 );
 diffusion->SetTimeStep(0.20);
 diffusion->SetConductanceParameter( 2.0 );
 LaplacianSegmentationLevelSetImageFilterType::Pointer laplacianSegmentation =
                LaplacianSegmentationLevelSetImageFilterType::New();
 laplacianSegmentation->SetCurvatureScaling( 1.0 );
 laplacianSegmentation->SetPropagationScaling( 1.0 );
 laplacianSegmentation->SetMaximumRMSError( 0.002 );
 laplacianSegmentation->SetMaximumIterations( 100 );
 laplacianSegmentation->SetIsoSurfaceValue( 127.5);
 diffusion->SetInput( reader->GetOutput() );
 laplacianSegmentation->SetInput( voronoisegmenter->GetOutput() );
 laplacianSegmentation->SetFeatureImage( diffusion->GetOutput() );
 thresholder->SetInput( laplacianSegmentation->GetOutput() );
 
 WriterType::Pointer writer = WriterType::New();
 writer->SetFileName("FuzzyLevelSetSegment.png");

 writer->SetInput( thresholder->GetOutput() );
 try
    {
  writer->Update();
    }
 catch( itk::ExceptionObject & excep )
    {
  std::cerr << "Exception caught !" << std::endl;
  std::cerr << excep << std::endl;
    }

Are there something wrong in the above code? How should I set the correct parameters? 
Thanks a lot!
 
Jane


---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now._______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users

		
---------------------------------
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20040903/beaad97b/attachment.htm


More information about the Insight-users mailing list