------------------------------------------------------------------------------
| 563 | |
| 564 | //------------------------------------------------------------------------------ |
| 565 | int vtkSLACReader::CanReadFile(const char* filename) |
| 566 | { |
| 567 | vtkSLACReaderAutoCloseNetCDF ncFD(filename, NC_NOWRITE, true); |
| 568 | if (!ncFD.Valid()) |
| 569 | return 0; |
| 570 | |
| 571 | // Check for the existence of several arrays we know should be in the file. |
| 572 | int dummy; |
| 573 | if (nc_inq_varid(ncFD, "coords", &dummy) != NC_NOERR) |
| 574 | return 0; |
| 575 | if (nc_inq_varid(ncFD, "tetrahedron_interior", &dummy) != NC_NOERR) |
| 576 | return 0; |
| 577 | if (nc_inq_varid(ncFD, "tetrahedron_exterior", &dummy) != NC_NOERR) |
| 578 | return 0; |
| 579 | |
| 580 | return 1; |
| 581 | } |
| 582 | |
| 583 | //------------------------------------------------------------------------------ |
| 584 | void vtkSLACReader::AddModeFileName(const char* fname) |
nothing calls this directly
no test coverage detected