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

Method CanReadFile

IO/Image/vtkDICOMImageReader.cxx:80–99  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

78
79//------------------------------------------------------------------------------
80int vtkDICOMImageReader::CanReadFile(const char* fname)
81{
82 bool canOpen = this->Parser->OpenFile(fname);
83 if (!canOpen)
84 {
85 vtkErrorMacro("DICOMParser couldn't open : " << fname);
86 return 0;
87 }
88 bool canRead = this->Parser->IsDICOMFile();
89 this->Parser->CloseFile();
90 if (canRead)
91 {
92 return 1;
93 }
94 else
95 {
96 vtkWarningMacro("DICOMParser couldn't parse : " << fname);
97 return 0;
98 }
99}
100
101//------------------------------------------------------------------------------
102void vtkDICOMImageReader::ExecuteInformation()

Callers 1

ExecuteInformationMethod · 0.95

Calls 3

IsDICOMFileMethod · 0.80
OpenFileMethod · 0.45
CloseFileMethod · 0.45

Tested by

no test coverage detected