I’m having trouble with code that worked just fine for years. I’m trying to open a DICOM dataset from Japan and my code cannot see any files of the series folder.
The code is (with placeholders for seriesUID and patient name :
On the last line, GetFileNames() returns an empty list; but I can see I have multiple files in the folder.
When I rename the folder to remove the Japanese characters then loading works fine.
Is there something that I am missing here ? I am using (and kinda stuck with) ITK 4.13
I have exactly the problem described here: I’m trying to open a DICOM dataset (in my case with Chinese characters in the directory) and GDCMSeriesFileNames won’t find the files in the folder.
When removing Chinese characters it works properly, but modifying the directory to remove non-ASCII characters is not an option for me. Any idea on this issue? I’m with latest ITK 5.2.
I checked the link you provided and it seems pretty much related. How should I try this? Is it a branch of ITK to be merged with the bug fix? Or how do I set the locale?
To try a fix, set up a repository for contributing to ITK, a local build (more information can be found in The ITK Software Guide, then, like the patch did in itkGDCMImageIO.cxx, add std::locale currentLocale = std::locale::global(std::locale::classic()); and std::locale::global(currentLocale); around relevant blocks in itkGDCMSeriesFileNames.cxx.
In 3D Slicer, we switched to UTF-8 application code page and it solved all problems related to non-ASCII characters (except passing non-ASCII text via command-line arguments on Windows). On Linux and macOS UTF-8 code page should be the default, while on Windows you can enable this in the application manifest.
In order to enable this application manifest in Windows (WindowsApplicationUseUtf8.manifest), what’s the procedure to follow exactly? I’m using Visual Studio C++ to create a dynamic library (.dll).