<div dir="ltr">I have single thread that I want use vtk commands in it!<br>may you show me an example that uses thread in vtk ?<br>thansk alot!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 12:58 AM, David Cole <span dir="ltr"><<a href="mailto:dlrdave@aol.com" target="_blank">dlrdave@aol.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="color:#777;font-size:12px;font-family:'Lucida Grande',Helvetica,Arial,sans-serif;padding:4px">
<a href="https://www.boxbe.com/overview" style="text-decoration:none;color:#5e96ea" target="_blank"><img alt="Boxbe" style="margin-left:0px;border:none" width="64px"></a>
<img>
David Cole (<a href="mailto:dlrdave@aol.com" target="_blank">dlrdave@aol.com</a>) is not on <a style="text-decoration:none;color:#5e96ea" href="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" target="_blank">your Guest List</a>
| <a style="text-decoration:none;color:#5e96ea" href="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" target="_blank">Approve sender</a>
| <a style="text-decoration:none;color:#5e96ea" href="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" target="_blank">Approve domain</a>
<br>
</div>
<br>You have to synchronize access to VTK objects with the main GUI thread, where they typically exist and are called from.<br>
<br>
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.<br>
<br>
<br>
HTH,<br>
David<br>
<br>
<br>
-----Original Message-----<br>
From: yas --- <<a href="mailto:yas2349@gmail.com" target="_blank">yas2349@gmail.com</a>><br>
To: vtkusers <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>>; insight-users <<a href="mailto:insight-users@vtk.org" target="_blank">insight-users@vtk.org</a>><br>
Sent: Mon, Apr 15, 2013 4:16 pm<br>
Subject: [Insight-users] get bounds an actor in thread<br>
<br>
<br>
I write follow code in a thread.<br>
<br>
void updateHaptics(void)<br>
{<br>
<br>
while(simulationRunning )<br>
<br>
{<br>
double bounds[6];<br>
<br>
toolactor->Getbounds(bounds);<br>
<br>
<br>
}<br>
simulationRunning=false;<br>
<br>
}<br>
<br>
// exit haptics thread<br>
simulationFinished = true;<br>
<br>
}<br>
<br>
beacuse of use from Getbounds function ,after running ,this is follow error:<br>
<br>
Error: in VTK\Filtering\vtkExcutive in line 783<br>
<br>
<br>
<br>
vtkErrorMacro(<< method << " invoked during another request. "<br>
"Returning failure to algorithm "<br>
<< this->Algorithm->GetClassName(<br>
) << "("<br>
<< this->Algorithm << ").");<br>
<br>
<br>
<br>
______________________________<u></u>_______<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/<u></u>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/<u></u>listinfo/insight-users</a><br>
<br>
<br></blockquote></div><br></div>