I've just started working with DCMTK. I have data sets that are on read only media, some with DICOMDIR, some without. Is there a way to leverage the DicomdirInterface class to read the files on the CD that do not have a DICOMDIR and create the proper hierarchy? Also, some of the data sets have names witch .dcm. I can't rename these files so am I out of luck and have to build the patient study series hierarchy myself?
Thanks
Rick
Reading from CD
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Reading from CD
Sure, the purpose of the DicomDirInterface is to create a DICOMDIR from given DICOM files.Is there a way to leverage the DicomdirInterface class to read the files on the CD that do not have a DICOMDIR and create the proper hierarchy?
You cannot add DICOM files with file extension to a DICOMDIR, and this is also what the DCMTK implements/checks. If you really need that, you should add a new option/mode to the DicomDirInterface class (similar to the "MapFilenamesMode").Also, some of the data sets have names witch .dcm. I can't rename these files so am I out of luck and have to build the patient study series hierarchy myself?
Re: Reading from CD
It seems that the DICOMDIR file needs to be at the root level of the directory hierarchy? In the case of the CD, in other words a read-only medium do I have to copy the files from CD to a local storage in order to create the DICOMDIR information or can that be kept in memory and never written to disk?
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Reading from CD
Correct.It seems that the DICOMDIR file needs to be at the root level of the directory hierarchy?
The DICOMDIR cannot be created in memory since it stores internal references of the hierarchy as byte offsets (within the file).In the case of the CD, in other words a read-only medium do I have to copy the files from CD to a local storage in order to create the DICOMDIR information or can that be kept in memory and never written to disk?
Also please note that the references to DICOM files within the DICOMDIR (so-called "Referenced File ID") are regarded as relative paths based on the location of the DICOMDIR (which is identical to the root directory as you already noted).
Re: Reading from CD
Ok, so then I think that to read a CD that does not already contain a DICOMDIR I have to loop through all the files, read tags, and build my own hierarchy patient-study-series-image etc
Who is online
Users browsing this forum: Ahrefs [Bot], Baidu [Spider] and 1 guest