Giter VIP home page Giter VIP logo

Comments (7)

dgobbi avatar dgobbi commented on August 22, 2024

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.

dmgroppe avatar dmgroppe commented on August 22, 2024

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.

dgobbi avatar dgobbi commented on August 22, 2024

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.

dgobbi avatar dgobbi commented on August 22, 2024

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.

dmgroppe avatar dmgroppe commented on August 22, 2024

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.

dgobbi avatar dgobbi commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.