Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/dwifslpreproc
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def execute(): #pylint: disable=unused-variable
overwrite_dwi_pe_scheme = True
if manual_trt:
# Compare manual specification to that read from the header
if not scheme_times_match(dwi_pe_scheme, dwi_manual_pe_scheme):
if len(dwi_pe_scheme[0]) == 4 and app.ARGS.readout_time is not None and not scheme_times_match(dwi_pe_scheme, dwi_manual_pe_scheme):
app.warn('User-defined total readout time does not match what is stored in DWI image header; proceeding with user specification')
overwrite_dwi_pe_scheme = True
if overwrite_dwi_pe_scheme:
Expand Down Expand Up @@ -549,7 +549,7 @@ def execute(): #pylint: disable=unused-variable
app.warn('User-defined phase-encoding direction design does not match what is stored in SE EPI image header; proceeding with user specification')
overwrite_se_epi_pe_scheme = True
if manual_trt:
if not scheme_times_match(se_epi_pe_scheme, se_epi_manual_pe_scheme):
if len(se_epi_pe_scheme[0]) == 4 and not scheme_times_match(se_epi_pe_scheme, se_epi_manual_pe_scheme):
app.warn('User-defined total readout time does not match what is stored in SE EPI image header; proceeding with user specification')
overwrite_se_epi_pe_scheme = True
if overwrite_se_epi_pe_scheme:
Expand Down
1 change: 1 addition & 0 deletions testing/scripts/tests/dwifslpreproc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mkdir -p ../tmp/dwifslpreproc && mrconvert BIDS/sub-04/dwi/sub-04_dwi.nii.gz -fslgrad BIDS/sub-04/dwi/sub-04_dwi.bvec BIDS/sub-04/dwi/sub-04_dwi.bval -json_import BIDS/sub-04/dwi/sub-04_dwi.json tmp-sub-04_dwi.mif -export_grad_mrtrix tmp-sub-04_dwi.b -strides 0,0,0,1 && dwifslpreproc tmp-sub-04_dwi.mif ../tmp/dwifslpreproc/rpenone_default.mif -pe_dir ap -readout_time 0.1 -rpe_none -force && testing_diff_header ../tmp/dwifslpreproc/rpenone_default.mif dwifslpreproc/rpenone_default.mif.gz
mrconvert tmp-sub-04_dwi.mif -clear_property TotalReadoutTime tmp-sub-04_trt-none_dwi.mif && dwifslpreproc tmp-sub-04_trt-none ../tmp/dwifslpreproc/no_trt_header.mif -pe_dir ap -readout_time 0.1 -force
dwifslpreproc BIDS/sub-04/dwi/sub-04_dwi.nii.gz -fslgrad BIDS/sub-04/dwi/sub-04_dwi.bvec BIDS/sub-04/dwi/sub-04_dwi.bval ../tmp/dwifslpreproc/fslgrad.mif -export_grad_fsl ../tmp/dwifslpreproc/fslgrad.bvec ../tmp/dwifslpreproc/fslgrad.bval -pe_dir ap -readout_time 0.1 -rpe_none -force && testing_diff_header ../tmp/dwifslpreproc/fslgrad.mif dwifslpreproc/rpenone_default.mif.gz && testing_diff_matrix ../tmp/dwifslpreproc/fslgrad.bvec dwifslpreproc/rpenone_default.bvec -abs 1e-2 && testing_diff_matrix ../tmp/dwifslpreproc/fslgrad.bval dwifslpreproc/rpenone_default.bval
dwifslpreproc BIDS/sub-04/dwi/sub-04_dwi.nii.gz -grad tmp-sub-04_dwi.b ../tmp/dwifslpreproc/grad.mif -export_grad_mrtrix ../tmp/dwifslpreproc/grad.b -pe_dir ap -readout_time 0.1 -rpe_none -force && testing_diff_header ../tmp/dwifslpreproc/grad.mif dwifslpreproc/rpenone_default.mif.gz && testing_diff_matrix ../tmp/dwifslpreproc/grad.b dwifslpreproc/rpenone_default.b -abs 1e-2
mrconvert BIDS/sub-04/fmap/sub-04_dir-1_epi.nii.gz -json_import BIDS/sub-04/fmap/sub-04_dir-1_epi.json tmp-sub-04_dir-1_epi.mif -force && mrconvert BIDS/sub-04/fmap/sub-04_dir-2_epi.nii.gz -json_import BIDS/sub-04/fmap/sub-04_dir-2_epi.json tmp-sub-04_dir-2_epi.mif -force && mrcat tmp-sub-04_dir-1_epi.mif tmp-sub-04_dir-2_epi.mif tmp-sub-04_dir-all_epi.mif -axis 3 -force && dwifslpreproc tmp-sub-04_dwi.mif ../tmp/dwifslpreproc/rpepair_default.mif -pe_dir ap -readout_time 0.1 -rpe_pair -se_epi tmp-sub-04_dir-all_epi.mif -force && testing_diff_header ../tmp/dwifslpreproc/rpepair_default.mif dwifslpreproc/rpepair_default.mif.gz
Expand Down