| 18 | #include <gdcmScanner.h> |
| 19 | |
| 20 | mitk::DICOMFilePathList mitk::GetDICOMFilesInSameDirectory(const std::string& filePath) |
| 21 | { |
| 22 | DICOMFilePathList result; |
| 23 | |
| 24 | if (!filePath.empty()) |
| 25 | { |
| 26 | |
| 27 | std::string dir = filePath; |
| 28 | if (!itksys::SystemTools::FileIsDirectory(filePath)) |
| 29 | { |
| 30 | dir = itksys::SystemTools::GetFilenamePath(filePath); |
| 31 | } |
| 32 | |
| 33 | gdcm::Directory directoryLister; |
| 34 | directoryLister.Load(dir.c_str(), false); // non-recursive |
| 35 | result = FilterForDICOMFiles(directoryLister.GetFilenames()); |
| 36 | } |
| 37 | |
| 38 | return result; |
| 39 | }; |
| 40 | |
| 41 | mitk::DICOMFilePathList mitk::FilterForDICOMFiles(const DICOMFilePathList& fileList) |
| 42 | { |
nothing calls this directly
no test coverage detected