[vtkusers] vtkm help with using the CleanGrid filter
allison.vacanti at kitware.com
Thu Jun 27 11:14:25 EDT 2019
For the clean grid filter, you can just use the `vtkmCleanGrid` filter in
VTK, which takes care of the conversions and everything for you.
If you want to use the vtk-m filters directly with a dataset built using
tovtkm::Convert, it is necessary to pass a Policy to the filter so that it
is aware of the custom data structures used to adapt VTK into VTK-m. See
the Accelerators/Vtkm/vtkmCleanGrid.cxx file in VTK for an example of this:
auto result = filter.Execute(in, policy);
On Thu, Jun 27, 2019 at 11:06 AM sunayanag <sunayanag at gmail.com> wrote:
> Hi All,
> Just started using vtk-m and having some issues with the CleanGrid filter.
> Assuming that vtkMesh is an object of type vtkSmartPointer<vtkPolyData>,
> here is the piece of code
> vtkm::cont::DataSet mMesh = tovtkm::Convert(vtkMesh,
> vtkm::filter::CleanGrid cleanGrid;
> vtkm::cont::DataSet outMesh = cleanGrid.Execute(mMesh);
> catch(std::exception& e)
> std::cerr << e.what();
> where the exception thrown is: /Could not find appropriate cast for cell
> could anyone help with what I am getting wrong.
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers