Directory class Load method adds forward slash on windows OS
Cross-platform DICOM implementation
Brought to you by:
malat
The paths to files created by the Directory class' Load method on a windows system result in a combination of backslashes for most of the path and the last entry is a forward slash followed by the filename (e.g. C:\test_dir\sub_dir/1.dcm). This is not a valid file path on windows.
Python code illustrating the issue:
import gdcm
import os
gdcm_dir = gdcm.Directory()
if gdcm_dir.Load(os.path.abspath(".")) > 0:
print(gdcm_dir.GetFilenames())