LORIS-MRI Release v23.0.0
This release of the LORIS-MRI repository accompanies the LORIS 23.0.0 release.
- List of all LORIS-MRI 23.0.0 changes (not including schema and module changes which were contributed to the main LORIS repo)
New Features
-
Add support for multiple MRI protocols based on projects, subprojects or visit labels (#369) Feel free to read the updated documentation in the LORIS-MRI docs directory for full documentation on how to set protocol based on a project, subproject or visit label. Instructions on how to set that up:
- First you have to run the SQL patch that updates the database schema for this new feature. Once you have done this, the behaviour of the pipeline should not have changed: all the lines of the mri_protocol and mri_protocol_checks will be active for all scans . To create a new MRI protocol group:
- Insert a record in
mri_protocol_group
with the new group name and ID. - Associate each line in table
mri_protocol
to a protocol group inmri_protocol_group
by filling outcolumnMriProtocolGroupID
. - Determine the conditions under which the new group will be used to identify the type of a scan. Conditions include the project ID, sub-project ID or visit label of the session at which the scan was done. There are columns in table
mri_protocol_group_target
for each of these types of conditions. When more than one column is filled in this table, the conditions are ANDed together.
- Insert a record in
- The steps to create a new MRI protocol checks group are analog to those described above but use tables mri_protocol_checks_group and mri_protocol_checks_group_target instead.
- Each line of the mri_protocol table belongs to either one group or no group at all, and this will be enforced in the MySQL schema. Lines of mri_protocol_checks can belong to 0, 1 or many protocol checks group though.
- First you have to run the SQL patch that updates the database schema for this new feature. Once you have done this, the behaviour of the pipeline should not have changed: all the lines of the mri_protocol and mri_protocol_checks will be active for all scans . To create a new MRI protocol group:
-
Addition of a mass NIfTI pic creation script for the python pipeline (#515)
-
Creation of a DICOM archive validation script for the python pipeline (#517)
Improvements
-
Allow deletion of a file with a specific base name in
delete_imaging_upload.pl
(#508) -
Add the
$subjectID{'isPhantom'}
key in thegetSubjectIDs
function of theprofileTemplate.pl
(#516) -
Fixed the way the value was encoded in the events file for electrophysiology datasets (#521)
-
Fixed a "Can't call method 'prepare' on unblessed reference" message when the pipeline was running (#533)
-
Fixed errors that were displayed when running the LORIS-MRI Perl pipeline on Mac OS X (#534)
-
Fixed a bug in
MakeArchiveLocationRelative.pl
tool script (#537) -
Fixed the invalid
find
command in scriptdicomTar.pl
that fails to delete files with name__MACOSX
(#540) -
Fixed a bug in the
mass_electrophysiology_chunking
script (#543) -
Fixed the timestamp not being populated in the
parameter_file
table when inserting into that table from the python pipeline (#544)
Clean up
-
Deleted unused
setMRISession
function fromMRIProcessingUtility.pm
(#518) -
Removed leftover occurrences of
requiresStaging
(#521)
Notes for Existing Projects
-
Ensure that the
getSubjectIDs
function in yourprod
config file contains the changes from PR #516 -
If you are using the python pipelines, ensure to update your
database_config.py
config file with the following content (#517):
import re
from lib.imaging import Imaging
def get_subject_ids(db, dicom_value=None, scanner_id=None):
subject_id_dict = {}
imaging = Imaging(db, False)
phantom_match = re.search('(pha)|(test)', dicom_value, re.IGNORECASE)
candidate_match = re.search('([^_]+)_(\d+)_([^_]+)', dicom_value, re.IGNORECASE)
if phantom_match:
subject_id_dict['isPhantom'] = True
subject_id_dict['CandID'] = imaging.get_scanner_candid(scanner_id)
subject_id_dict['visitLabel'] = dicom_value.strip()
subject_id_dict['createVisitLabel'] = 1
elif candidate_match:
subject_id_dict['isPhantom'] = False
subject_id_dict['PSCID'] = candidate_match.group(1)
subject_id_dict['CandID'] = candidate_match.group(2)
subject_id_dict['visitLabel'] = candidate_match.group(3)
subject_id_dict['createVisitLabel'] = 0
return subject_id_dict
- Caveat related to the support for multiple MRI protocols:
- Ensure to run the patch on the LORIS side to populate the table changes made to the MRI protocol tables for your project. Information about the new table structures can be found in the LORIS-MRI docs directory here. Note that by default, all entries in
mri_protocol
andmri_protocol_checks
will by default be assigned aDefault MRI protocol group
andDefault MRI protocol checks group
that will apply to all your projects, subprojects and visit labels.
- Ensure to run the patch on the LORIS side to populate the table changes made to the MRI protocol tables for your project. Information about the new table structures can be found in the LORIS-MRI docs directory here. Note that by default, all entries in