[vtkusers] Generate Mesh - Finite Element Analysis
    Paul Jhin 
    paul.jhin1 at gmail.com
       
    Sun Jan  4 09:22:49 EST 2009
    
    
  
Hi,
I'm trying to generate a mesh for export and analysis via finite element.
But the original mesh are very triangle.
If you apply the filter mesh decimação is a little deformed.
The Imagedata is generated from a CT 512x512 with 200 slices.
What can I doing wrong ?
The Code:
        mcubes = vtk.vtkMarchingCubes()
        mcubes.GetOutput().ReleaseDataFlagOff()
        mcubes.SetInput(_imagedata)
        mcubes.SetValue(0, 4)
        mcubes.ComputeGradientsOn()
        mcubes.Update()
        smoother = vtk.vtkSmoothPolyDataFilter()
        smoother.GetOutput().ReleaseDataFlagOff()
        smoother.SetInput(mcubes.GetOutput())
        smoother.SetNumberOfIterations(5)
        smoother.SetRelaxationFactor(0.70)
        smoother.SetFeatureAngle(70)
        smoother.FeatureEdgeSmoothingOn()
        smoother.BoundarySmoothingOn()
        smoother.Update()
        normals = vtk.vtkPolyDataNormals()
        normals.GetOutput().ReleaseDataFlagOff()
        normals.SetInput(smoother.GetOutput())
        normals.SetFeatureAngle(80)
        normals.Update()
        stripper = vtk.vtkStripper()
        stripper.SetInput(normals.GetOutput())
        stripper.GetOutput().ReleaseDataFlagOff()
        stripper.Update()
        mesh =  normals.GetOutput()
Regards
Paul Jhin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090104/ad4390f2/attachment.htm>
    
    
More information about the vtkusers
mailing list