[vtkusers] vtkTransform problem: really roundoff error?

Michele Conconi michele.conconi at unibo.it
Mon Feb 8 12:57:40 EST 2010


David Gobbi wrote:
> Hi Michele,
>
> You might be exhausting the 32-bit limit on the timestamps.  VTK uses
> timestamps to decide when things should be updated.  It uses an
> unsigned long to store the timestamp, and any time that a VTK object
> is "modified", the global VTK "timestamp" is incremented.
>
> Ordinarily, timestamp overflows do not occur in VTK, but you have a
> loop of 20000 followed by a loop of 1e7, inside of which you modifying
> VTK objects.  So you are essentially forcing an overflow to occur.
> (Note that loops of this size occur in VTK all the time, but usually
> only when iterating over data containers or doing other things that
> don't cause timestamp changes).
>
> It is easy for you to check whether timestamp overflow is the cause of
> your problems.  Just check to see if (transform->GetMTime() >
> 2147483647) and if it is, you are halfway towards an overflow.
>
> If timestamp overflow is the problem, the two ways to fix it are (1)
> re-write your code so that VTK objects aren't modified as often, e.g.
> by using non-VTK objects for computation inside the tightest loops, or
> (2) compile VTK as 64-bit, because even the loopiest program cannot
> overflow a 64-bit timestamp.
>
>    David
>
>
>   

Thank you very much David, that was exactly the problem.
I agree with everyone suggested me to modify my code and I will. Still, 
I could possible encounter again the same problem even with less 
inversion. Indeed, any modification affect the timestamp and I still 
have to modify many times my vtkTransform. Of course I can do something 
like delete and recreate the vtkTransform after a while, to reset the 
timestamp, but this should slow down my code. Do you know if there is a 
different way to obtain the same result, something like setMTime(zero)? 
What the purpose of timestamp? Why should I be limited in the number of 
modification to a vtk object?

Thank you once again, I feel much better now :)

michele
-- 
* Eng. Michele Conconi*
Ph.D. student
DIEM - Dept. of Mechanical Engineering
Alma Mater Studiorum - University of Bologna
Viale Risorgimento 2, 40136, Bologna, Italy
Email: michele.conconi at unibo.it
Website: http://www.diem.ing.unibo.it/grab
Office: (+39) 051 20 93451
Mobile: (+39) 329 0287996



* INFORMAZIONE RISERVATA E CONFIDENZIALE *
Questo messaggio contiene informazioni riservate e confidenziali.
Se il lettore non fosse il destinatario del messaggio, inoltrato e 
ricevuto per errore,
il testo dovrà essere immediatamente cancellato dal computer del ricevente.
E' assolutamente proibita qualunque circolazione, disseminazione o
copia del messaggio spedito e/o ricevuto per errore.

* CONFIDENTIALITY and WARNING NOTICE *
This message may contain legally privileged or confidential information.
If the reader is not the intended recipient, you received this message 
in error
and it should therefore be deleted from your computer at once.
Any dissemination, distribution and copying of a message
mistakenly sent or received is strictly forbidden.



More information about the vtkusers mailing list