------------------------------------------------------------------------------
| 73 | |
| 74 | //------------------------------------------------------------------------------ |
| 75 | bool vtkHDFReader::Implementation::Open(const char* fileName) |
| 76 | { |
| 77 | if (!fileName) |
| 78 | { |
| 79 | vtkErrorWithObjectMacro(this->Reader, "Invalid filename: " << fileName); |
| 80 | return false; |
| 81 | } |
| 82 | |
| 83 | if (this->FileName.empty() || this->FileName != fileName || this->File < 0) |
| 84 | { |
| 85 | this->FileName = fileName; |
| 86 | if (this->File >= 0) |
| 87 | { |
| 88 | this->Close(); |
| 89 | } |
| 90 | |
| 91 | if (!vtkHDFUtilities::Open(fileName, this->File)) |
| 92 | { |
| 93 | return false; |
| 94 | } |
| 95 | |
| 96 | return this->RetrieveHDFInformation(vtkHDFUtilities::VTKHDF_ROOT_PATH); |
| 97 | } |
| 98 | |
| 99 | return true; |
| 100 | } |
| 101 | |
| 102 | //------------------------------------------------------------------------------ |
| 103 | bool vtkHDFReader::Implementation::Open(vtkResourceStream* stream) |