[vtkusers] Build 3D Mesh from vtkImageData using vtkMarchingCubes - holes filling ?

Bill Lorensen bill.lorensen at gmail.com
Tue Dec 6 12:19:29 EST 2011


Another possible solution is to convert your image data to a
rectilinear grid. The rectilinear grid supports non uniform spacing.
Once converted you would use vtkContourFilter rather than Marching
Cubes. It will be slower.

Bill

On Tue, Dec 6, 2011 at 12:16 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Marching Cubes is the correct filter and your results look good
> (except for the missing slice. You could try to create a missing slice
> by creating a new slice. Maybe by averaging the slice above and below
> the missing slice.
>
> Why is the data missing?
>
> On Tue, Dec 6, 2011 at 12:03 PM, Malsoaz James <jmalsoaz at yahoo.fr> wrote:
>> Dear VTK users
>>
>> I'm trying to build a 3D mesh from a vtkImageData using vtkMarchingCubes.
>> The vtkImageData is build from a list of 2D binary slices.
>>
>> vtkMarchingCubes works great. But when a slice(s) is(are) missing, it
>> creates a hole in the 3D mesh (see image in attachment).
>>
>> 1 - How can I fill this kind of hole ? Ideally, I would like to link the two
>> parts of the mesh
>>
>> 2 - I found a solution in the use of a resampler (vtkImageResample,
>> vtkImageShrink3D, don't know which one is recommanded). Unfortunately, it
>> sometimes produces ugly mesh with "stair effect" when the spacing is too big
>> (still there after decimate and smooth). Is it a good solution ? How to
>> solve the stair problem ?
>>
>> 3 - Browsing the mailing list brings me to the notion of "repair hole" for
>> marching cubes. I don't know a lot about it. But should I look into this ?
>> Some solutions exist for this such as http://www.opentopology.org/
>>
>> 4 - Is vtkMarchingCubes the class I should use for my purpose or should I
>> look at vtkVoxelContoursSurfaceFilter or any other filter ?
>>
>>
>> Thank you for you help.
>> Best.
>>
>>
>>
>>
>> _______________________________________________
>> 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



More information about the vtkusers mailing list