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

Method UpdateMetaData

IO/NetCDF/vtkNetCDFReader.cxx:608–637  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

606
607//------------------------------------------------------------------------------
608int vtkNetCDFReader::UpdateMetaData()
609{
610 if (this->MetaDataMTime < this->FileNameMTime || this->MetaDataMTime < this->Accessor->GetMTime())
611 {
612 if (!this->FileName && this->Accessor->NeedsFileName())
613 {
614 vtkErrorMacro(<< "FileName not set.");
615 return 0;
616 }
617
618 int ncFD;
619 CALL_NETCDF_INT(this->Accessor->open(this->FileName, NC_NOWRITE, &ncFD));
620
621 int retval = this->ReadMetaData(ncFD);
622
623 if (retval)
624 retval = this->FillVariableDimensions(ncFD);
625
626 if (retval)
627 this->MetaDataMTime.Modified();
628
629 CALL_NETCDF_INT(this->Accessor->close(ncFD));
630
631 return retval;
632 }
633 else
634 {
635 return 1;
636 }
637}
638
639//------------------------------------------------------------------------------
640vtkStdString vtkNetCDFReader::DescribeDimensions(int ncFD, const int* dimIds, int numDims)

Callers 6

RequestInformationMethod · 0.95
RequestDataObjectMethod · 0.80
NetCDFReader.pyFile · 0.80

Calls 7

ReadMetaDataMethod · 0.95
GetMTimeMethod · 0.45
NeedsFileNameMethod · 0.45
openMethod · 0.45
ModifiedMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected