Hello Melissa,
Without seeing the full script_name.sh, so assuming the fslmaths command is the one seg-faulting, it might be worth checking that the files with background 1 don’t contain any NaNs or other problematic values, e.g.
fslmaths ./FW_f.nii.gz -nanm tempmask
fslstats tempmask -V
If the fslstats call reports a non-zero number of voxels then this is the issue.
If everything looks good, then if you tar up the input files ( mask.nii.gz and FW_f.nii.gz ) and upload to:
https://oxfile.ox.ac.uk/oxfile/work/extBox?id=700839B35190E48BF
I’ll be able to check the data locally.
Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre
John Radcliffe Hospital
University of Oxford
> On 9 Jan 2023, at 21:11, Melissa McSweeney <[log in to unmask]> wrote:
>
> Hello FSL Users,
>
> I came across an error when I used fslmaths in FSL version 6.0.4 to multiply one value of a mask (voxel values that equal 2) by some free water metrics. It works fine for most of my nifti images except for files where the background space in the image is set to 1, while the images that work have the background value set to 0. In the below example, the “problem file” is FW_f.nii.gz
> fslmaths ./mask.nii.gz -thr 2 -uthr 2 -mul ./FW_f.nii.gz ./mask_FW_f.nii.gz
>
> Then that command generates the message:
> ./script_name.sh: line 35: 33768 Segmentation fault
>
> That context being given, I have the following questions:
> 1. I’m wondering if FSL version 6.0.4 has some sort of expectation that the background of an image should be equal to 0 instead of 1, and if that could raise a “Segmentation fault” warning? (Interestingly, the segmentation appears to still run, but I am not sure how accurate it is given the “Segmentation fault” message.)
>
> 2. If this is the case, is there an fslmaths or other FSL command where I can either change all of the voxels that equal 1 to 0, or subtract the value of 1 from all voxels that are equal to 1 in the image while keeping all other values constant?
>
> I searched the archives and could not find a question that matched what I am experiencing.
>
> Thank you,
> M
>
> To unsubscribe from the FSL list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
>
########################################################################
To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
This message was issued to members of www.jiscmail.ac.uk/FSL, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/
|