[vtkusers] Fwd: vtkDecimatePro not fully working with vtkDouble polydata
pof
jd379252 at gmail.com
Sat Nov 30 12:01:36 EST 2013
Thanks Bill for the tip anyway.
The upgrade of my code from 5.10.0 to 6 was on my todo list anyway.
Pof
Le 30/11/2013 17:51, Bill Lorensen a écrit :
> No, looks like that was in vtk6.
>
>
> On Sat, Nov 30, 2013 at 11:11 AM, pof <jd379252 at gmail.com
> <mailto:jd379252 at gmail.com>> wrote:
>
> Hi Bill,
> Thanks, this looks pretty much like what I was looking for.
> My mistake... I should have mentioned that I am using vtk5.10.0,
> in which apparently this method does not exist.
> Is there any equivalent method in vtk5.10.0 ?
> Thanks
> Pof
>
> Le 30/11/2013 14:15, Bill Lorensen a écrit :
>> You can set the precision of the output points:
>>
>> deci->SetOutputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION);
>>
>>
>>
>> On Sat, Nov 30, 2013 at 5:11 AM, pof <jd379252 at gmail.com
>> <mailto:jd379252 at gmail.com>> wrote:
>>
>> No answer yet on this question.
>>
>> 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.
>>
>> Any idea / comment ?
>>
>>
>> -------- Message original --------
>> Sujet: vtkDecimatePro not fully working with vtkDouble polydata
>> Date : Wed, 27 Nov 2013 18:58:52 +0100
>> De : pof <jd379252 at gmail.com> <mailto:jd379252 at gmail.com>
>> Pour : vtkusers at vtk.org <mailto:vtkusers at vtk.org>
>>
>>
>>
>> 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->SetPoints(MeshPoints);
>> MeshPolyData->SetPolys(MeshCells);
>>
>> Now I need to perform a mesh decimation of this mesh, and I'm doing
>> nothing special:
>> vtkDecimatePro *deci = vtkDecimatePro::New();
>> deci->SetInput(MeshPolyData);
>> deci->SetTargetReduction(DecimationFactor);
>> deci->PreserveTopologyOn();
>> deci->BoundaryVertexDeletionOn();
>> deci->SetMaximumError(VTK_DOUBLE_MAX);
>> deci->Update();
>>
>> The problem I am facing is that the resulting decimated mesh is actually
>> based on vtkFloat:
>> int type = deci->GetOutput()->GetPoints()->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
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>> <http://www.avast.com/>
>>
>> Ce courrier électronique ne contient aucun virus ou logiciel
>> malveillant parce que la protection Antivirus avast!
>> <http://www.avast.com/> est active.
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com <http://www.kitware.com>
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
> ------------------------------------------------------------------------
> <http://www.avast.com/>
>
> Ce courrier électronique ne contient aucun virus ou logiciel
> malveillant parce que la protection Antivirus avast!
> <http://www.avast.com/> est active.
>
>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131130/5f0b33ff/attachment.htm>
More information about the vtkusers
mailing list