<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>&nbsp;</DIV>
<DIV>Jane</DIV>
<DIV><BR><BR><B><I>Jane Meinel &lt;myitk@yahoo.com&gt;</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&nbsp;build one hybrid image segmentation framework with ITK class. The work flow is:</DIV>
<DIV>Input Image --&gt;(1) FuzzyConnectedness Segmentation --&gt;(2) VoronoiDiagram Segmentation --&gt;(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&lt;float, 2 &gt; to fit the (3)'s input.</DIV>
<DIV>And the main code of (3) step is:</DIV>
<DIV>**************************************************************************************</DIV>
<DIV>&nbsp;ReaderType::Pointer reader = ReaderType::New();<BR>&nbsp;reader-&gt;SetFileName("BrainT1Slice.png");<BR></DIV>
<DIV>&nbsp;BinaryThresholdType::Pointer thresholder = BinaryThresholdType::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;thresholder-&gt;SetUpperThreshold( 10.0 );<BR>&nbsp;thresholder-&gt;SetLowerThreshold( 0.0 );</DIV>
<DIV>&nbsp;thresholder-&gt;SetOutsideValue(&nbsp; 0&nbsp; );<BR>&nbsp;thresholder-&gt;SetInsideValue(&nbsp; 255 );</DIV>
<DIV>&nbsp;DiffusionFilterType::Pointer diffusion = DiffusionFilterType::New();<BR>&nbsp;diffusion-&gt;SetNumberOfIterations( 10 );<BR>&nbsp;diffusion-&gt;SetTimeStep(0.20);<BR>&nbsp;diffusion-&gt;SetConductanceParameter( 2.0 );</DIV>
<DIV>&nbsp;LaplacianSegmentationLevelSetImageFilterType::Pointer laplacianSegmentation =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LaplacianSegmentationLevelSetImageFilterType::New();</DIV>
<DIV>&nbsp;laplacianSegmentation-&gt;SetCurvatureScaling( 1.0 );<BR>&nbsp;laplacianSegmentation-&gt;SetPropagationScaling( 1.0 );</DIV>
<DIV>&nbsp;laplacianSegmentation-&gt;SetMaximumRMSError( 0.002 );<BR>&nbsp;laplacianSegmentation-&gt;SetMaximumIterations( 100 );</DIV>
<DIV>&nbsp;laplacianSegmentation-&gt;SetIsoSurfaceValue( 127.5);</DIV>
<DIV>&nbsp;diffusion-&gt;SetInput( reader-&gt;GetOutput() );<BR>&nbsp;laplacianSegmentation-&gt;SetInput( voronoisegmenter-&gt;GetOutput() );<BR>&nbsp;laplacianSegmentation-&gt;SetFeatureImage( diffusion-&gt;GetOutput() );<BR>&nbsp;thresholder-&gt;SetInput( laplacianSegmentation-&gt;GetOutput() );</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;WriterType::Pointer writer = WriterType::New();</DIV>
<DIV>&nbsp;writer-&gt;SetFileName("FuzzyLevelSetSegment.png");<BR></DIV>
<DIV>&nbsp;writer-&gt;SetInput( thresholder-&gt;GetOutput() );<BR>&nbsp;try<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;writer-&gt;Update();<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;catch( itk::ExceptionObject &amp; excep )<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;std::cerr &lt;&lt; "Exception caught !" &lt;&lt; std::endl;<BR>&nbsp;&nbsp;std::cerr &lt;&lt; excep &lt;&lt; std::endl;<BR>&nbsp;&nbsp;&nbsp; }<BR></DIV>
<DIV>Are there something wrong in the above code? How should I set the correct&nbsp;parameters? </DIV>
<DIV>Thanks a lot!</DIV>
<DIV>&nbsp;</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.