<br>Hi Sutrisno,<br><br>The problem is that you are passing an <br>Image as the input to the PolyData writer. <br><br>The Writer expects that its input will be <br>an itkMesh.<br><br>Please look at the following files, as <br>
examples of usage:<br><br>  Insight/Testing/Code/Review/<br>      itkVTKPolyDataWriterTest2.cxx<br>      itkVTKPolyDataWriterTest.cxx<br><br><br>   Regards,<br><br><br>        Luis<br><br><br>-------------------------------------------------------------------<br>
<div class="gmail_quote">On Thu, May 6, 2010 at 11:38 AM, SUTRISNO SUTRISNO <span dir="ltr">&lt;<a href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>&gt;</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;">
<div><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><br><font size="3">Hi luis,<br><br>You said that If I want to save surface <br> I must extract an itkMesh out of the image. <br>When I try extract surface from image (use <span style="font-style: italic;">SurfaceExtraction.cxx</span>) <br>
there was error :<br></font><font size="3"><br>
</font><font size="2">error: no matching function for call to
‘itk::VTKPolyDataWriter&lt;itk::Mesh&lt;double, 3u,
itk::DefaultStaticMeshTraits&lt;double, 3u, 3u, float, float,
double&gt; &gt; &gt;::SetInput(itk::OrientedImage&lt;short int,
3u&gt;*)’<br>
/usr/local/include/InsightToolkit/Review/itkVTKPolyDataWriter.txx:54:
note: candidates are: void
itk::VTKPolyDataWriter&lt;TInputMesh&gt;::SetInput(const TInputMesh*)
[with TInputMesh = itk::Mesh&lt;double, 3u,
itk::DefaultStaticMeshTraits&lt;double, 3u, 3u, float, float,
double&gt; &gt;]</font><br>
<div><br></div>my Listing :<br><br><font size="3"><font size="2">  typedef itk::Mesh&lt;double&gt;                         MeshType;
<br>  typedef itk::BinaryMask3DMeshSource&lt; ImageType, MeshType &gt;   MeshSourceType;
<br><div class="im">    MeshSourceType::Pointer meshSource = MeshSourceType::New();
<br></div>    const PixelType objectValue = static_cast&lt;PixelType&gt;( 1250 );                   <br>    meshSource-&gt;SetObjectValue( objectValue );
<br>    meshSource-&gt;SetInput( reader-&gt;GetOutput() );
<br>  
<br>  typedef itk::VTKPolyDataWriter&lt; MeshType &gt; WriterType;
<br><div class="im">    WriterType::Pointer writer = WriterType::New();
<br>    writer-&gt;SetFileName( argv[2] );
<br></div>    writer-&gt;SetInput( reader-&gt;GetOutput() );
<br>    writer-&gt;Update();</font><br><br></font><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"> <font size="3">Regards,<br><br><br>         Sutrisno</font><br></div></div></div></blockquote></div>