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

Method OpenNetCDFFile

IO/MINC/vtkMINCImageReader.cxx:241–259  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

239
240//------------------------------------------------------------------------------
241int vtkMINCImageReader::OpenNetCDFFile(const char* filename, int& ncid)
242{
243 int status = 0;
244
245 if (filename == nullptr)
246 {
247 vtkErrorMacro("No filename was set");
248 return 0;
249 }
250
251 status = nc_open(filename, 0, &ncid);
252 if (status != NC_NOERR)
253 {
254 vtkErrorMacro("Could not open the MINC file:\n" << nc_strerror(status));
255 return 0;
256 }
257
258 return 1;
259}
260
261//------------------------------------------------------------------------------
262int vtkMINCImageReader::CloseNetCDFFile(int ncid)

Callers 2

Calls 2

nc_openFunction · 0.85
nc_strerrorFunction · 0.85

Tested by

no test coverage detected