Trouble with DICOMDIR file paths

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
dicomDuty
Posts: 13
Joined: Fri, 2012-05-11, 20:57

Trouble with DICOMDIR file paths

#1 Post by dicomDuty »

I am having some trouble building a DICOMDIR correctly, and I wonder if some one could shed some light on the problem. I am using the DicomDirInterface from the 3.6.0 release.

The problem is that this call

DicomDirInterface::addDicomFile("C:\INCOMING\DICOM\NOTPROCESSED" , "TRACY DATA\Bad Disk #1\DICOM\1.2.840.113619.2.244.6945.298166.21871.1327666369.606.dcm")

ends up in the DICOMDIR as:

"TRACY DATA\Bad Disk 1\DICOM\1.2.840.113619.2.244.6945.298166.21871.1327666369.606.dcm")

The "#" in front of the 1 is missing so that file cannot be found. I have already modified locateInvalidFilenameChars() and hostToDicomFilename() so neither of these functions is stripping the #. I see everything in the debugger as correct, but still the file path ends up with the striped "#". I can't control the file pathname, as it is whatever the end users name it, so I have to handle this type of path.

Any ideas where I can look to fix this? Thanks for the help.

- D

dicomDuty
Posts: 13
Joined: Fri, 2012-05-11, 20:57

Re: Trouble with DICOMDIR file paths

#2 Post by dicomDuty »

I figured it out.

dcdirrec.cc changes the file path names in hostToDicomFilename(), and dcddirif.cc changes the file path name in hostToDicomFilename() and dicomToHostFilename(), so you have to modify both of these files to add characters that might show up in a path (Like # or ,).

Thanks,

David

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest