[vtkusers] some problems when visualizing the polydata after mesh deformation.

Dongqing Chen dqchen at cvip.louisville.edu
Mon Nov 27 15:04:01 EST 2006


Dear All:

    I am doing some research on PDE-based curve or surface envoving. I want to visualize the position change of each vertice on the mesh surface before and after mesh deformation. 

   I have all the new positions of all the vertex after each iteration. And the program was complied very well, but some acceesible problems were generated. 

   Some code patches are listed below. Any one could help me?

 **************************************************************************************
// Create a double array which represents new points.
        vtkDoubleArray* ptcoords = vtkDoubleArray::New();
        // Create vtkPoints and assign pcoords as the internal data array.
        vtkPoints* points = vtkPoints::New();
        points->SetNumberOfPoints(numPoints); 

  normals->Update(); //vtk demand driven language

   for (int i = 0; i < numPoints; i++)
  {
    This part for getting new position of each vertice is just omitted 
    
 }

//Set the newly obtained position to Tuple
ptcoords->SetTuple(i,vertexNew); 
points->SetData(ptcoords);
// Assign points and cells
polyNew->SetPoints(points);

vertexNew contains all the new positions of vertex. The accessible problem occurs on running ptcoords->SetTuple(i,vertexNew); 
**************************************************************************************

Best Wishes,
-----------------------------------------------------------------
Dongqing Chen
Ph.D Research Assistant
Rm. 07, Paul C. Lutz Hall
Computer Vision & Image Processing (CVIP) Lab
Department of Electrical & Computer Engineering
Speed School of Engineering
University of Louisville
Louisville, KY. 40292
U.S.A
Email: dqchen at cvip.louisville.edu
Phone:+1-502-852-2789 (Lab)
            +1-502-852-6130 (Office)
-----------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061127/3a2cf437/attachment.htm>


More information about the vtkusers mailing list