------------------------------------------------------------------------------
| 229 | |
| 230 | //------------------------------------------------------------------------------ |
| 231 | int vtkSLACParticleReader::RequestInformation(vtkInformation* vtkNotUsed(request), |
| 232 | vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) |
| 233 | { |
| 234 | if (!this->FileName) |
| 235 | { |
| 236 | vtkErrorMacro("No filename specified."); |
| 237 | return 0; |
| 238 | } |
| 239 | |
| 240 | vtkSLACParticleReaderAutoCloseNetCDF ncFD(this->FileName, NC_NOWRITE); |
| 241 | if (!ncFD.Valid()) |
| 242 | return 0; |
| 243 | |
| 244 | int timeVar; |
| 245 | CALL_NETCDF_INT(nc_inq_varid(ncFD(), "time", &timeVar)); |
| 246 | double timeValue; |
| 247 | CALL_NETCDF_INT(nc_get_var_double(ncFD(), timeVar, &timeValue)); |
| 248 | |
| 249 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 250 | outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &timeValue, 1); |
| 251 | double timeRange[2]; |
| 252 | timeRange[0] = timeRange[1] = timeValue; |
| 253 | outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2); |
| 254 | |
| 255 | return 1; |
| 256 | } |
| 257 | |
| 258 | //------------------------------------------------------------------------------ |
| 259 | int vtkSLACParticleReader::RequestData(vtkInformation* vtkNotUsed(request), |
nothing calls this directly
no test coverage detected