[vtkusers] MarchingCubes on polydata with vtkjs

Sebastien Jourdain sebastien.jourdain at kitware.com
Wed Jul 25 11:10:53 EDT 2018


Polydata are just surface mesh so contouring them will mean creating an iso
line.
We don't have such filter implemented inside vtk.js.

On Wed, Jul 25, 2018 at 6:34 AM marf <marvin.huber at basf.com> wrote:

> Hello guys, I have some polydata and want to extract its surface. I stumble
> upon vtkImageMarchingCubes, which seemed to be exactly what I need. Only it
> is not able to handle polydata. I tried using it like this:
>
> *const cubes = vtk.Filters.General.vtkImageMarchingCubes.newInstance();
> cubes.setContourValue(0.5);
> cubes.setInputConnection(this.reader.getOutputPort());
> cubes.update();
> this.mapper.setInputConnection(cubes.getOutputPort());*
>
> But using it like this throws an error
>
> *ERROR TypeError: o.getOrigin is not a function*
>
> Where, as I figured out, o is my polydata, which indeed does not have a
> getOrigin method. From looking at ImageMarchingCube's code, I also figured
> out it would then need a getSpacing() and getDimensions() method.
> So my question is, what kind of data do I feed to ImageMarchingCubes or is
> there any way to get it to work with polydata?
> Greetings, Marvin
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> Powered by 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180725/08b70e9a/attachment.html>


More information about the vtkusers mailing list