[vtkusers] Re: vtkDataSetSurfaceFilter and vtkImageMarchingCubes cannot extract the right surface

Xin Guan xinvar at gmail.com
Wed Aug 9 17:11:34 EDT 2006


Hi I figured out why I couldn't get vtkImageMarchingCubes to show the whole
surface.

When using glDrawArrays, it should be:

glDrawArrays ( GL_TRIANGLES,0, pSurface->GetNumVertices());

Instead of

glDrawArrays ( GL_TRIANGLES,0, pSurface->GetNumTriangles());



- xin
On 8/9/06, Xin Guan <xinvar at gmail.com> wrote:
>
>  Hi,
>
> I'm trying to extract the outer surface of a brain volume data. I tried
> both vtkDataSetSurfaceFilter and vtkImageMarchingCubes (marching cubes
> algorithm goes after thresholding and smoothing). However, neither of them
> give the correct surface.
>
> vtkDataSetSurfaceFilter will only give the volume bounding box surface --
> well in some sense it IS the outer surface, just too out. Result remains the
> same after thresholding.
>
> vtkImageMarchingCubes gives a nice surface, but only the lower 1/4 part of
> the volume. I read the vtkImageMarchingCubes documentation, but have no clue
> why this would happen.
>
> The data set is converted from ITK and should be okay. I manually
> constructed it and got the same error.
>
> I would appreciate any help.
>
> - xin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060809/2204f342/attachment.htm>


More information about the vtkusers mailing list