Hello,
For the second part of your problem ( the segmentation fault ), does changing
fsl:exec "cat grot | ${FSLDIR}/bin/fslcreatehd - filtered_func_data"
to
fsl:exec "${FSLDIR}/bin/fslcreatehd tmpHeader filtered_func_data"
in featlib.tcl, fix the problem?
Many Regards
Matthew
> Hi all -
>
> I was trying to run a FEAT process on a timeseries and ran into an unusual problem. Here is a copy of the relevant info from the log:
>
> /CBI/bin/fsldir/bin/fslmaths /Volumes/CBIV4/Pellilab/channelExpt/channels04212010/MotionComp/TSeries/tseries-100428-201040 prefiltered_func_data -odt float
> Total original volumes = 190
> Deleting 10 volume(s) - BE WARNED for future analysis!
>
> /CBI/bin/fsldir/bin/fslroi prefiltered_func_data prefiltered_func_data 10 180
>
> /CBI/bin/fsldir/bin/fslroi prefiltered_func_data example_func 90 1
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data -Tmean mean_func
>
> /CBI/bin/fsldir/bin/bet2 mean_func mask -f 0.3 -n -m; /CBI/bin/fsldir/bin/immv mask_mask mask
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data -mas mask prefiltered_func_data_bet
>
> /CBI/bin/fsldir/bin/fslstats prefiltered_func_data_bet -p 2 -p 98
> 0.000000 12756.991211
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data_bet -thr 1275.6991211 -Tmin -bin mask -odt char
>
> /CBI/bin/fsldir/bin/fslstats prefiltered_func_data -k mask -p 50
> 5924.003906
>
> /CBI/bin/fsldir/bin/fslmaths mask -dilF mask
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data -mas mask prefiltered_func_data_thresh
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data_thresh -mul 1.68804750278 prefiltered_func_data_intnorm
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data_intnorm -bptf 33.3333333333 -1 prefiltered_func_data_tempfilt
>
> /CBI/bin/fsldir/bin/fslmaths prefiltered_func_data_tempfilt filtered_func_data
>
> /CBI/bin/fsldir/bin/fslhd -x filtered_func_data | sed 's/ dt = .*/ dt = '1.5'/g' > grot
>
> cat grot | /CBI/bin/fsldir/bin/fslcreatehd - filtered_func_data
> sh: line 1: 97983 Done cat grot
> 97984 Segmentation fault | /CBI/bin/fsldir/bin/fslcreatehd - filtered_func_data
>
> /bin/rm grot
>
> /CBI/bin/fsldir/bin/fslmaths filtered_func_data -Tmean mean_func
> ++ WARNING: nifti_read_buffer(filtered_func_data.img):
> data bytes needed = 442368
> data bytes input = 0
> number missing = 442368 (set to 0)
> ++ WARNING: nifti_read_buffer(filtered_func_data.img):
> data bytes needed = 442368
> data bytes input = 0
> number missing = 442368 (set to 0)
> ++ WARNING: nifti_read_buffer(filtered_func_data.img):
> data bytes needed = 442368
> data bytes input = 0
> number missing = 442368 (set to 0)
> etc .... (filtered_func_data is basically empty)
>
>
> The step that trips it up seems to be creating the new header after changing the time units.
>
> ** After playing with this a bit, I discovered that fslmaths seems to incorrectly set the header information in the _very_ first step of copying my data.
> Initially, my data header shows this:
>
>> fslhd -x ../Raw/TSeries/100421200835.nii
>
>
> <nifti_image
> nifti_type = 'NIFTI-1+'
> header_filename = '../Raw/TSeries/100421200835.nii'
> image_filename = '../Raw/TSeries/100421200835.nii'
> image_offset = '352'
> ndim = '4'
> nx = '64'
> ny = '64'
> nz = '27'
> nt = '190'
> dx = '3'
> dy = '3'
> dz = '3'
> dt = '1500'
> datatype = '4'
> datatype_name = 'INT16'
> nvox = '21012480'
> nbyper = '2'
> byteorder = 'MSB_FIRST'
> xyz_units = '2'
> xyz_units_name = 'mm'
> time_units = '16'
> time_units_name = 'ms'
> freq_dim = '1'
> phase_dim = '2'
> slice_dim = '3'
> slice_code = '3'
>
> Then, if I type:
>> fslmaths ../Raw/TSeries/100421200835 raw
>
> and
>
>> fslhd -x raw
>
> I get:
>
> <nifti_image
> nifti_type = 'NIFTI-1'
> header_filename = 'raw.hdr'
> image_filename = 'raw.img'
> image_offset = '0'
> ndim = '4'
> nx = '64'
> ny = '64'
> nz = '27'
> nt = '190'
> dx = '3'
> dy = '3'
> dz = '3'
> dt = '1500'
> datatype = '4'
> datatype_name = 'INT16'
> nvox = '21012480'
> nbyper = '2'
> byteorder = 'LSB_FIRST'
> cal_min = '0'
> cal_max = '32767'
> xyz_units = '2'
> xyz_units_name = 'mm'
> time_units = '8'
> time_units_name = 's'
>
> Importantly, both 'time_units' and 'time_units_name' have changed, but dt did not! I am guessing this is then screwing up the scripts later. The same thing happens whether or not the source file is a .nii or a .img/.hdr pair. Is this a bug?? Can it be fixed please?
>
> thanks,
> Ed
>
>
> --
> Ed Vessel
> Center for Brain Imaging
> New York University
> [log in to unmask]
> 4 Washington Place, Rm. 156
> New York, NY 10003
> http://www.cns.nyu.edu/~vessel
> (212) 998-8217
>
|