Bad marching cube quality

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Bad marching cube quality

Martin
I tried the example for marching cube here http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes and I have to say that I'm a bit disappointed. The result sphere looks pretty bad. There are even holes in the sphere. Is it possible to increase the quality of the final output?
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Darshan Pai-2
you can try adding one of the smoothing filters, like vtkSmoothPolyDataFilter etc.

On Fri, Feb 1, 2013 at 4:44 PM, Martin <[hidden email]> wrote:
I tried the example for marching cube here
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes and I have
to say that I'm a bit disappointed. The result sphere looks pretty bad.
There are even holes in the sphere. Is it possible to increase the quality
of the final output?



--
View this message in context: http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Bill Lorensen
That example is for a binary volume. Thus the poor quality. When run
on a grayscale volume results will be much better.


On Fri, Feb 1, 2013 at 4:46 PM, Darshan Pai <[hidden email]> wrote:

> you can try adding one of the smoothing filters, like
> vtkSmoothPolyDataFilter etc.
>
>
> On Fri, Feb 1, 2013 at 4:44 PM, Martin <[hidden email]> wrote:
>>
>> I tried the example for marching cube here
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes and I
>> have
>> to say that I'm a bit disappointed. The result sphere looks pretty bad.
>> There are even holes in the sphere. Is it possible to increase the quality
>> of the final output?
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>> _______________________________________________
>> 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
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Bill Lorensen
Look at this example:
http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/IsosurfaceSampling

I will put a more representative marching cubes example on the wiki in
the soon. The one labeled MarchingCubes is not representative of the
algorithm.

Bill

On Fri, Feb 1, 2013 at 4:51 PM, Bill Lorensen <[hidden email]> wrote:

> That example is for a binary volume. Thus the poor quality. When run
> on a grayscale volume results will be much better.
>
>
> On Fri, Feb 1, 2013 at 4:46 PM, Darshan Pai <[hidden email]> wrote:
>> you can try adding one of the smoothing filters, like
>> vtkSmoothPolyDataFilter etc.
>>
>>
>> On Fri, Feb 1, 2013 at 4:44 PM, Martin <[hidden email]> wrote:
>>>
>>> I tried the example for marching cube here
>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes and I
>>> have
>>> to say that I'm a bit disappointed. The result sphere looks pretty bad.
>>> There are even holes in the sphere. Is it possible to increase the quality
>>> of the final output?
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> 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
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>> _______________________________________________
>> 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
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Martin
That looks interesting, unfortunately I'm not sure if that helps me because I don't have an Isosurface but voxel data.
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Bill Lorensen
You just read your data with an appropriate reader and pass it to
marching cubes.

Bill

On Fri, Feb 1, 2013 at 8:07 PM, Martin <[hidden email]> wrote:

> That looks interesting, unfortunately I'm not sure if that helps me because I
> don't have an Isosurface but voxel data.
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226p5718232.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Martin
This post was updated on .
Ok I know what you mean. But I don't know how to do that.

Maybe I should discribe what I want to achive:
1. Read a polygonal mesh from blender.
2. convert it to volume data.
3. apply boolean operations on those volume data.
4. convert it back to a polygonal mesh.

What I did so far:
1. I read polygonal data from blender.
2. Convert it to vtkPolyData.
3. then I use vtkVoxelModeller to get voxels.
4. pass the vtkVoxelModeller to vtkMarchingCubes.

The results looks like this:


Maybe I should not use vtkVoxelModeller?
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Bill Lorensen
VoxelModeller creates a binary volume. This is not good for you application.

Why not do the booleans directly with the meshes?

On Sat, Feb 2, 2013 at 5:32 PM, Martin <[hidden email]> wrote:

> Ok I know what you mean. But I don't know how to do that:
>
> Maybe I should discribe what I want to achive:
> 1. Read a polygonal mesh from blender.
> 2. convert it to volume data.
> 3. apply boolean operations on those volume data.
> 4. convert it back to a polygonal mesh.
>
> What I did so far:
> 1. I read polygonal data from blender.
> 2. Convert it to vtkPolyData.
> 3. then I use vtkVoxelModeller to get voxels.
> 4. pass the vtkVoxelModeller to vtkMarchingCubes.
>
> The results looks like this:
> <http://vtk.1045678.n5.nabble.com/file/n5718239/Monkey.png>
>
> Maybe I should not use vtkVoxelModeller?
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226p5718239.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Martin
Yes thats a good question. I tried this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter
My first modification of this example crashed already. (My only modification was that I used a cube instead of a sphere)
So this boolean filter doesn't seem very robust.
My idea is to work with voxels instead of polygons because adding/deleting voxels should be much more robust than cutting polygons.
Are there any alternatives to voxelmodeller?
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Bill Lorensen
I suggest trying the example with your real data.

You should be able to pass you .vtk files on the command line.

Also, what version of VTK are you using?

On Sun, Feb 3, 2013 at 9:06 AM, Martin <[hidden email]> wrote:

> Yes thats a good question. I tried this example:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter
> My first modification of this example crashed already. (My only modification
> was that I used a cube instead of a sphere)
> So this boolean filter doesn't seem very robust.
> My idea is to work with voxels instead of polygons because adding/deleting
> voxels should be much more robust than cutting polygons.
> Are there any alternatives to voxelmodeller?
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226p5718243.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Martin
Version 5.10.1
I will try it with my real data. Thank you bill so far. :)
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Bill Lorensen
There some robustness issues with the boolean classes, but if your
meshes are "well-behaved" you might be OK.

On Sun, Feb 3, 2013 at 11:18 AM, Martin <[hidden email]> wrote:

> Version 5.10.1
> I will try it with my real data. Thank you bill so far. :)
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Bad-marching-cube-quality-tp5718226p5718245.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Bad marching cube quality

Martin
Ok I'll try it. Thank you!