Skip to content

LORIS-MRI Release v23.0.0

Compare
Choose a tag to compare
@cmadjar cmadjar released this 12 Jun 15:53
· 10 commits to 23.0-release since this release
80ae482

This release of the LORIS-MRI repository accompanies the LORIS 23.0.0 release.

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:
      1. Insert a record in mri_protocol_group with the new group name and ID.
      2. Associate each line in table mri_protocol to a protocol group in mri_protocol_group by filling out columnMriProtocolGroupID.
      3. 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.
    • 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.
  • 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 the getSubjectIDs function of the profileTemplate.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 script dicomTar.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 from MRIProcessingUtility.pm (#518)

  • Removed leftover occurrences of requiresStaging (#521)

Notes for Existing Projects

  • Ensure that the getSubjectIDs function in your prod 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 and mri_protocol_checks will by default be assigned a Default MRI protocol group and Default MRI protocol checks group that will apply to all your projects, subprojects and visit labels.