Thank you for the reply Anderson, I appreciate you taking the time to
answer each part of my lengthy email.
As far as reading the images directly into MATLAB, this sounds great, but
it is something I will need to look into more. Considering I have already
processed data using a combination of FSL, excel and MATLAB, for now I
would like to better understand how to correctly define the compulsory
arguments of fslascii2img.
I have not been able to find much documentation on fslascii2img or many
examples of others using it within the message boards, but if anyone does
know of a good document, please send it my way.
Below I have included some details to hopefully be able to figure out what
is going wrong with the conversion.
1. I have an output.txt file generated with fslmeants (--showall) where a
mask was applied to standard space 3D data.
2. The standard space mask applied during step 1 is 644 total voxels
3. The total number of X Y Z coordinates (and intensity values) within the
output file is 644.
4. The total range of X Y Z coordinates covered are 10 20 12 (respectively)
5. fslacsii2img would like the following inputs in order to convert the
.txt to an image:
<input> <xsize> <ysize> <zsize> <tsize> <xdim> <ydim> <zdim> <TR> <output>
6. Here is one of the command versions I have tried:
fslascii2img ROI_Details.txt 10 20 12 1 256 256 256 2.5 ROI2image.nii.gz
Terminal Output:
Sizes incompatible: 2400 voxels vs 2576 numbers
Matrix dimensions are 4 by 644
If I change my XYZT sizes (say to 256), the voxel count will reflect these
4 values multiplied together, but the 2576 number will remain the same.
2576 seems to represent the 644 voxels multiplied across 4 dimensions (X Y
Z and time). When I fudge the numbers to match the number value of 2576
(ie. 644 4 1 1 or 644 2 2 1) the command will run, but these images are
not in the same space and, to no surprise, they are incorrect.
In addition to not being sure what to enter for the sizes, I am also not
certain what should be set as the XYZ dimension values or where to locate
this information. I have tried to use data within the header file of both
the mask and the original data, but none of my combinations have seemed to
work correctly. Any insight into these qualities would be especially
appreciated.
Thank you again for your time and expertise!
All the best,
Jacob
> Hi Jacob,
>
> Please, see below:
>
>
> On 22 July 2014 17:17, [log in to unmask] <
> [log in to unmask]> wrote:
>
>> Hello Anderson,
>> Thank you for your reply.
>> In running fsl_glm to output the residuals, would this be the same as
the
>> res4d.nii.gz image generated by FEAT?
>
> I never checked myself but if in FEAT you selected "fixed effects" for
higher level, yes, they should be the same. If you selected FLAME, the
residuals are probably different, as the parameters are calculated
differently. Have a look at Woolrich et al (2004) paper
> <http://www.ncbi.nlm.nih.gov/pubmed/15050594>. For 1st level fMRI, the
residuals probably are also different, because of the prewhitening in FILM.
> It's easy for you to check though: run both ways in your dataset and
compare.
>
> Which to use then? Not sure what you are investigating, it depends...
>
>
> Also, is the residuals the fitting error of the whole model (as in all
EVs
>> with confounding matrix data points subtracted) from the best fit
timecourse?
>
> Yes, for any of the cases above, the residuals should be for the full
model.
>
>
>
>> For now, I have been able to extract the necessary data from both 4D
and
>> 3D data using fslmeants, but I am having trouble converting these files
back to images using fslascii2img.
>> I have tried inputting the compulsory arguments with information found
within the header of the the original data file, but I can not seem to get
>> the inputs correct and I have yet to get the command to run. Can you
please provide some insight into where I may be able to locate the
following details?
>> "<xsize> <ysize> <zsize> <tsize> <xdim> <ydim> <zdim> <TR>
>> where sizes are in voxels, dims are in mm, TR in sec"
>> Please let me know if you would like me to provide an example and I
would
>> be happy to do so.
> Hmm, for this, although it's certainly possible to convert to ascii,
import
> into Matlab, then export back as text, then assemble back as an image, I
think it's simpler to load the image at once and do everything inside
Matlab. Just add the ${FSLDIR}/etc/matlab to the path, then use read_avw
and save_avw to read/write NIFTI.
> There are similar commands in Freesurfer to read/write NIFTI in Matlab,
you
> could use those as well.
>
> All the best,
>
> Anderson
>
>
>
>> > Hi Jacob,
>> >
>> > Have you considered using the plain Levene's test in Matlab? You
could
>> save
>> > the residuals of the GLM (use the command fsl_glm to output that),
>> then
>> load them (it will be a 4D file) and run the test there. There are
other
>> tests available too in the same command (vartestn, in the Stats
toolbox),
>> > each with their merits.
>> >
>> > Not sure if this helps...
>> >
>> > All the best,
>> >
>> > Anderson
>> >
>> >
>> >
>> > On 8 July 2014 17:10, [log in to unmask] <
>> > [log in to unmask]> wrote:
>> >
>> >> Hello FSL Experts and Users,
>> >> I am wondering if anyone out there knows of a way to generate a
>> voxelwise
>> >> image comparing if the beta variance of the imputed lower-level cope
>> images differ across my two groups?
>> >> Essentially, I am interested in running something like a Levene's
>> test
>> on
>> >> the imputed beta value for each subjects' COPE image, per voxel, per
>> group.
>> >> I have experimented with doing this manually for certain ROIs by
>> outputting data for each subject using fslmeants --showall, but I would
ideally like to produce an image displaying the possible variance of each
>> >> group.
>> >> Thank you for the help and or suggestions!
>> >> Jacob
>> >> The information in this e-mail is intended only for the person to
>> whom
>> it
>> >> is
>> >> addressed. If you believe this e-mail was sent to you in error and
>> the
>> e-mail
>> >> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> >> http://www.partners.org/complianceline . If the e-mail was sent to
>> you
>> in
>> >> error
>> >> but does not contain patient information, please contact the sender
>> and
>> properly
>> >> dispose of the e-mail.
>> >
>
|