<DIV>I have figured out this problem. It is because of the data type. Thanks.</DIV>
<DIV>Anyway, the comments or suggestions are welcome!</DIV>
<DIV> </DIV>
<DIV>Jane</DIV>
<DIV><BR><BR><B><I>Jane Meinel <myitk@yahoo.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<DIV>Dear all,</DIV>
<DIV>I want to build one hybrid image segmentation framework with ITK class. The work flow is:</DIV>
<DIV>Input Image -->(1) FuzzyConnectedness Segmentation -->(2) VoronoiDiagram Segmentation -->(3) Laplacian Level Set Segmentation</DIV>
<DIV>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.</DIV>
<DIV>I set output of (2) as itk::Image<float, 2 > to fit the (3)'s input.</DIV>
<DIV>And the main code of (3) step is:</DIV>
<DIV>**************************************************************************************</DIV>
<DIV> ReaderType::Pointer reader = ReaderType::New();<BR> reader->SetFileName("BrainT1Slice.png");<BR></DIV>
<DIV> BinaryThresholdType::Pointer thresholder = BinaryThresholdType::New();<BR> <BR> thresholder->SetUpperThreshold( 10.0 );<BR> thresholder->SetLowerThreshold( 0.0 );</DIV>
<DIV> thresholder->SetOutsideValue( 0 );<BR> thresholder->SetInsideValue( 255 );</DIV>
<DIV> DiffusionFilterType::Pointer diffusion = DiffusionFilterType::New();<BR> diffusion->SetNumberOfIterations( 10 );<BR> diffusion->SetTimeStep(0.20);<BR> diffusion->SetConductanceParameter( 2.0 );</DIV>
<DIV> LaplacianSegmentationLevelSetImageFilterType::Pointer laplacianSegmentation =<BR> LaplacianSegmentationLevelSetImageFilterType::New();</DIV>
<DIV> laplacianSegmentation->SetCurvatureScaling( 1.0 );<BR> laplacianSegmentation->SetPropagationScaling( 1.0 );</DIV>
<DIV> laplacianSegmentation->SetMaximumRMSError( 0.002 );<BR> laplacianSegmentation->SetMaximumIterations( 100 );</DIV>
<DIV> laplacianSegmentation->SetIsoSurfaceValue( 127.5);</DIV>
<DIV> diffusion->SetInput( reader->GetOutput() );<BR> laplacianSegmentation->SetInput( voronoisegmenter->GetOutput() );<BR> laplacianSegmentation->SetFeatureImage( diffusion->GetOutput() );<BR> thresholder->SetInput( laplacianSegmentation->GetOutput() );</DIV>
<DIV> </DIV>
<DIV> WriterType::Pointer writer = WriterType::New();</DIV>
<DIV> writer->SetFileName("FuzzyLevelSetSegment.png");<BR></DIV>
<DIV> writer->SetInput( thresholder->GetOutput() );<BR> try<BR> {<BR> writer->Update();<BR> }<BR> catch( itk::ExceptionObject & excep )<BR> {<BR> std::cerr << "Exception caught !" << std::endl;<BR> std::cerr << excep << std::endl;<BR> }<BR></DIV>
<DIV>Are there something wrong in the above code? How should I set the correct parameters? </DIV>
<DIV>Thanks a lot!</DIV>
<DIV> </DIV>
<DIV>Jane</DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR>Win 1 of 4,000 free domain names from Yahoo! <A href="http://us.rd.yahoo.com/evt=26640/*http://promotions.yahoo.com/goldrush">Enter now</A>._______________________________________________<BR>Insight-users mailing list<BR>Insight-users@itk.org<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br>
<a
href="http://us.rd.yahoo.com/mail_us/taglines/msgr/evt=26088/*http://messenger.yahoo.com">Y! Messenger</a> - Communicate in real time. Download now.