Skip to content
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

Batch upload and insertion of scans for projects not using the front-end imaging uploader #133

Merged
merged 6 commits into from
Aug 11, 2016

Conversation

MounaSafiHarab
Copy link
Contributor

@MounaSafiHarab MounaSafiHarab commented Jun 9, 2016

  • This file is intended to mimic the bahviour of the front-end imaging uploader, but without having to upload scans, one file at a time
  • It allows projects with candidates having a registered timepoint in the Loris database to upload multiple scans (see "Usage" section below) to populate the mri_upload table in the database and launch the insertion scripts, more specifically, launching imaging_upload_file.pl which in turns performs the execution of the following main steps:
    ** IsCandidateInfoValid
    ** dicomTar.pl
    ** tarchiveLoader which triggers minc_insertion.pl (mri_protocol checks), pic/jiv/nii files generation.
  • This file is similar in functionality to batch_uploads_tarchive which performs the tarchiveLoader step on multiple files at once, but extends the functionality of batch_uploads_tarchive to include the 3 steps highlighted in the previous point
  • Usage: Run it as follows form where the Loris-MRI code base is:

$ ./batch_uploads_imageuploader -profile prod < imageuploader_list >log_batch_imageuploader.txt 2>&1

where imageuploader_list is a text file that has one scan details per line (example for 2 entries shown below); and each line (for each scan) consists of space delimited 1) the full path to the DICOM zipped scan, 2) Y or N depending on whether the scan is for a phantom or not, and 3) patient name following the PSCID_CandID_VisitLabel Loris convention for real candidates and left BLANK for phantoms

An example of uploading 2 entries/scans to be uploaded:
/data/incoming/PSC0001_123456_V1.tar.gz N PSC0001_123456_V1
/data/incoming/Lego_Phantom_MNI_20140101.zip Y

@MounaSafiHarab MounaSafiHarab added this to the 16.1 milestone Jun 9, 2016
@christinerogers
Copy link
Collaborator

@MounaSafiHarab This looks like a major change for existing projects, and information that should be easily available to New projects as well.
Let's create/add tag "add to documentation" as it should definitely go in the wiki as well.

@MounaSafiHarab
Copy link
Contributor Author

@christinerogers

This is a new feature that should not impact at all existing projects. imaging_upload_file.pl should run for existing projects without any change (the extra options added to the script are not required for existing projects, and are needed for those using batch_uploads_imageuploader which is a new script).

Bye yes, it should be documented and tested more thoroughly.

@gluneau
Copy link
Contributor

gluneau commented Aug 4, 2016

@MounaSafiHarab, please add -profile prod option to the example on how to run this tool.

@MounaSafiHarab
Copy link
Contributor Author

@gluneau,

thanks for the catch!

"matches the file name $base in $path\n";
exit(2);
}
if (($phantom eq '') || ($phantom ne 'N') || ($phantom eq 'Y')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MounaSafiHarab If you modify your logic for this line to:

if (($phantom eq '') || (($phantom ne 'N') && ($phantom ne 'Y')))

the phantoms will get inserted.

@driusan driusan merged commit 04a6452 into aces:16.1-dev Aug 11, 2016
@MounaSafiHarab MounaSafiHarab changed the title Batch upload of scans for projects not using the front-end imaging uploader Batch upload and insertion of scans for projects not using the front-end imaging uploader Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants