Skip to content

Commit cefc72f

Browse files
cmadjarlaemtlLaetitia Fesselier
authored
Pull v24.1.2 into main (#821)
* update the VERSION for the next bug fix release (#816) * [dcm2bids] Remove hardcoded dcm2niix binary to use the value stored in the `converter` Config setting (#815) * modifies the dcm2niix command to use the Config converter value instead of hardcoding dcm2niix * add a check to make sure the converter is a dcm2niix binary * Pull 24.0.3 in 24.1 release (#820) * Reload the mri_upload dictionary before checking if a tarchive has been validated (#783) * reload mri_upload object * remove debugging exit and print statements * fix minor bugs when dealing with scans.tsv files (#774) * fix regex search for excluded series description patterns (#786) * fix_return_statement_of_create_imaging_upload_dict_from_upload_id_function (#787) * [dcm2bids] Insert into MRICandidateErrors if there is a Candidate PatientName mismatch (#790) * insert into MRICandidateErrors when candidate mismatch or pname not matching between DICOMs and NIfTI * remove exit * fix table name to MRICandidateErrors instead of MriCandidateErrors as apparently, it makes a difference on MariaDB/Linux VMs while it just worked on local install on Mac... (#793) * Set DICOM dates to undef if the date does not follow proper DICOM standard (#794) * set date to undef if it does not follow proper DICOM formats * fix all dates set to NULL * Installation and pet fixes (#818) Co-authored-by: Laetitia Fesselier <laetitia.fesselier@mcgill.ca> * Update VERSION file for next bug fix release Co-authored-by: Laetitia Fesselier <laetitia.fesselier@mail.mcgill.ca> Co-authored-by: Laetitia Fesselier <laetitia.fesselier@mcgill.ca> Co-authored-by: Laetitia Fesselier <laetitia.fesselier@mail.mcgill.ca> Co-authored-by: Laetitia Fesselier <laetitia.fesselier@mcgill.ca>
1 parent be601e3 commit cefc72f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.1.0
1+
24.1.2

python/lib/dcm2bids_imaging_pipeline_lib/dicom_archive_loader_pipeline.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,13 @@ def _run_dcm2niix_conversion(self):
143143
nifti_tmp_dir = os.path.join(self.tmp_dir, "nifti_files")
144144
os.makedirs(nifti_tmp_dir)
145145

146+
converter = self.config_db_obj.get_config("converter")
147+
if not re.search('.*dcm2niix.*', converter, re.IGNORECASE):
148+
message = f"{converter} does not appear to be a dcm2niix binary."
149+
self.log_error_and_exit(message, lib.exitcode.PROJECT_CUSTOMIZATION_FAILURE, is_error="Y", is_verbose="N")
150+
146151
dcm2niix_process = subprocess.Popen(
147-
["dcm2niix", "-ba", "n", "-z", "y", "-o", nifti_tmp_dir, self.extracted_dicom_dir],
152+
[converter, "-ba", "n", "-z", "y", "-o", nifti_tmp_dir, self.extracted_dicom_dir],
148153
stdout=subprocess.PIPE,
149154
stderr=subprocess.STDOUT
150155
)

uploadNeuroDB/NeuroDB/ImagingUpload.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,12 @@ sub HrrtPatientNameMatch {
643643
# if the filename name matches one of the following, return 1 as the patient
644644
# name will not be in the filename anyway
645645
my $exclude_regex = "blank|phantom|temp|test|tar|noisytx|"
646-
. "script|ini|directnorm|up_mask";
646+
. "script|ini|directnorm|up_mask|To_Archive|mask_input";
647647
return 1 if ( $filename =~ /$exclude_regex/i );
648648

649649
# if the patient name matches with the filename return 1, otherwise return 0
650-
( $filename =~ /$this->{'pname'}/i ) ? return 1 : return 0;
650+
my $parsed_filename = $filename =~ s/-/_/r;
651+
( $parsed_filename =~ /$this->{'pname'}/i ) ? return 1 : return 0;
651652
}
652653

653654

0 commit comments

Comments
 (0)