Friday, February 10, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: 孙磊
New Today New Today: 1
New Yesterday New Yesterday: 27
User Count Overall: 20591

People Online People Online:
Visitors Visitors: 7
Members Members: 1
Total Total: 8

Online Now Online Now:
01: joe.lo

ClearCanvas Community Forums

Accessing DICOM top-level tags for a SOP
Last Post 2010-08-09 11:18 AM by stewart. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
xargon
Advanced Member
Advanced Member
Posts:38

--
2010-07-23 09:00 PM  

Hello,

Is there an easy way to access the DICOM top-level tags for a given SOP. I have an Sop object and what I would like to do is make a list of all the top level attributes. I can easily query a given attribute but what I would like to do is enumerate the attributes present in the SOP.

From what I can see, the only way to do it is if I have access to the underlying InstanceXML or the DicomAttributeCollection. However, there does not seems to be an easy way to access them from a given Sop object.

So, is there any way to load the attribute list from a given Sop in an easy way without writing a custom loader? I would think there should be some way as convering a DICOM instance to XML or something similar is a common functionality found in a DICOM library.

Cheers,

xarg

xargon
Advanced Member
Advanced Member
Posts:38

--
2010-08-03 07:18 PM  

Hello,

Bumping this up after a week. Wondering if anyone has any ideas.

Cheers,

xarg

stewart
Senior Member
Senior Member
Posts:2033

--
2010-08-09 11:18 AM  
There is actually a very good reason why you can't enumerate over all the attributes, which is that the underlying Sop may pull it's attributes from multiple sources (e.g. StudyXml plus the file itself), at least one of which is not usually complete. This approach allows us to achieve a good time-to-first image by using the study xml for everything up until an unavailable attribute is accessed/requested.

Depending on your use case, most of the ISopDataSource-derived classes inherit from DicomMessageSopDataSource, which allows you access to the "main" attribute collection. In the local case, it's the DataSet of the DicomFile itself, and in the streaming case, it's the one from the InstanceXml.

I've always intended to implement ISopDataSource.Export(), which would allow you to obtain a "complete" copy of the Sop's data set. What exactly is your use case? Would the Export method help?
Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.