------------------------------------------------------------------------------ override from vtkThreadedImageAlgorithm to split input extent, instead of splitting the output extent
| 266 | // override from vtkThreadedImageAlgorithm to split input extent, instead |
| 267 | // of splitting the output extent |
| 268 | VTK_THREAD_RETURN_TYPE vtkImageHistogramThreadedExecute(void* arg) |
| 269 | { |
| 270 | vtkMultiThreader::ThreadInfo* ti = static_cast<vtkMultiThreader::ThreadInfo*>(arg); |
| 271 | vtkImageHistogramThreadStruct* ts = static_cast<vtkImageHistogramThreadStruct*>(ti->UserData); |
| 272 | |
| 273 | // execute the actual method with appropriate extent |
| 274 | // first find out how many pieces extent can be split into. |
| 275 | int splitExt[6]; |
| 276 | int total = |
| 277 | ts->Algorithm->SplitExtent(splitExt, ts->UpdateExtent, ti->ThreadID, ti->NumberOfThreads); |
| 278 | |
| 279 | if (ti->ThreadID < total && splitExt[1] >= splitExt[0] && splitExt[3] >= splitExt[2] && |
| 280 | splitExt[5] >= splitExt[4]) |
| 281 | { |
| 282 | ts->Algorithm->ThreadedRequestData( |
| 283 | ts->Request, ts->InputsInfo, ts->OutputsInfo, nullptr, nullptr, splitExt, ti->ThreadID); |
| 284 | } |
| 285 | |
| 286 | return VTK_THREAD_RETURN_VALUE; |
| 287 | } |
| 288 | |
| 289 | //------------------------------------------------------------------------------ |
| 290 | template <class T> |
nothing calls this directly
no test coverage detected