Open jdkent opened 6 years ago
@jdkent - the focus of reproin is really about metadata inside the dicom file, rather than any organization that would be output by xnat.
so as long as the dicom metadata contains the general requirements as laid out by reproin (we should have a wiki page/docs to clarify this), one would be able to connect reproin to xnat.
if yes, you can use default reproin
heuristic of heudiconv
if not, you would have to create a custom heuristic
perhaps @chaselgrove has some thoughts here.
ahh, okay, thank you for the clarification @satra.
@jdkent - an additional possibility is to add reproin as an automation pipeline for xnat (using docker). this should then allow exporting xnat dicoms as bids (obviously a few xnat related tweaks would need to be added to the container). if xnat is used for storing other assessment info, that should be usable as well.
@jdkent in https://github.com/nipy/heudiconv/pull/187 I have pushed some changes (adjusted description for a summary). The next thing for us to figure out is
(git-annex)hopa:~/picts/mris/jdkent-20180411_091815[master]git
$> find -type d | grep -v '\.git' | while read d; do file -L $d/* 2>/dev/null | grep -v 'No such file' | grep -q DICOM && { out=$(dcmdump --scan-directories $d 2>/dev/null |grep -e '\(SeriesNumber\|ProtocolName\)'); [ ! -z "$out" ] || continue; echo $d; echo $out | sed -e 's,^, ,g' | sort | uniq -c; }; done
./sub-001_ses-01/scans/6/resources/DICOM
1 (0018,1030) LO [xnatDownload] # 12, 1 ProtocolName
1 (0020,0011) IS [7] # 2, 1 SeriesNumber
./sub-001_ses-01/scans/3/resources/DICOM
1 (0018,1030) LO [xnatDownload] # 12, 1 ProtocolName
1 (0020,0011) IS [7] # 2, 1 SeriesNumber
./sub-001_ses-01/scans/10/resources/DICOM
1 (0018,1030) LO [xnatDownload] # 12, 1 ProtocolName
1 (0020,0011) IS [7] # 2, 1 SeriesNumber
./sub-001_ses-01/scans/4/resources/DICOM
1 (0018,1030) LO [xnatDownload] # 12, 1 ProtocolName
1 (0020,0011) IS [7] # 2, 1 SeriesNumber
... the same
(they even have the same SeriesInstanceUID!)
The problem is that (for some reason, instead of relying on SeriesInstanceUID and Times) ATM we do rely on (SeriesNumber, ProtocolName)
pair to sort series apart. And here they are all the same, so we cannot tease them apart.
Is that something which could be tuned on XNAT side or we would be doomed to adjust that code within heudiconv?
@yarikoptic oof, sorry, I was just generating a minimal test data-set and only changing the dicom header information where I thought was necessary, I'll change the SeriesNumber and ProtocolName on the Dicoms on xnat, since those parameters will definitely be different in a real world scenario.
EDIT I changed the dicoms to the actual dicoms that I would use for each scan Updated dicom structure
Let me know if this set doesn't work, it should represent our actual use case (only with one dicom per series instead of the 1000s of dicoms that are usually produced)
Hi all,
For the goal of synchronizing efforts (and not recreating the wheel), I was wondering if anyone could give me a guiding hand on how to name subjects/sessions/scans on xnat to make them (mostly) amenable to the reproin heuristic. I have some dummy data on xnat central that replicates how we have the data setup on our server. (let me know if the link doesn't work). Some things can't be readily changed (e.g. the
PU:
prefix is added automatically by the scanner)Attached is an example of how the data will download as dicoms from xnat.
example dicom structureEDIT Updated dicom structure
Thank you so much for getting this groundwork laid out, and I hope to help to allow other sites to easily adopt reproin.