Are there any working examples for how to use DicomDirectory?

1,119 views
Skip to first unread message

Chris Horn

unread,
Jan 28, 2013, 2:03:08 AM1/28/13
to fo-d...@googlegroups.com
The code seems to have changed since hdesouky's example was posted, is there an updated sample?

Chris Horn

unread,
Jan 28, 2013, 4:36:03 AM1/28/13
to fo-d...@googlegroups.com
on further investigation it seems that DicomDir support was broken on 22/12/2012 "make DicomDirectory.Open() methods consistent with DicomFile"
_directoryRecordSequence = Dataset.Get<DicomSequence>(DicomTag.DirectoryRecordSequence);

RootDirectoryRecord = dirObserver.BuildDirectoryRecords();

without these 2 lines RootDirectoryRecord is always null? and loading fails, unless I'm missing something (and it wouldn't be the first time).

can some one point me in the right direction

Colby Dillion

unread,
Jan 29, 2013, 4:35:39 PM1/29/13
to fo-d...@googlegroups.com
I've updated the code to fix the broken Open() methods and have included the DICOM Media example project:

Message has been deleted

MENG HO

unread,
Feb 1, 2013, 6:27:58 PM2/1/13
to fo-d...@googlegroups.com
Sorry, the probelm I have is different. I am new to DICOOM.
I try to get the value from Dicom RT file. For example, I want to get the the value for tag (0001, 0002) which is under (0001,0001) and also tag (0001, 0002) may not be the single one which may like:
(0001,0001){0}(0001,0002){0}
(0001,0001){0}(0001,0002){1}
(0001,0001){0}(0001,0002){2}
 
If I use var value = dcm.Dataset.Get<string>(new DicomTag(0X0001,0X0002)); 
or var value = dcm.Dataset.Get<string>(DicomTag.tagname);
It return as null.
How can I get the value by using this or I have to try other way for this structure?
 

Hesham Desouky

unread,
Feb 6, 2013, 9:22:27 AM2/6/13
to fo-d...@googlegroups.com
0001,group not stored in Dataset, it is stored in the metadata of the DICOM file

MENG HO

unread,
Feb 6, 2013, 4:15:42 PM2/6/13
to fo-d...@googlegroups.com
Thanks, Hesham. So how can I use metadata to read the value of the tag?
 

Chris Horn

unread,
Feb 15, 2013, 3:48:28 AM2/15/13
to fo-d...@googlegroups.com
There are some issues, that I have not yet been able to figure out, however this solution does not seem to function as well as the clearcanvas class's did with mdcm, I have entire DICOMDIR's that fail to open, yet work fine in cc, cc/mdcm hybread and leadtools, time permitting I might try and and spend some serious time looking into this

Hesham Desouky

unread,
Feb 15, 2013, 5:08:11 PM2/15/13
to fo-d...@googlegroups.com
could you please post the DICOMDIR file with problem to investigate

Chris Horn

unread,
Feb 15, 2013, 11:13:53 PM2/15/13
to fo-d...@googlegroups.com
Hi Hesham,

Attached are 3 files a pic illustrating the problem, the DICOMDIR in question, and a zipped solution showing the mdcm/clearcanvas solution that currently works ( shown in the left of the attached pic)
DicomDir_MDCM_FODicom.PNG
DicomDir.zip
DICOMDIR.zip

Hesham Desouky

unread,
Feb 18, 2013, 5:45:44 PM2/18/13
to fo-d...@googlegroups.com
Hi Chris,
 
This was a bug in DicomDirectoryReaderObserver due to presence of Image icon sequence.
 
to solve this temporarily modify the DicomDirectoryReaderObserver.OnEndSequence() to:
 
public void OnEndSequence()
{
    _currentSequenceTag
.Pop();
}

I will pull a fix to Colby's master branch tomorrow.

Hesham Desouky

unread,
Feb 18, 2013, 6:27:40 PM2/18/13
to fo-d...@googlegroups.com
I Pulled the request

Chris Horn

unread,
Feb 19, 2013, 5:12:47 AM2/19/13
to fo-d...@googlegroups.com
Awesome Hesham, thanks for the quick fix :) I haven't had a change to look into this any further yet and it looks like yo saved me the time
Reply all
Reply to author
Forward
0 new messages