<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    No answer yet on this question.<br>
    <br>
    Just to mention this is a problem for me as I'm working on meshes
    expressed in geographical coordinates, i.e. sometimes having large
    values (typically over 1e7) which are unaccurately represented by
    float variables.<br>
    <div class="moz-forward-container"><br>
      Any idea / comment ?<br>
      <br>
      <br>
      -------- Message original --------
      <table class="moz-email-headers-table" cellpadding="0"
        cellspacing="0" border="0">
        <tbody>
          <tr>
            <th valign="BASELINE" align="RIGHT" nowrap="nowrap">Sujet: </th>
            <td>vtkDecimatePro not fully working with vtkDouble polydata</td>
          </tr>
          <tr>
            <th valign="BASELINE" align="RIGHT" nowrap="nowrap">Date&nbsp;: </th>
            <td>Wed, 27 Nov 2013 18:58:52 +0100</td>
          </tr>
          <tr>
            <th valign="BASELINE" align="RIGHT" nowrap="nowrap">De&nbsp;: </th>
            <td>pof <a class="moz-txt-link-rfc2396E" href="mailto:jd379252@gmail.com">&lt;jd379252@gmail.com&gt;</a></td>
          </tr>
          <tr>
            <th valign="BASELINE" align="RIGHT" nowrap="nowrap">Pour&nbsp;: </th>
            <td><a class="moz-txt-link-abbreviated" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>Hi vtk'ers,

I have a mesh with points defined as vtkDouble:
    vtkPoints *MeshPoints = vtkPoints::New(VTK_DOUBLE);
and with a regular vtkCellArray:
    vtkCellArray *MeshCells = vtkCellArray::New();

The mesh is build as usual with:
    vtkPolyData *MeshPolyData;
    MeshPolyData-&gt;SetPoints(MeshPoints);
    MeshPolyData-&gt;SetPolys(MeshCells);

Now I need to perform a mesh decimation of this mesh, and I'm doing 
nothing special:
    vtkDecimatePro *deci = vtkDecimatePro::New();
    deci-&gt;SetInput(MeshPolyData);
    deci-&gt;SetTargetReduction(DecimationFactor);
    deci-&gt;PreserveTopologyOn();
    deci-&gt;BoundaryVertexDeletionOn();
    deci-&gt;SetMaximumError(VTK_DOUBLE_MAX);
    deci-&gt;Update();

The problem I am facing is that the resulting decimated mesh is actually 
based on vtkFloat:
    int type = deci-&gt;GetOutput()-&gt;GetPoints()-&gt;GetDataType();

i.e. type = 10 (VTK_FLOAT), wheras I would have expected 11 (VTK_DOUBLE) 
as for the original mesh.

I would have though that the data type of the decimated mesh should have 
been the same as the input mesh, which is not the case.
Is this a bug? Or have I missed something?

Thanks in advance for your help/advice.
Pof
</pre>
      <br>
    </div>
    <br>
  
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
        <tr>
                <td style='border:none;padding:0px 15px 0px 8px'>
                        <a href="http://www.avast.com/">
                                <img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
                        </a>
                </td>
                <td>
                        <p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
                                Ce courrier Ã©lectronique ne contient aucun virus ou logiciel malveillant parce que la protection <a href="http://www.avast.com/">Antivirus avast!</a> est active.
                        </p>
                </td>
        </tr>
</table>
<br />
</body>
</html>