Skip to content

Commit

Permalink
Made the plugin filter single-threaded
Browse files Browse the repository at this point in the history
We'll keep it this way until ParaView points to the version
of VTK that has the fix to the thread-safe
vtkImageData::GetPoint() method.
  • Loading branch information
Cory Quammen committed May 2, 2012
1 parent 93a82b2 commit 8a6d9eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Plugins/GaussianScalarSplatter/vtkGaussianScalarSplatter.cxx
Expand Up @@ -303,12 +303,16 @@ int vtkGaussianScalarSplatter::RequestData(
// Initialize multiple threads
vtkMultiThreader * threader = vtkMultiThreader::New();
int numberOfThreads = vtkMultiThreader::GetGlobalDefaultNumberOfThreads();
#ifdef IMAGE_DATA_BUG_FIXED
vtkMultiThreader::SetGlobalMaximumNumberOfThreads(numberOfThreads);
if (numberOfThreads > this->SampleDimensions[2])
{
numberOfThreads = this->SampleDimensions[2];
}
threader->SetNumberOfThreads(numberOfThreads);
#else
threader->SetNumberOfThreads(1);
#endif

sliceData.Input = new vtkDataSet*[numberOfThreads];
for (int threadId = 0; threadId < numberOfThreads; threadId++)
Expand Down

0 comments on commit 8a6d9eb

Please sign in to comment.