-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imaging Browser: Add DICOM download: Redmine 12580 #3501
Imaging Browser: Add DICOM download: Redmine 12580 #3501
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 suggestions for the documentation
Also... revision to the Imaging Browser Spec? (if/when merged?)
@@ -11,7 +11,7 @@ | |||
|
|||
### B. ViewSession / Volume List | |||
|
|||
8. Sidebar: all links work | |||
8. Sidebar: all links work, inlcuding the Download DICOM option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- typo: inlcuding -> including
- If there are multiple tars, they should be listed (and download on each should work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- typo fixed! thanks
- yes, this should work; I tested it as we had a case in CCNA wwhich had its initial MRi visit split into two scanning sessions and the changes here work as well. I fixed the screenshot at the beginning of the pull request to show this case.
- re. your earlier comment on specs; I had already updated those in an earlier commit before you made the comment; is it not sufficient what I wrote?
foreach ($qresult as $k=>$v) { | ||
$tarchiveID = $v['TarchiveID']; | ||
$tarIDToTarLoc[$tarchiveID] =$v['ArchiveLocation']; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest using array_values() instead of foreach. Prevent unused variable $k.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed unused $k
. thanks!
needs rebase |
I just did now that PR #3500 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MounaSafiHarab I tried it on a dataset with the existing archive and it worked like a charm!
I also tried it on a dataset that did not have a correct path to the archive and got this page:
@driusan, @MounaSafiHarab could it be possible to send a warning that the file cannot be found instead of the error page? It would look cleaner.
modules/imaging_browser/README.md
Outdated
@@ -78,7 +78,10 @@ mantis_url - This setting defines a URL for LORIS to include a link to for bug r | |||
`$LORIS/tools/CouchDB_Import_MRI.php` alongside all other CouchDB | |||
import scripts, but should logically be considered part of this module.) | |||
- The imaging browser module includes links to BrainBrowser to visualize data. | |||
- The control panel on the viewsession page includes links to instruments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would tend to right "View Session" page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, changed in in the 5 occurrences
modules/imaging_browser/README.md
Outdated
- The control panel on the viewsession page includes links to the instruments | ||
as configured by the study. | ||
- The control panel on the viewsession page includes links to the DICOM Archive | ||
for any DICOM tars associated with the given session. | ||
- The control panel on the viewsession page includes links to the DICOM Archive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, "View Session" instead of viewsession
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
perfectly valid point, but just to be clear, this is the same error you get if you try to download a MINC file that does not exist (see below). it is in the So not sure I should change it here, or this is the subject of another pull request.... |
@MounaSafiHarab I agree with you, it should probably be a separate ticket. Do you want to create a redmine ticket for it? In the meantime, I'll approve your PR :). Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nice work :)
Done, Redmine #14029 |
htdocs/mri/jiv/get_file.php
Outdated
@@ -92,6 +94,12 @@ | |||
exit(4); | |||
} | |||
|
|||
// If $File contains "DCM_", prefix automatically inserted by the | |||
// LORIS-MRI pipeline, identify it as $FileExt: "DICOMTAR" | |||
if (strpos($File, "DCM_") ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing === 0
. The comment should also point out that it's a hack, since there's no such thing as a DICOMTAR extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@driusan
you can not assume the DCM
is at the beginning of the filename. It used to be the case, but not anymore (now the file stored within a year directory, followed by the filename which then starts with DCM_
), so in the tarchive table, a typical ArchiveLocation is:
2016/DCM_2016-09-13_ImagingUpload-9-50-abCD77.tar
but I updated the comment as you requested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, it still needs !== false
to differentiate from finding at the 0 index vs not finding in the string at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done!
ed1b8b4
@kongtiaowang too many changes after you tested, please test again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Just tested on my sandbox and it works perfectly aside from when the file does not exist in the filesystem, problem which will be resolved in a separate PR as discussed with @MounaSafiHarab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
$tarIDToTarLoc =array(); | ||
foreach ($qresult as $v) { | ||
$tarchiveID = $v['TarchiveID']; | ||
$tarIDToTarLoc[$tarchiveID] =$v['ArchiveLocation']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this passed PHPCS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know;
I added an extra space after the =
sign, so it is a manual change; and this passes phpcs if this was your main concern (I still do not know how it passed before)
not sure if the other issue is also the line before where the ==
is not aligned with the line underneath it, but when I did force it to manually be aligned with the line below, it actually gave me phpcs error!
821b78a
I addressed your comments on @davidblader PR (#2967) here for the @cmadjar removed your passed manual test tag because I added a couple of commits based on comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great!! 😀
1cfb14b
…eToLorisDICOMDownload
I rebased this on minor since PR #2967 has been merged, so I do not need the is there anything else this PR is waiting on? |
Projects can download the .tar that includes raw (DICOM) images, as well as .log and .meta (some meta data related to the insertion progress)
One .tar per candidate per visit:
Two .tar per candidate (example here illustrated becaus2 the candidate had to repeat a specific sequence another day, but under the same visit):