We ran into the same problem with *flirt*. In FSL 6.0.1, *flirt *can't take a 4D file as a reference, but it could in fsl v5. Adding a line before 289 to extract the first volume of PhaseTwo_gdc, and modifying flirt accordingly fixes the problem:
${FSLDIR}/bin/fslroi ${WD}/PhaseTwo_gdc ${WD}/PhaseTwo_gdc_slice -1 -1 -1 -1 -1 -1 0 1 ${FSLDIR}/bin/flirt -dof 6 -interp spline -in ${WD}/SBRef.nii.gz -ref ${WD}/PhaseTwo_gdc_slice -omat ${WD}/SBRef2PhaseTwo_gdc.mat -out ${WD}/SBRef2PhaseTwo_gdc -- Joseph M. Orr, Ph.D. Assistant Professor Department of Psychological and Brain Sciences Texas A&M Institute for Neuroscience Texas A&M University College Station, TX On Sat, May 25, 2019 at 8:48 AM Simon Wein < simon.w...@psychologie.uni-regensburg.de> wrote: > Thank you very much for your support. > In our pipeline we have set *$GradientDistortionCoeffs = "NONE",* so line > 189 in > > > https://github.com/Washington-University/HCPpipelines/blob/master/global/scripts/TopupPreprocessingAll.sh > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Washington-2DUniversity_HCPpipelines_blob_master_global_scripts_TopupPreprocessingAll.sh&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=ZKy1VO33u0kvO-PqY1gpb9Ld-AGhtT8c9PAcpsEyp70&m=THI4wxtmV_mHRAFlqo6fSROIYYps7PUMkLs13L56dHs&s=8WyIfhjNJpj6y0N1VFd0l72m8q5_3JN4yAteiQWVgIM&e=> > > was unfortunately skipped. But we could avoid the error by modifying line > 196 to: > > fslmaths ${WD}/BothPhases.nii.gz -mul 0 -add 1 ${WD}/Mask > > > Mask.nii.gz then has properties: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *filename Mask.nii.gzsize of header 348data_type FLOAT32dim0 > 4dim1 104dim2 104dim3 72dim4 6dim5 > 1dim6 1dim7 1vox_units mmtime_units sdatatype > 16nbyper 4bitpix 32pixdim0 1.000000pixdim1 > 2.000000pixdim2 2.000000pixdim3 2.000000pixdim4 > 7.700000pixdim5 0.000000pixdim6 0.000000pixdim7 > 0.000000vox_offset 352cal_max 0.000000cal_min > 0.000000scl_slope 1.000000scl_inter 0.000000phase_dim 0freq_dim > 0slice_dim 0slice_name Unknownslice_code 0slice_start > 0slice_end 0slice_duration 0.000000toffset 0.000000intent > Unknownintent_code 0intent_name intent_p1 0.000000intent_p2 > 0.000000intent_p3 0.000000qform_name Scanner Anatqform_code > 1qto_xyz:1 -1.995593 0.092717 0.094922 93.702583 qto_xyz:2 -0.105543 > -1.976261 -0.288537 118.937881 qto_xyz:3 0.080419 -0.292910 1.976799 > -43.901993 qto_xyz:4 0.000000 0.000000 0.000000 1.000000 > qform_xorient Right-to-Leftqform_yorient > Anterior-to-Posteriorqform_zorient Inferior-to-Superiorsform_name > Scanner Anatsform_code 1sto_xyz:1 -1.995594 0.092714 0.094922 > 93.702583 sto_xyz:2 -0.105540 -1.976261 -0.288537 118.937881 > sto_xyz:3 0.080420 -0.292910 1.976799 -43.901993 sto_xyz:4 0.000000 > 0.000000 0.000000 1.000000 sform_xorient Right-to-Leftsform_yorient > Anterior-to-Posteriorsform_zorient Inferior-to-Superiorfile_type > NIFTI-1+file_code 1descrip 6.0.1aux_file * > > The previously mentioned problem with FSL 6.0+ fslmaths could be avoided. > Would you consider this as a good workaround, or would you recommend > something else? > > But in a later stage, we got another error: > > > > > *Image Exception : #75 :: 3D only method called by higher-dimensional > volume.3D only method called by higher-dimensional volume.Could not open > matrix file > /loctmp/CUDA/DATA/VP_101/rfMRI_REST1_PA/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased/FieldMap/SBRef2PhaseTwo_gdc.matCannot > read input-matrix* > > The file *"SBRef2PhaseTwo_gdc.mat*" was not created, so the problem might > be in line 289 in *"TopupPreprocessingAll.sh":* > > * ${FSLDIR}/bin/flirt -dof 6 -interp spline -in ${WD}/SBRef.nii.gz -ref > ${WD}/PhaseTwo_gdc -omat ${WD}/SBRef2PhaseTwo_gdc.mat -out > ${WD}/SBRef2PhaseTwo_gdc* > > Properties of *SBRef.nii.gz* are: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *filename SBRef.nii.gzsize of header 348data_type UINT16dim0 > 3dim1 104dim2 104dim3 72dim4 1dim5 > 0dim6 0dim7 0vox_units mmtime_units sdatatype > 512nbyper 2bitpix 16pixdim0 1.000000pixdim1 > 2.000000pixdim2 2.000000pixdim3 2.000000pixdim4 > 0.730000pixdim5 0.000000pixdim6 0.000000pixdim7 > 0.000000vox_offset 352cal_max 0.000000cal_min > 0.000000scl_slope 1.000000scl_inter 0.000000phase_dim 2freq_dim > 1slice_dim 3slice_name sequential_increasingslice_code > 1slice_start 0slice_end 0slice_duration 0.000000toffset > 0.000000intent Unknownintent_code 0intent_name intent_p1 > 0.000000intent_p2 0.000000intent_p3 0.000000qform_name Scanner > Anatqform_code 1qto_xyz:1 -1.995593 0.092717 0.094922 93.702583 > qto_xyz:2 -0.105543 -1.976261 -0.288537 118.937881 qto_xyz:3 0.080419 > -0.292910 1.976799 -43.901993 qto_xyz:4 0.000000 0.000000 0.000000 > 1.000000 qform_xorient Right-to-Leftqform_yorient > Anterior-to-Posteriorqform_zorient Inferior-to-Superiorsform_name > Scanner Anatsform_code 1sto_xyz:1 -1.995594 0.092714 0.094922 > 93.702583 sto_xyz:2 -0.105540 -1.976261 -0.288537 118.937881 > sto_xyz:3 0.080420 -0.292910 1.976799 -43.901993 sto_xyz:4 0.000000 > 0.000000 0.000000 1.000000 sform_xorient Right-to-Leftsform_yorient > Anterior-to-Posteriorsform_zorient Inferior-to-Superiorfile_type > NIFTI-1+file_code 1descrip > TE=31;Time=163300.630;phase=0aux_file Single-band_reference* > > > And properties of *PhaseTwo_gdc.nii.gz:* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *filename PhaseTwo_gdc.nii.gzsize of header 348data_type > UINT16dim0 4dim1 104dim2 104dim3 72dim4 > 3dim5 0dim6 0dim7 0vox_units mmtime_units > sdatatype 512nbyper 2bitpix 16pixdim0 > 1.000000pixdim1 2.000000pixdim2 2.000000pixdim3 > 2.000000pixdim4 7.700000pixdim5 0.000000pixdim6 > 0.000000pixdim7 0.000000vox_offset 352cal_max > 0.000000cal_min 0.000000scl_slope 1.000000scl_inter > 0.000000phase_dim 2freq_dim 1slice_dim 3slice_name > alternating_increasing_2slice_code 5slice_start 0slice_end > 0slice_duration 0.000000toffset 0.000000intent > Unknownintent_code 0intent_name intent_p1 0.000000intent_p2 > 0.000000intent_p3 0.000000qform_name Scanner Anatqform_code > 1qto_xyz:1 -1.995593 0.092717 0.094922 93.702583 qto_xyz:2 -0.105543 > -1.976261 -0.288537 118.937881 qto_xyz:3 0.080419 -0.292910 1.976799 > -43.901993 qto_xyz:4 0.000000 0.000000 0.000000 1.000000 > qform_xorient Right-to-Leftqform_yorient > Anterior-to-Posteriorqform_zorient Inferior-to-Superiorsform_name > Scanner Anatsform_code 1sto_xyz:1 -1.995594 0.092714 0.094922 > 93.702583 sto_xyz:2 -0.105540 -1.976261 -0.288537 118.937881 > sto_xyz:3 0.080420 -0.292910 1.976799 -43.901993 sto_xyz:4 0.000000 > 0.000000 0.000000 1.000000 sform_xorient Right-to-Leftsform_yorient > Anterior-to-Posteriorsform_zorient Inferior-to-Superiorfile_type > NIFTI-1+file_code 1descrip > TE=58;Time=162508.120;phase=0aux_file * > Employing *flirt* from FSL 5.0.6 worked again, but we were not sure, how > to modify line 289 properly for FSL 6.0.1. > Thank you for your time. > > Simon > > > > > >>> "Glasser, Matthew" <glass...@wustl.edu> 05/22/19 9:09 PM >>> > > There could be a bug here related to new FSL 6.0+ fslmaths behavior. > Please try modifying: > > > > > https://github.com/Washington-University/HCPpipelines/blob/master/global/scripts/TopupPreprocessingAll.sh > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Washington-2DUniversity_HCPpipelines_blob_master_global_scripts_TopupPreprocessingAll.sh&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=ZKy1VO33u0kvO-PqY1gpb9Ld-AGhtT8c9PAcpsEyp70&m=THI4wxtmV_mHRAFlqo6fSROIYYps7PUMkLs13L56dHs&s=8WyIfhjNJpj6y0N1VFd0l72m8q5_3JN4yAteiQWVgIM&e=> > > > > line 189 to: > > > > ${FSLDIR}/bin/fslmaths ${WD}/PhaseOne_mask_gdc -mas > ${WD}/PhaseTwo_mask_gdc -ero -bin -Tmin ${WD}/Mask > > > > Matt. > > > > *From: *<hcp-users-boun...@humanconnectome.org> on behalf of Simon Wein < > simon.w...@psychologie.uni-regensburg.de> > *Date: *Wednesday, May 22, 2019 at 8:28 AM > *To: *Timothy Coalson <tsc...@mst.edu> > *Cc: *Wilhelm Malloni <wilhelm.mall...@psychologie.uni-regensburg.de>, " > hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> > *Subject: *Re: [HCP-Users] Error while running > "GenericfMRIVolumeProcessingPipeline.sh" > > > > Thank you very much for your suggestion. > > We already use FSL 6.0*.1 *(and Freesurfer 6.0.0), sorry for my > inaccuracy. > > The output of "fslhd ${WD}/BothPhases" is: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *filename BothPhases.nii.gz size of header 348 data_type INT32 > dim0 4 dim1 104 dim2 104 dim3 72 dim4 6 > dim5 1 dim6 1 dim7 1 vox_units mm time_units s > datatype 8 nbyper 4 bitpix 32 pixdim0 1.000000 > pixdim1 2.000000 pixdim2 2.000000 pixdim3 2.000000 > pixdim4 7.700000 pixdim5 0.000000 pixdim6 0.000000 > pixdim7 0.000000 vox_offset 352 cal_max 0.000000 cal_min > 0.000000 scl_slope 1.000000 scl_inter 0.000000 phase_dim 0 > freq_dim 0 slice_dim 0 slice_name Unknown slice_code 0 > slice_start 0 slice_end 0 slice_duration 0.000000 toffset > 0.000000 intent Unknown intent_code 0 intent_name > intent_p1 0.000000 intent_p2 0.000000 intent_p3 0.000000 > qform_name Scanner Anat qform_code 1 qto_xyz:1 -1.995593 0.092717 > 0.094922 93.702583 qto_xyz:2 -0.105543 -1.976261 -0.288537 118.937881 > qto_xyz:3 0.080419 -0.292910 1.976799 -43.901993 qto_xyz:4 0.000000 > 0.000000 0.000000 1.000000 qform_xorient Right-to-Left qform_yorient > Anterior-to-Posterior qform_zorient Inferior-to-Superior sform_name > Scanner Anat sform_code 1 sto_xyz:1 -1.995594 0.092714 0.094922 > 93.702583 sto_xyz:2 -0.105540 -1.976261 -0.288537 118.937881 sto_xyz:3 > 0.080420 -0.292910 1.976799 -43.901993 sto_xyz:4 0.000000 0.000000 > 0.000000 1.000000 sform_xorient Right-to-Left sform_yorient > Anterior-to-Posterior sform_zorient Inferior-to-Superior file_type > NIFTI-1+ file_code 1 descrip 6.0.1 aux_file * > > > > > > The output of "fslhd ${WD}/Mask.nii.gz" is: > > > > *filename Mask.nii.gz* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > * size of header 348 data_type FLOAT32 dim0 4 dim1 104 > dim2 104 dim3 72 dim4 3 dim5 1 dim6 1 > dim7 1 vox_units mm time_units s datatype 16 nbyper > 4 bitpix 32 pixdim0 1.000000 pixdim1 2.000000 > pixdim2 2.000000 pixdim3 2.000000 pixdim4 7.700000 > pixdim5 0.000000 pixdim6 0.000000 pixdim7 0.000000 > vox_offset 352 cal_max 0.000000 cal_min 0.000000 > scl_slope 1.000000 scl_inter 0.000000 phase_dim 0 freq_dim 0 > slice_dim 0 slice_name Unknown slice_code 0 slice_start 0 > slice_end 0 slice_duration 0.000000 toffset 0.000000 intent > Unknown intent_code 0 intent_name intent_p1 0.000000 > intent_p2 0.000000 intent_p3 0.000000 qform_name Scanner Anat > qform_code 1 qto_xyz:1 -1.995593 0.092717 0.094922 93.702583 > qto_xyz:2 -0.105543 -1.976261 -0.288537 118.937881 qto_xyz:3 0.080419 > -0.292910 1.976799 -43.901993 qto_xyz:4 0.000000 0.000000 0.000000 > 1.000000 qform_xorient Right-to-Left qform_yorient > Anterior-to-Posterior qform_zorient Inferior-to-Superior sform_name > Scanner Anat sform_code 1 sto_xyz:1 -1.995594 0.092714 0.094922 > 93.702583 sto_xyz:2 -0.105540 -1.976261 -0.288537 118.937881 > sto_xyz:3 0.080420 -0.292910 1.976799 -43.901993 sto_xyz:4 0.000000 > 0.000000 0.000000 1.000000 sform_xorient Right-to-Left sform_yorient > Anterior-to-Posterior sform_zorient Inferior-to-Superior file_type > NIFTI-1+ file_code 1 descrip 6.0.1 aux_file * > > > > We noticed that running "*${FSLDIR}/bin/fslmaths ${WD}/BothPhases -abs > -add 1 -mas ${WD}/Mask -dilM -dilM -dilM -dilM -dilM ${WD}/BothPhases_fsl5" > *seems to work with FSL 5.0.6 at least. The header of the image > *"BothPhases_fsl5 > "*, generated with FSL 5.0.6 , is: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *filename BothPhases_fsl5.nii.gz sizeof_hdr 348 data_type > FLOAT32 dim0 4 dim1 104 dim2 104 > dim3 72 dim4 6 dim5 1 dim6 1 > dim7 1 vox_units mm time_units s datatype 16 > nbyper 4 bitpix 32 pixdim0 0.000000 pixdim1 > 2.000000 pixdim2 2.000000 pixdim3 2.000000 pixdim4 > 7.700000 pixdim5 0.000000 pixdim6 0.000000 pixdim7 > 0.000000 vox_offset 352 cal_max 0.0000 cal_min 0.0000 > scl_slope 1.000000 scl_inter 0.000000 phase_dim 0 > freq_dim 0 slice_dim 0 slice_name Unknown slice_code 0 > slice_start 0 slice_end 0 slice_duration 0.000000 time_offset > 0.000000 intent Unknown intent_code 0 intent_name > intent_p1 0.000000 intent_p2 0.000000 intent_p3 0.000000 > qform_name Scanner Anat qform_code 1 qto_xyz:1 -1.995593 > 0.092717 0.094922 93.702583 qto_xyz:2 -0.105543 -1.976261 > -0.288537 118.937881 qto_xyz:3 0.080419 -0.292910 1.976799 > -43.901993 qto_xyz:4 0.000000 0.000000 0.000000 1.000000 > qform_xorient Right-to-Left qform_yorient Anterior-to-Posterior > qform_zorient Inferior-to-Superior sform_name Scanner Anat > sform_code 1 sto_xyz:1 -1.995594 0.092714 0.094922 93.702583 > sto_xyz:2 -0.105540 -1.976261 -0.288537 118.937881 sto_xyz:3 > 0.080420 -0.292910 1.976799 -43.901993 sto_xyz:4 0.000000 > 0.000000 0.000000 1.000000 sform_xorient Right-to-Left sform_yorient > Anterior-to-Posterior sform_zorient Inferior-to-Superior file_type > NIFTI-1+ file_code 1 descrip FSL5.0 aux_file * > > > > > > All the best > > > > Simon > > > > > > >>> Timothy Coalson <tsc...@mst.edu> 05/21/19 8:57 PM >>> > > This may not be related to your particular problem, but you need to have > FSL 6.0.1 for some of the pipelines (MR FIX in particular). Using fslhd on > the BothPhases and Mask files should give others on the list some > information to work with. > > > > Tim > > > > > > On Tue, May 21, 2019 at 8:18 AM Simon Wein < > simon.w...@psychologie.uni-regensburg.de> wrote: > > Dear all, > > > > we are experiencing problems when performing the fMRI volumetric > processing with "GenericfMRIVolumeProcessingPipeline.sh": > > > > Image Exception : #3 :: Attempted to multiply images of different sizes > terminate called after throwing an instance of 'std::runtime_error' > what(): Attempted to multiply images of different sizes > /loctmp/CUDA/Pipelines-master_fs6/global/scripts/TopupPreprocessingAll.sh: > line 269: 10710 Aborted ${FSLDIR}/bin/fslmaths > ${WD}/BothPhases -abs -add 1 -mas ${WD}/Mask -dilM -dilM -dilM -dilM -dilM > ${WD}/BothPhases > > > > > > Environment: > > 1. Debian 9.0 > > 2. HCP pipeline 4.0.0 > > 3. Workbench 1.3.2 > > 4. FreeSurfer 6.0 > > 5. FSL 6.0 > > 6. gradunwarp (HCP) 1.0.3 > > > > > > We would be thankful for any help! > > > > Kind regards > > Simon > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailman_listinfo_hcp-2Dusers&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=ZKy1VO33u0kvO-PqY1gpb9Ld-AGhtT8c9PAcpsEyp70&m=THI4wxtmV_mHRAFlqo6fSROIYYps7PUMkLs13L56dHs&s=Co6qIFMSawWKWXPRkI8-12oQS5Y5aMnkmG57bC0NW-4&e=> > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > > > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users