I'm trying to locate DICOM filepaths by parsing a DICOMDIR.
But can't seem to figure out how to locate them. I parse through the DICOMDIR as follows:
DicomDirectory dir = new DicomDirectory("AE_TITLE");
dir.Load(dirPath);
foreach(DirectoryRecordSequenceItem elem in dir.RootDirectoryRecordCollection){//study
foreach(DirectoryRecordSequenceItem innerElem in elem.LowerLevelDirectoryRecordCollection){//sequence
foreach(DirectoryRecordSequenceItem inner2Elem in innerElem.LowerLevelDirectoryRecordCollection){//series
foreach (DirectoryRecordSequenceItem inner3Elem in lastElem.LowerLevelDirectoryRecordCollection) // img
{
}
}
}
}
this loops through the each study/sequence/series/image
but non of these seem to contain a filepath to a .dcm
file.
P.S. I use the ClearCanvas library to create the DicomDirectory object