Include additional DICOM attributes in XNAT

206 views
Skip to first unread message

bennett landman

unread,
Jan 7, 2012, 3:23:39 PM1/7/12
to xnat_discussion
Is it possible to include extra dicom attributes as XNAT variables? In
particular, we are interested in the following:

> Thanks for sending these. In addition to what you have in XNAT already, I would also like to have "(0018, 9005) Pulse Sequence Name" in XNAT. In addition, I see age and gender in the DICOM header file, but not in XNAT. Is that possible to push them there too? The code is (0010, 0030) for BOD and (0010, 0040) for gender. Thanks for your help.

Any tips would be much appreciated?

Thanks,
Bennett

Archie, Kevin

unread,
Jan 10, 2012, 12:45:24 AM1/10/12
to <xnat_discussion@googlegroups.com>
There are two distinct problems here, one simpler than the other.

Adding attributes to a session document is a little cumbersome but not terrible. First you'll need to decide where you're going to put the attribute: you can either add a field in the schema, or you can put it into an addParam. The latter is easier because you don't need to mess around with the schema, but the former is better if you want users to be able to search on the new field. Extending the schema is documented here: http://docs.xnat.org/Customizing+XNAT -- but that document is mostly about adding new datatypes rather than adding fields existing ones. You'll probably also want to modify the display to show any new fields -- again, consult the Customizing XNAT page, especially "Customizing a report." Be sure to both run the update script and to run the SQL commands to update the database.

Once your XNAT is set up to record the new field, you can change the DICOM to XNAT metadata translation to extract the new field. That translation is done in the dicom-xnat-mx project (part of http://hg.xnat.org/dicom-xnat); you'll need to build your own custom version of that jar and replace the one in plugin-resources/repository/dcm/jars. There are dependencies you'll need to build first (DicomUtils, ExtAttr, SessionBuilders at least) from source on hg.xnat.org.

In dicom-xnat-mx, the class org.nrg.dcm.xnat.MRScanAttributes contains all the definitions for taking DICOM series-level attributes and turning them into XNAT scan fields. Most likely you can just add one line of code per attribute that you want to add; there are plenty of examples in that file and in similar files for other modalities.

Add your parameter definition, rebuild dicom-xnat-mx, replace the jar in plugin-resources/repository/dcm/jars, do a webapp update, and restart your Tomcat.

That, unfortunately, is the easy problem.

Getting the subject demographics into XNAT is trickier, because there you're adding information not to the session document but to the subject. We don't have anything in place to do that. This was recently discussed here: http://groups.google.com/group/xnat_discussion/browse_thread/thread/6a62da49915f3755/c4758f3a95694752?tvc=2&q=Questions+about+naming#c4758f3a95694752

- Kevin

> --
> You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
> To post to this group, send email to xnat_di...@googlegroups.com.
> To unsubscribe from this group, send email to xnat_discussi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xnat_discussion?hl=en.
>


________________________________

The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Burns, Scott S

unread,
Jan 10, 2012, 9:50:05 AM1/10/12
to xnat_di...@googlegroups.com
We have our subject demographics in a Redcap database, so syncing subject information from it to our XNAT (using pyxnat) should be pretty straight-foward. 'Should' being the keyword, of course.

Scott Burns
Neuroimaging Analyst
Education and Brain Research Lab
Kennedy Center
Vanderbilt University, Nashville TN
scott....@vanderbilt.edu

Olsen, Tim

unread,
Jan 10, 2012, 10:15:03 AM1/10/12
to xnat_di...@googlegroups.com
Scott,

We've had numerous groups interested in syncing their Redcap database with XNAT. However, we haven't had the bandwidth to support it. Its not something we use on any of the primary studies we support here (though I think it may be used by some other groups here).

If you decide to attempt this, I'd love to talk to you about it. Ideally, there would be a generalizable approach that would be usable by others in the XNAT community.

Tim

Burns, Scott S

unread,
Jan 10, 2012, 10:23:34 AM1/10/12
to xnat_di...@googlegroups.com
We currently have in our infrastructure a script that creates new projects in XNAT, their details residing in a Redcap database. I wrote a python module to talk to Redcap projects (github.com/VUIIS/PyCap), so that along with pyxnat its everything someone needs to communicate between the two services.

The documentation for PyCap is very lacking (it's on my to-do list) but I'd be more than welcome to help groups looking for this functionality. A generalized service is more difficult (not all Redcap projects are created with the same care), but its definitely something to think about for the future.

--Scott

Reply all
Reply to author
Forward
0 new messages