<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Dear all,<br>
    I'm having some trouble converting an itk::SimplexMesh to itk::Mesh
    using the itkSimplexMeshToTriangleMeshFilter.<br>
    I get some errors while compiling the source code and I'm I have no
    clue about it.<br>
    <br>
    Here is a code snipped with typedefs and declarations. The first
    thing I do is converting my itk::Mesh into a SimplexMesh, after that
    I use it in an segmentation process and afterwards I would like to
    convert it back.<br>
    <br>
    ================================<br>
    <br>
    &nbsp;typedef itk::Mesh&lt;double&gt; MeshType;<br>
    &nbsp;typedef itk::SimplexMesh&lt; double &gt; SimplexMeshType;<br>
    <br>
    &nbsp;typedef itk::SimplexMeshToTriangleMeshFilter&lt; SimplexMeshType,
    MeshType &gt; SimplexMeshToTriangleMeshFilterType;<br>
    <br>
    &nbsp;SimplexMeshToTriangleMeshFilterType::Pointer toMeshFilter =
    SimplexMeshToTriangleMeshFilterType::New();<br>
    &nbsp;toMeshFilter-&gt;SetInput( simplexMesh );<br>
    &nbsp;toMeshFilter-&gt;Update();<br>
    <br>
    <br>
    Here are the compiling errors I get.<br>
    ================================<br>
    <br>
    vtkMySegmentation.cxx: In member function &#8216;void
    KardioSeg::vtkMySegmentation::startSegmentation2()&#8217;:<br>
    <br>
    vtkMySegmentation.cxx:353:60: error: no matching function for call
    to
    &#8216;itk::SimplexMeshToTriangleMeshFilter&lt;itk::SimplexMesh&lt;double&gt;,
    itk::Mesh&lt;double&gt;
    &gt;::SetInput(itk::MeshSource&lt;itk::Mesh&lt;double&gt;
    &gt;::OutputMeshType*)&#8217;<br>
    <br>
    /usr/local/include/InsightToolkit/Common/itkMeshToMeshFilter.txx:47:1:
    note: candidate is: void itk::MeshToMeshFilter&lt;TInputMesh,
    TOutputMesh&gt;::SetInput(const TInputMesh*) [with TInputMesh =
    itk::SimplexMesh&lt;double&gt;, TOutputMesh =
    itk::Mesh&lt;double&gt;]<br>
    In file included from
/usr/local/include/InsightToolkit/BasicFilters/itkSimplexMeshToTriangleMeshFilter.h:190:0,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from vtkMySegmentation.h:19,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from vtkMySegmentation.cxx:1:<br>
    <br>
    /usr/local/include/InsightToolkit/BasicFilters/itkSimplexMeshToTriangleMeshFilter.txx:
    In member function &#8216;void
    itk::SimplexMeshToTriangleMeshFilter&lt;TInputMesh,
    TOutputMesh&gt;::CreateTriangles() [with TInputMesh =
    itk::SimplexMesh&lt;double&gt;, TOutputMesh =
    itk::Mesh&lt;double&gt;]&#8217;:<br>
    <br>
    /usr/local/include/InsightToolkit/BasicFilters/itkSimplexMeshToTriangleMeshFilter.txx:42:3:&nbsp;&nbsp;
    instantiated from &#8216;void
    itk::SimplexMeshToTriangleMeshFilter&lt;TInputMesh,
    TOutputMesh&gt;::GenerateData() [with TInputMesh =
    itk::SimplexMesh&lt;double&gt;, TOutputMesh =
    itk::Mesh&lt;double&gt;]&#8217;<br>
    <br>
    vtkMySegmentation.cxx:536:1:&nbsp;&nbsp; instantiated from here<br>
    /usr/local/include/InsightToolkit/BasicFilters/itkSimplexMeshToTriangleMeshFilter.txx:79:62:
    error: no matching function for call to &#8216;itk::MapContainer&lt;long
    unsigned int, itk::Point&lt;double, 3u&gt;
    &gt;::GetElementIfIndexExists(long unsigned int&amp;,
    itk::AutomaticTopologyMeshSource&lt;itk::Mesh&lt;double&gt;
    &gt;::PointType*)&#8217;<br>
    <br>
    /usr/local/include/InsightToolkit/Common/itkMapContainer.txx:130:1:
    note: candidate is: bool itk::MapContainer&lt;TElementIdentifier,
    TElement&gt;::GetElementIfIndexExists(ElementIdentifier, Element*)
    const [with TElementIdentifier = long unsigned int, TElement =
    itk::Point&lt;double, 3u&gt;, ElementIdentifier = long unsigned int,
    Element = itk::Point&lt;double, 3u&gt;]<br>
    <br>
    /usr/local/include/InsightToolkit/BasicFilters/itkSimplexMeshToTriangleMeshFilter.txx:80:62:
    error: no matching function for call to &#8216;itk::MapContainer&lt;long
    unsigned int, itk::Point&lt;double, 3u&gt;
    &gt;::GetElementIfIndexExists(long unsigned int&amp;,
    itk::AutomaticTopologyMeshSource&lt;itk::Mesh&lt;double&gt;
    &gt;::PointType*)&#8217;<br>
    <br>
    /usr/local/include/InsightToolkit/Common/itkMapContainer.txx:130:1:
    note: candidate is: bool itk::MapContainer&lt;TElementIdentifier,
    TElement&gt;::GetElementIfIndexExists(ElementIdentifier, Element*)
    const [with TElementIdentifier = long unsigned int, TElement =
    itk::Point&lt;double, 3u&gt;, ElementIdentifier = long unsigned int,
    Element = itk::Point&lt;double, 3u&gt;]<br>
    <br>
    /usr/local/include/InsightToolkit/BasicFilters/itkSimplexMeshToTriangleMeshFilter.txx:81:62:
    error: no matching function for call to &#8216;itk::MapContainer&lt;long
    unsigned int, itk::Point&lt;double, 3u&gt;
    &gt;::GetElementIfIndexExists(long unsigned int&amp;,
    itk::AutomaticTopologyMeshSource&lt;itk::Mesh&lt;double&gt;
    &gt;::PointType*)&#8217;<br>
    <br>
    /usr/local/include/InsightToolkit/Common/itkMapContainer.txx:130:1:
    note: candidate is: bool itk::MapContainer&lt;TElementIdentifier,
    TElement&gt;::GetElementIfIndexExists(ElementIdentifier, Element*)
    const [with TElementIdentifier = long unsigned int, TElement =
    itk::Point&lt;double, 3u&gt;, ElementIdentifier = long unsigned int,
    Element = itk::Point&lt;double, 3u&gt;]<br>
    <br>
    ===============================<br>
    <br>
    Has anyone an idea where the problem could be.<br>
    <br>
    Thanks very much.<br>
    <br>
    Sven<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <b><font color="#ff6600" face="Arial"><span style="font-family:
            Arial; color: rgb(255, 102, 0); font-weight: bold;">Fachhochschule

            Dortmund</span></font></b> <br>
      <b><font face="Arial" size="1"><span style="font-size: 7.5pt;
            font-family: Arial; font-weight: bold;">University of
            Applied Sciences and Arts</span></font></b> <br>
      <font style="color: rgb(169, 166, 166);" face="MetaKorrespondenz"
        size="1"><span style="font-size: 9pt; font-family:
          MetaKorrespondenz;"><br>
          Sven Olaf L&uuml;ttmann<br>
          B.Sc. Medizinische Informatik<br>
          <br>
          FB Informatik, Medizinische Informatik<br>
          Emil-Figge-Str. 42<br>
          44227 Dortmund<br>
          <br>
          Raum: EFS 42 B.1.21<br>
          <br>
          Fax: 0231 / 755-6725<br>
          E-Mail: <a href="mailto:sven.luettmann@fh-dortmund.de">sven.luettmann@fh-dortmund.de</a><br>
          Web: <a href="http://www.fh-dortmund.de">http://www.fh-dortmund.de</a></span></font><br>
    </div>
  </body>
</html>