MCPcopy Create free account
hub / github.com/Kitware/VTK / Open

Method Open

IO/NetCDF/vtkNetCDFUGRIDReader.cxx:265–286  ·  view source on GitHub ↗

--------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

263
264//--------------------------------------------------------------------------------------------------
265bool vtkNetCDFUGRIDReader::Open()
266{
267 if (!this->FileName)
268 {
269 vtkErrorMacro("No filename specified.");
270 return false;
271 }
272
273 this->Close();
274
275 int id{};
276 int error{ nc_open(this->FileName, 0, &id) };
277 if (error != NC_NOERR)
278 {
279 vtkErrorMacro("Failed to open file \"" << this->FileName << "\": " << nc_strerror(error));
280 return false;
281 }
282
283 this->NcId = id;
284
285 return true;
286}
287
288//--------------------------------------------------------------------------------------------------
289bool vtkNetCDFUGRIDReader::ParseHeader()

Callers 2

RequestInformationMethod · 0.95
RequestDataMethod · 0.95

Calls 3

CloseMethod · 0.95
nc_openFunction · 0.85
nc_strerrorFunction · 0.85

Tested by

no test coverage detected