Comments (7)
That's unexpected, the parser should be able to read non-ascii filenames. Was this on Windows?
Did you try reading it with the command-line tools (dicomdump, dicomtocsv, etc) or are you using vtkDICOMParser from your own C++ program? Note that SetFileName()
only takes ASCII or UTF-8, so if you give it any other encoding it will fail.
The DICOM command-line tools all use wmain()
to get the command-line parameters as UTF-16, and then convert them to UTF-8 for use with the vtk-dicom API.
from vtk-dicom.
Yes, this was on Windows. The error either occurred when running dicomfind.exe or dicomdump.exe.
The error message was "ERROR: In E:\Kitware\vtk-dicom\Source\vtkDICOMParser.cxx line 1871 vtkDICOMParser (02EDEDD8): ReadFile: Can't open the file"
from vtk-dicom.
I have not been able to reproduce this issue. I've tried several languages and several tools (dicomfind.exe, dicomtocsv.exe, dicomdump.exe) and the special characters work fine for me, including a middle dot character:
dicomdump "F:\DICOM\画像CD発行システム\山田‧太郎.dcm"
==== F:\DICOM\画像CD発行システム\山田‧太郎.dcm ====
(0002,0000) UL "FileMetaInformationGroupLength" : [188] (4 bytes)
(0002,0001) OB "FileMetaInformationVersion" : [...] (2 bytes)
(0002,0002) UI "MediaStorageSOPClassUID" : [1.2.840.10008.5.1.4.1.1.7] {Secondary Capture Image Storage} (26 bytes)
(0002,0003) UI "MediaStorageSOPInstanceUID" : [1.3.6.1.4.1.5962.1.1.0.1.1.1175775771.5702.0] (44 bytes)
(0002,0010) UI "TransferSyntaxUID" : [1.2.840.10008.1.2.1] {Explicit VR Little Endian} (20 bytes)
Can you send me the exact text of the problem filename? A cut-and-paste from the console should work fine. No screenshots, since it's the code for the characters and not their appearance that matters.
from vtk-dicom.
Closing because I've tried to reproduce this problem, but files with special characters work fine for me. Will re-open if you can provide a .zip or .tar file with a DICOM file that demonstrates the problem.
from vtk-dicom.
My apologies, David. I also have not been able to reproduce the problem. Unfortunately, I couldn't get a copy of the original file that caused the problem. Thank you for looking into the issue. I'm flummoxed as to what was causing the issue on the user's PC.
from vtk-dicom.
Well, I think you mentioned before that you use vtkDICOMParser in C#? Are you sure the filenames are converted to utf-8 before you call SetFileName()?
But that doesn't explain why you would see problems with dicomdump and dicomtocsv, since these are pure C++ programs and they access the filesystem with UTF-16.
from vtk-dicom.
Related Issues (20)
- Dealing with RescaleSlope in MRI HOT 1
- Zeros at end of file cause infinite loop HOT 1
- Tilted-gantry CT rectification requires SetMemoryRowOrderToFileNative() HOT 2
- BUILD date not included HOT 1
- vtkDICOMDirectory cannot find files in DICOM folder HOT 2
- Get metadata from vtkNIFTIReader HOT 3
- CMake minimum version update HOT 1
- Possible to have any python example? HOT 5
- Additional Query Attributes
- Vtk dicom
- dicomtonifti.exe fails when dicoms in series differ in bit depth HOT 4
- Bug in vtkDICOMReader.cxx at Line 2511 HOT 1
- Instrument directory search tools
- VS 2020 compile issue HOT 2
- Hello, can you update the latest version to vcpkg? HOT 1
- Could not find a package configuration file provided by "DICOM" with any of the following names HOT 3
- Compile error? HOT 1
- Reading multi-pass CT series HOT 3
- Localizers cause confusion with dicomtocsv output HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vtk-dicom.