------------------------------------------------------------------------------
| 454 | |
| 455 | //------------------------------------------------------------------------------ |
| 456 | bool vtkLabeledContourMapper::CheckInputs(vtkRenderer* ren) |
| 457 | { |
| 458 | vtkPolyData* input = this->GetInput(); |
| 459 | if (!input) |
| 460 | { |
| 461 | vtkErrorMacro(<< "No input data!"); |
| 462 | return false; |
| 463 | } |
| 464 | |
| 465 | if (!input->GetPoints()) |
| 466 | { |
| 467 | vtkErrorMacro(<< "No points in dataset!"); |
| 468 | return false; |
| 469 | } |
| 470 | |
| 471 | if (!input->GetPointData()) |
| 472 | { |
| 473 | vtkErrorMacro(<< "No point data in dataset!"); |
| 474 | return false; |
| 475 | } |
| 476 | |
| 477 | vtkCellArray* lines = input->GetLines(); |
| 478 | if (!lines) |
| 479 | { |
| 480 | vtkErrorMacro(<< "No lines in dataset!"); |
| 481 | return false; |
| 482 | } |
| 483 | |
| 484 | vtkDataArray* scalars = input->GetPointData()->GetScalars(); |
| 485 | if (!scalars) |
| 486 | { |
| 487 | vtkErrorMacro(<< "No scalars in dataset!"); |
| 488 | return false; |
| 489 | } |
| 490 | |
| 491 | vtkTextRenderer* tren = vtkTextRenderer::GetInstance(); |
| 492 | if (!tren) |
| 493 | { |
| 494 | vtkErrorMacro(<< "Text renderer unavailable."); |
| 495 | return false; |
| 496 | } |
| 497 | |
| 498 | if (this->TextProperties->GetNumberOfItems() == 0) |
| 499 | { |
| 500 | vtkErrorMacro(<< "No text properties set!"); |
| 501 | return false; |
| 502 | } |
| 503 | |
| 504 | // Print a warning if stenciling is not enabled: |
| 505 | vtkRenderWindow* win = ren->GetRenderWindow(); |
| 506 | if (!this->Internal->AlreadyWarnedAboutStencils && win) |
| 507 | { |
| 508 | if (win->GetStencilCapable() == 0) |
| 509 | { |
| 510 | vtkWarningMacro(<< "Stenciling is not enabled in the render window. " |
| 511 | "Isoline labels will have artifacts. To fix this, " |
| 512 | "call vtkRenderWindow::StencilCapableOn()."); |
| 513 | this->Internal->AlreadyWarnedAboutStencils = true; |
no test coverage detected