[vtkusers] iteratively update the vertices positions.

Dongqing Chen dqchen at cvip.louisville.edu
Mon Aug 13 11:31:55 EDT 2007


Hi, Meisam: 

   Thanks for your replying. 

   Actually, since I need to update all the new vertex positions based on their previous ones and some curvature flow criteria, during each iteration, I keep the previous polydate dataset structure, (say vtkPolypData *poly=vtkPolyData::New()), and assign the new vertex position to a newly generated polydata dataset polyNew. Finally during each iteration, I regenerate all the normals of polyNew, then I delete the poly and polyNew. Starting from a new interation, I transfer the normals to the poly which is generated again.  

  To be simple, let me summarize what I did:
 1) create poly and polyNew;  poly takes the input dataset, while polyNew is designed to take the updated vertex positions during each iteration. 
    I am also thinking a question: how to keep the exact structures of poly and polyNew?
2). Based on its old position and curature flow criteria, I iteratively change the vertice position. 
3). At the end of each iteration, I generate all the new normals of polyNew, which will be transfered to the poly generated in next iteration.
4). keep doing until all iterations are finished.
5). delete poly or polyNew during each iteration or after all the iterations, which really depends on where I create them, during each iteration or before all the iterations?

 Hope it is more clear this time. Otherwise, I will post some patches of my code.
 
 
Best Wishes,
-----------------------------------------------------------------
Dongqing Chen
Ph.D Candidate
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)
-----------------------------------------------------------------
  ----- Original Message ----- 
  From: Meisam Aliroteh 
  To: Dongqing Chen 
  Cc: vtkusers at vtk.org 
  Sent: Sunday, August 12, 2007 8:07 PM
  Subject: Re: [vtkusers] iteratively update the vertices positions.


  Hi Dongqing,

  I have implemented programs where I update position of vertices in a for-loop and it never crashed. Basically the Delete() method will not crash just because you iteratively change vertex positions. If your program crashes, it is because of something else. From your explanation it is not clear what is the cause of the problem. Maybe you can give more details!? Also including parts of your code that is causing the problem can be very helpful. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070813/33796d75/attachment.htm>


More information about the vtkusers mailing list