pnlbwh / CNN-Diffusion-MRIBrain-Segmentation

CNN based brain masking
Other
14 stars 10 forks source link

Use relative path for slicesdir #30

Closed tashrifbillah closed 3 years ago

tashrifbillah commented 3 years ago

https://github.com/pnlbwh/CNN-Diffusion-MRIBrain-Segmentation/blob/master/pipeline/dwi_masking.py#L504

Use os.path.basename(str1)+ os.path.basename(str2)

Otherwise, this error happens for (probably) long absolute paths:

ERROR: cannot open slicesdir/_data_pnl_U01_HCP_Psychosis_data_processing_BIDS_derivatives_pnlpipe_sub-2001_ses-1_dwi_hcppipe1_Diffusion_topup_hifib0_bse_to__data_pnl_U01_HCP_Psychosis_data_processing_BIDS_derivatives_pnlpipe_sub-2001_ses-1_dwi_hcppipe1_Diffusion_topup_hifib0_bse-multi_BrainMask.pngfor writing