[vtkusers] [Insight-users] get bounds an actor in thread
yas ---
yas2349 at gmail.com
Tue Apr 16 02:23:38 EDT 2013
I have single thread that I want use vtk commands in it!
may you show me an example that uses thread in vtk ?
thansk alot!
On Tue, Apr 16, 2013 at 12:58 AM, David Cole <dlrdave at aol.com> wrote:
> [image: Boxbe] <https://www.boxbe.com/overview> David Cole (
> dlrdave at aol.com) is not on your Guest List<https://www.boxbe.com/approved-list?tc_serial=13959054389&tc_rand=1124926620&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&token=vCovxA%2FpU16QKphDwe8f%2BFCSB8xEExIOzRmNOwzpEMj3xKFLFJsKKC%2BYZuXpx78T&key=N%2Bs7wI3XDeB662BJ5YqxXAjax8hfJvgJOpBNK6wltqc%3D>| Approve
> sender<https://www.boxbe.com/anno?tc_serial=13959054389&tc_rand=1124926620&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&token=vCovxA%2FpU16QKphDwe8f%2BFCSB8xEExIOzRmNOwzpEMj3xKFLFJsKKC%2BYZuXpx78T&key=N%2Bs7wI3XDeB662BJ5YqxXAjax8hfJvgJOpBNK6wltqc%3D>| Approve
> domain<https://www.boxbe.com/anno?tc_serial=13959054389&tc_rand=1124926620&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&dom&token=vCovxA%2FpU16QKphDwe8f%2BFCSB8xEExIOzRmNOwzpEMj3xKFLFJsKKC%2BYZuXpx78T&key=N%2Bs7wI3XDeB662BJ5YqxXAjax8hfJvgJOpBNK6wltqc%3D>
>
> 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<http://www.kitware.com/opensource/opensource.html>
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/**products/protraining.php<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 <http://www.itk.org/Wiki/ITK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/**listinfo/insight-users<http://www.itk.org/mailman/listinfo/insight-users>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130416/bb56a677/attachment.htm>
More information about the vtkusers
mailing list