How to do skull stripping of PET imaging in FSL

,

Hi, I am doing preprocessing the PET data in FSL, but I have some problem.
When I used the code

bet2 $inoutdata $outputdata -f 0.5 -g 0 -m 

It shows the error message

/usr/local/fsl/bin/bet: line 399: 365162 Segmentation fault      (core dumped) ${FSLDIR}/bin/bet2 $IN $OUT $bet2opts
/usr/local/fsl/bin/bet failed during command: $input  $output -f 0.5 -g 0 -m

How can I fix them?
FYI, it is the head information for imaging

sizeof_hdr	348
data_type	FLOAT64
dim0		3
dim1		256
dim2		256
dim3		256
dim4		1
dim5		1
dim6		1
dim7		1
vox_units	mm
time_units	s
datatype	64
nbyper		8
bitpix		64
pixdim0		1.000000
pixdim1		1.000000
pixdim2		1.000000
pixdim3		1.000000
pixdim4		1.000000
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	Aligned Anat
qform_code	2
qto_xyz:1	-1.000000 0.000000 0.000000 130.415588 
qto_xyz:2	0.000000 -1.000000 0.000000 118.395645 
qto_xyz:3	0.000000 0.000000 1.000000 -118.397522 
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	Aligned Anat
sform_code	2
sto_xyz:1	-1.000000 0.000000 0.000000 130.415588 
sto_xyz:2	0.000000 -1.000000 0.000000 118.395645 
sto_xyz:3	0.000000 0.000000 1.000000 -118.397522 
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		spm - realigned
aux_file

Hi @Seooo , welcome to Neurostars!

Outside of FSL, this tool may be useful to you: synthstrip.io

Thank you for reply! But I want to do this thing in FSL :confused: Is there any solution that I can solve in FSL?

It looks like a memory issue. Do you have enough ressources on the computer where you are running the program? Are other functions from FSL working fine on your computer?

I think it has enough resources…Even other functions work well

Hi @Seooo, can you share some images of your data?

Sure!

Here is the link for the images

Hi @Seooo, sorry - I don’t know what an .egg file is, or how to view it. Can you post some PNGs, or even share the image file (.nii or .nii.gz) itself?

That’s just a kind of a zip file.
https://drive.google.com/drive/folders/1s_30yqAUSZgpXqgrULMyHhWgj46rcVj9?usp=sharing
Here is new link.

Hi @Seooo, just looking at the first of your images, it appears to have been heavily pre-processed, and resampled using nearest neighbour interpolation (this is apparent by the striping artifacts). I’m not surprised that bet isn’t working on this image, and I would expect you to encounter problems with other tools. What has been done to this data?

Hi @paulmccarthy, I delete header information and coregistered this image with T1 at SPM. I did those works to get SUVRs.

Hi @Seooo I would recommend adjusting your processing pipeline so that you run bet on the unprocessed images before registration/resampling. You can create a brain mask in the native PET space, and then transform it to other spaces as needed, after you have calculated your registrations.

Also, there is definitely something wrong with your resampling process - those striping artifacts should not be present, and are going to continue to cause problems if you try to pass these resampled images through any sort of processing/analysis pipeline.