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

Dominique Töpfer dominique at toepfer-web.de
Tue Dec 6 13:19:39 EST 2011


Hi,

maybe morphological closing on your 3D build is also an option.

HTH
Dominique

On 06.12.2011 19:09, Malsoaz James wrote:
> Thank you Bill for your answer.
>
> The input vtkImageData is the result of a segmentation process. 
> Sometimes, the segmentation is not perfect, part of the object can be 
> missing on a slice. For now, I can't know automatically if a slice is 
> missing or not before the 3D build. Thus, I can't create it manually. 
> I thought Marching cubes was able to deal with this kind of problem, 
> apparently not.
>
> I will look at your solution and let you know.
>
> In any case, the resampler solution works, it is just not really 
> suitable for bad resolution.
>
> Best.
>
> ------------------------------------------------------------------------
> *De :* Bill Lorensen <bill.lorensen at gmail.com>
> *À :* Malsoaz James <jmalsoaz at yahoo.fr>
> *Cc :* "vtkusers at vtk.org" <vtkusers at vtk.org>
> *Envoyé le :* Mardi 6 Décembre 2011 18h19
> *Objet :* Re: [vtkusers] Build 3D Mesh from vtkImageData using 
> vtkMarchingCubes - holes filling ?
>
> 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 <mailto: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 
> <mailto: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
>
>
>
>
> _______________________________________________
> 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


-- 
Dominique Töpfer, Dipl.-Inform.
Institute of Medical Physics
University of Erlangen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111206/355e9932/attachment.htm>


More information about the vtkusers mailing list