| 1349 | } |
| 1350 | |
| 1351 | void vtkFixedPointVolumeRayCastMapper::Render(vtkRenderer* ren, vtkVolume* vol) |
| 1352 | { |
| 1353 | // if (this->Threader->GetNumberOfThreads() > 1 && this->ThreadWarning) |
| 1354 | // { |
| 1355 | // vtkWarningMacro("Number of threads " |
| 1356 | // << this->Threader->GetNumberOfThreads() |
| 1357 | // << " is > 1. This class does not produce repeatable results when the number |
| 1358 | // of threads exceeds 1."); |
| 1359 | // this->ThreadWarning = false; |
| 1360 | // } |
| 1361 | |
| 1362 | if (vtkImageData::SafeDownCast(this->GetInput()) == nullptr) |
| 1363 | { |
| 1364 | vtkWarningMacro("Mapper supports only vtkImageData"); |
| 1365 | return; |
| 1366 | } |
| 1367 | |
| 1368 | if (this->GetBlendMode() != vtkVolumeMapper::COMPOSITE_BLEND && |
| 1369 | this->GetBlendMode() != vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND && |
| 1370 | this->GetBlendMode() != vtkVolumeMapper::MINIMUM_INTENSITY_BLEND && |
| 1371 | this->GetBlendMode() != vtkVolumeMapper::ADDITIVE_BLEND) |
| 1372 | { |
| 1373 | vtkErrorMacro(<< "Selected blend mode not supported. " |
| 1374 | << "Only Composite, MIP, MinIP and additive modes " |
| 1375 | << "are supported by the fixed point implementation."); |
| 1376 | return; |
| 1377 | } |
| 1378 | |
| 1379 | this->Timer->StartTimer(); |
| 1380 | |
| 1381 | // Since we are passing in a value of 0 for the multiRender flag |
| 1382 | // (this is a single render pass - not part of a multipass AMR render) |
| 1383 | // then we know the origin, spacing, and extent values will not |
| 1384 | // be used so just initialize everything to 0. No need to check |
| 1385 | // the return value of the PerImageInitialization method - since this |
| 1386 | // is not a multirender it will always return 1. |
| 1387 | double dummyOrigin[3] = { 0.0, 0.0, 0.0 }; |
| 1388 | double dummySpacing[3] = { 0.0, 0.0, 0.0 }; |
| 1389 | int dummyExtent[6] = { 0, 0, 0, 0, 0, 0 }; |
| 1390 | this->PerImageInitialization(ren, vol, 0, dummyOrigin, dummySpacing, dummyExtent); |
| 1391 | |
| 1392 | this->PerVolumeInitialization(ren, vol); |
| 1393 | |
| 1394 | vtkRenderWindow* renWin = ren->GetRenderWindow(); |
| 1395 | |
| 1396 | if (renWin && renWin->CheckAbortStatus()) |
| 1397 | { |
| 1398 | this->AbortRender(); |
| 1399 | return; |
| 1400 | } |
| 1401 | |
| 1402 | this->PerSubVolumeInitialization(ren, vol, 0); |
| 1403 | if (renWin && renWin->CheckAbortStatus()) |
| 1404 | { |
| 1405 | this->AbortRender(); |
| 1406 | return; |
| 1407 | } |
| 1408 |
nothing calls this directly
no test coverage detected