[Insight-users] get bounds an actor in thread

David Cole dlrdave at aol.com
Mon Apr 15 16:28:20 EDT 2013


You have to synchronize access to VTK objects with the main GUI thread, 
where they typically exist and are called from.

VTK is not, generally speaking, safe for access from multiple threads 
unless you take care to lock your access to them with a mutex or 
similar locking mechanism.


HTH,
David


-----Original Message-----
From: yas --- <yas2349 at gmail.com>
To: vtkusers <vtkusers at vtk.org>; insight-users <insight-users at vtk.org>
Sent: Mon, Apr 15, 2013 4:16 pm
Subject: [Insight-users] get bounds an actor in thread


I write follow code  in  a thread.

void updateHaptics(void)
{
   
while(simulationRunning )

     {
   double bounds[6];

   toolactor->Getbounds(bounds);


       }
simulationRunning=false;
     
    }
   
    // exit haptics thread
    simulationFinished = true;

}

beacuse of use from   Getbounds function ,after running ,this is follow 
error:

Error: in VTK\Filtering\vtkExcutive in line 783



vtkErrorMacro(<< method << " invoked during another request.  "
                    "Returning failure to algorithm "
                    << this->Algorithm->GetClassName(
) << "("
                    << this->Algorithm << ").");



_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

  


More information about the Insight-users mailing list