Hi Dan,<br>
<br>
Thank you for your suggestion. Unfortunately, this didn't help. I got the same binary output. Do you know any other possible reasons?<br><br><div class="gmail_quote">On Wed, Apr 22, 2009 at 2:01 AM, Dan Mueller <span dir="ltr"><<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi DING Feng,<br>
<br>
Try setting the output spacing and origin *before* updating the filter:<br>
<div class="im"><br>
> marcher->SetTrialPoints( points );<br>
> marcher->SetSpeedConstant( 1.0 );<br>
> marcher->SetStoppingValue( 100.0 );<br>
> marcher->SetOutputSize( size );<br>
<br>
</div>marcher->SetOutputSpacing( spacing );<br>
marcher->SetOutputOrigin( origin );<br>
<br>
This may be the source of your problem... FYI I use this filter<br>
regularly without issue.<br>
<br>
Hope this helps.<br>
<br>
Regards, Dan<br>
<br>
2009/4/21 Feng Ding <<a href="mailto:carlding@gmail.com">carlding@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Dear list,<br>
><br>
> I'm trying to use itkFastMarchingImageFilter by following the examples in<br>
> the ITK source tree. Instead of getting a time arrival image which is<br>
> similar to a distance map in this case, I only got a binary image with 0<br>
> inside (a sphere) and 1.70141e+38 outside. I have tested my code on both<br>
> 3.10 and 3.12 releases of ITK, and got the same results. Following is part<br>
> of my code:<br>
><br>
> // >>>>>>>>>> begin >>>>>>>>>><br>
> index[0] = index[1] = index[2] = 100;<br>
> node.SetIndex( index );<br>
> node.SetValue( 0 );<br>
> points->InsertElement( 0, node );<br>
><br>
> marcher->SetTrialPoints( points );<br>
> marcher->SetSpeedConstant( 1.0 );<br>
> marcher->SetStoppingValue( 100.0 );<br>
> marcher->SetOutputSize( size );<br>
> marcher->DebugOn();<br>
> marcher->Update();<br>
> marcher->GetOutput()->SetOrigin( origin );<br>
> marcher->GetOutput()->SetSpacing( spacing );<br>
><br>
> volumeWriter->SetInput( marcher->GetOutput() );<br>
> volumeWriter->SetFileName( "volume.mha" );<br>
> volumeWriter->Write();<br>
> // <<<<<<<<<<<<<<<<<<<<<<<<<<br>
><br>
> Anyone can give me some suggestion on that? Thanks!<br>
><br>
> Best regards,<br>
> DING Feng<br>
</div></div></blockquote></div><br>