Hi all,
I'm trying to remove a volume from a nifti image. I have an image with 66 volumes and I want to remove the 2nd volume.
I've looked at old posts and only 1 post seemed relevant (the subject line was removing images) but I couldn't exactly get it to work. I used fslsplit and that successfully split up my nifti image into 66 separate images. I removed the image that I didn't want but then I couldn't merge the images together again with fslmerge. These are the commands I typed in, maybe there was something wrong with what I typed in???
command to split the images:
fslsplit DWI_example_meanB0_v2.nii.gz DWI_example_meanB0_v2_split.nii.gz -t
command to merge the images:
fslmerge -t DWI_example_meanB0_v2.nii.gz DWI_example_meanB0_v2.nii.gz*
** ERROR (nifti_image_read): failed to find header file for 'DWI_example_meanB0_v2.nii.gz*'
** ERROR: nifti_image_open(DWI_example_meanB0_v2.nii.gz*): bad header info
ERROR: failed to open file DWI_example_meanB0_v2.nii.gz*
Cannot open volume DWI_example_meanB0_v2.nii.gz* for reading!
Is this even the correct way to remove a volume or should I be doing something else? Or if this is the correct way to do it, what am I doing wrong? Your help would be greatly appreciated!!
|