Hi Martin, thanks a lot for your answers. The slopes command is giving me errors though, see below. I also attach the long.qdec.table.dat that I'm using. I should point out that those ?h.long.cortex.label files mentioned in the error messages are in fact at their expected locations, and appear to be fine (i.e. are not size 0)
In case anyone else can advice about question 1, I'd be really grateful!
Command
Error
long_mris_slopes --qdec ./qdec/long.qdec.table.dat --meas area --hemi lh --do-avg --do-rate --do-pc1 --do-spc --do-stack --do-label --time day --qcache fsaverage --sd $SUBJECTS_DIR
No such file or directory
mris_label_calc: could not open label file /vols/Scratch/tpopescu/learning/FS/F02/label/lh.long.cortex.label
Invalid argument
mris_label_calc: mris_label_calc.cpp:127: int main(int, char**): Assertion `l2 != __null' failed.
long_mris_slopes --qdec ./qdec/long.qdec.table.dat --meas area --hemi rh --do-avg --do-rate --do-pc1 --do-spc --do-stack --do-label --time day --qcache fsaverage --sd $SUBJECTS_DIR
mris_calc: could not open label file /vols/Scratch/tpopescu/learning/FS/F23/label/rh.long.cortex.label
Invalid argument
mris_calc: could not read label file /vols/Scratch/tpopescu/learning/FS/F23/label/rh.long.cortex.label
Invalid argument
long_mris_slopes --qdec ./qdec/long.qdec.table.dat --meas lGI --hemi lh --do-avg --do-rate --do-pc1 --do-spc --do-stack --do-label --time day --qcache fsaverage --sd $SUBJECTS_DIR
mris_label_calc: mris_label_calc.cpp:127: int main(int, char**): Assertion `l2 != __null' failed.
SUBJECT F02 Intersecting Within-Subject Cortex Label
cp /vols/Scratch/tpopescu/learning/FS/F02_d1.long.F02/label/lh.cortex.label /vols/Scratch/tpopescu/learning/FS/F02/label/lh.long.cortex.label
mris_label_calc intersect /vols/Scratch/tpopescu/learning/FS/F02_d5.long.F02/label/lh.cortex.label /vols/Scratch/tpopescu/learning/FS/F02/label/lh.long.cortex.label /vols/Scratch/tpopescu/learning/FS/F02/label/lh.long.cortex.label
ERROR -6 : mris_label_calc intersect did not work?
long_mris_slopes --qdec ./qdec/long.qdec.table.dat --meas lGI --hemi rh --do-avg --do-rate --do-pc1 --do-spc --do-stack --do-label --time day --qcache fsaverage --sd $SUBJECTS_DIR
No such file or directory
mris_label_calc: could not open label file /vols/Scratch/tpopescu/learning/FS/F02/label/rh.long.cortex.label
Invalid argument
mris_label_calc: mris_label_calc.cpp:127: int main(int, char**): Assertion `l2 != __null' failed.
On 5 June 2014 16:00, Martin Reuter <mreuter@nmr.mgh.harvard.edu> wrote:
Hi Tudor,
1. not sure, this is a more general question for people more familiar with surfaces and edits
2. nothing is necessary, however, if you have regions where you find difficulties in some subjects, I'd look at that region in all subjects (e.g. you mention the posterior end). Usually if surfaces on the base are good, the long should be high quality also.
3. looks good (I'd do space separated, also some columns merged in your email and fsid-base for subject3 is wrong).
4. using the two-stage model you could do a pairwise analysis between your groups in the second stage, so linear mixed effects model is not necessary. In the two stage model, just think of it as a cross sectional analysis of e.g. thickness change, instead of thickness.
5. yes, is sutiable. You'd have to run it several times, once for each of the measures you want to analyze. You can drop some of:and only keep e.g. the rate or the pc1 (depending on what you want to analyze). You can also use --stack-rate to generate a stack of the rate maps.
--do-avg --do-rate --do-pc1 --do-spc --do-stack
Best, Martin
On 06/04/2014 01:19 PM, Tudor Popescu wrote:
Thanks so much!suitable for my particular case? I will also look at surface area and lGI, so I suspect it's at least "--meas area" and "--meas lGI" that I need to add to the above command?5) Is the default long_mris_slopes command (which I understand does preliminary analyses, before going to QDEC) mentioned in the tutorial, i.e.4) Is this mixed design (3 groups and 2 time points, with both effect of group and of time being relevant) suitably analysed with only a simple 2 stage model, or is a linear mixed effects model necessary? Also, how are the stats different given there are 3 groups and not the usual 2 than most FS tutorials are based on?3) The tutorial covers the creation of long.qdec.table.dat for a single-group scenario; I have 3 groups, with scans on the first and final (fifth) day of training, and was wondering whether the following table looks correctHi Martin,I reran everything from scratch and this time the recons ended without error. Few more questions:
1) Is the brainmask.mgz vs wm.mgz problem that I described in my previous email (surfaces only starting to show rather late at the posterior end of some subjects) something that I need to correct (e.g., by editing wm.mgz), or is it fine as it is?2) Given that I visually inspected all bases, Is it necessary to inspect all slices for the longitudinal overlaps (vols+surfs) of all subjects, or is it enough to just check the central coronal slice for each subject? I ask because it's not just opening freeview with all those layers that is very slow, but also navigating between slices
fsid fsid-base group day ageDemeaned
gender score subj1_day1 subj1 treatmentA 1 1.34 f 109 subj1_day5 subj1 treatmentA 5 1.34 f 109 subj2_day1 subj2 treatmentB 1 -5.85 m 102 subj2_day5 subj2 treatmentB 5 -5.85 m 102 subj3_day1 subj2 control 1 3.06 f 98 subj3_day5 subj2 control 5 3.06 f 98
long_mris_slopes --qdec ./qdec/long.qdec.table.dat --meas thickness --hemi lh --do-avg --do-rate --do-pc1 --do-spc --do-stack --do-label --time years --qcache fsaverage --sd $SUBJECTS_DIR
Tudor
On 3 June 2014 02:02, Martin Reuter <mreuter@nmr.mgh.harvard.edu> wrote:
HI Tudor,
you can run the -long processes in parallel. Something else is wrong. Check if you have enough disk space. Re-run the long from scratch (to make sure everything is generated new).
Best, Martin
On Jun 2, 2014, at 5:34 PM, Tudor Popescu <tudor3@gmail.com> wrote:
<02-06-2014, 22.17.45.png><02-06-2014, 22.17.55.png><only LH posterior.png><norm.png>_______________________________________________Something that I think is more likely to be a real problem (i.e., more than just a viewing plane disorientation), is that for many subjects, posterior slices only start to be followed by the surfaces quite late, e.g. from coronal slice 80 onward. This seems to be because those slices only appear in the brainmask.mgz, but not also in the wm.mgz (see screenshots attached).Hi BruceI suspected this might be the case, since assessing 3D surfaces from a succession of 2D slices can be tricky, which is why I was wondering whether there's a better way to do these visual inspections. I checked those apparent artefacts in the other 2 planes (axial, saggital), but did not find it helpful in deciding whether the surfs was as they should or not.
Also, after having run the cross and base steps, and ended up with folders of the type subj1_scanA, subj1_scanB etc, for the "long" step I launched simultaneously (for all subjects&scans) commands of the type
recon-all -long subj1_scanA subj1 -all
recon-all -long subj1_scanB subj1 -all
however these resulted in two types of error messages:
mghRead(/vols/Scratch/tpopescu/learning/FS/subj1_scanA.long.subj1/mri/aseg.mgz, -1): read error
(those particular aseg.mgz files had size 0kB), and
(standard_in) 2: Error: comparison in expression
I initially had disk space issues, but after making space I relaunched the same commands with the -no-isrunning flag, but with the same results. Is it the case that the long commands for the different scans of a subject have to be launched sequentially rather than in parallel, i.e. the command for scanB should be run after the command for scanA has finished? Otherwise, what could the problem be?
Thanks again for your help.
Tudor
On 1 June 2014 15:17, Bruce Fischl <fischl@nmr.mgh.harvard.edu> wrote:
Hi Tudor
are you assessing the thickness visually? If so, you are probably being misled by the orientation of the surface w.r.t. the viewing plane. Same fo the apparent bubbles. You need to look in a different orientation
cheers
Bruce
On Sun, 1 Jun 2014, Tudor Popescu wrote:
Many thanks Martin and Nick! The rendering option was already checked, but
the freeview inspection commands were still very very slow, so I used
commands of the following form, which as far as I understand should be
equivalent:
tkmedit subjID norm.mgz -surfs
For several subjects (maybe 20 out of the total of 72), I noticed that the
surfaces don\t seem to quite follow the GM/WM demarcation line as expected -
for instance, by having portions of white surface (yellow line, see attached
screenshots) surrounded by pial surface (red line), or by having very large
cortical thickness in some parts of the brain. Is it possible that these
apparent artefacts make sense "in context" (by looking at the adjacent
slides), or is it the case that I need to go back and do white surface
correction, and then redo all 3 steps of the longitudinal process?
Thanks again for your help!
Tudor
On 29 May 2014 17:39, Nick Schmansky <nicks@nmr.mgh.harvard.edu> wrote:
Tudor,
in your virtual machine, make sure the 3D rendering option, or
'use
hardware rendering' (or something like that) is enabled. this
would be on
the Windows VM config side of things. otherwise it will do
software
rendering which is painfully slow.
Nick
> Hi Tudor,
>
> I don't think there is a way to speed things up.
> Let me know if you find a case where the template is blurry or
has
> ghosts. It should not happen, but if it does it indicates a
bad
> registratration, you'd have to run the mri_robust_template
command with
> different parameters manually then.
>
> Best, Martin
>
> On 05/27/2014 06:13 PM, Tudor Popescu wrote:
>>
>> Hi Martin,
>> Wasn't sure whether you'd seen my reply below, look forward
to hear
>> back your thoughts, thanks!
>> Tudor
>>
>> On 25 May 2014 21:40, "Tudor Popescu" <tudor3@gmail.com
>> <mailto:tudor3@gmail.com>> wrote:
>>
>> Thanks very much Martin and Bruce. I guess I'd misread the Wiki
>> (my own fault, not the text's), and am glad to hear that the
>> longitudinal pipeline is in fact perfectly suitable for my
needs
>> here.
>>
>> Having run the first 2 steps (cross and base), I'm a bit
unclear
>> how the output so far has to be manually inspected. It says in
the
>> tutorial
>> <http://freesurfer.net/fswiki/FsTutorial/LongitudinalTutorial>
>> that you should load each subject's base volume + surfs in
>> freeview and then "move back and forth a few slices". However,
>> even just loading each base in this manner takes ~1 min on my
PC
>> (CoreDuo, 4GB, Ubuntu Virtualbox in Windows 7), and then moving
>> with PgUp/PgDn between all coronal slices (starting from the
>> default slice=128, going all the way posterior and then all the
>> way anterior) is excruciatingly slow. All of this would have to
be
>> repeated for all my 72 subjects - is there any way to optimise
>> this manual inspection?
>>
>> Also, if the surfs turn out to not follow the volume correctly,
>> presumably the thing to do is white surface correction +
>> re-running recon. But what should one do if, due to an
erroneous
>> averaging between timepoints, you see blurs/ghosts in your base
>> template?
>>
>> Many thanks!
>> Tudor
>>
>>
>> On 9 May 2014 21:33, Martin Reuter <mreuter@nmr.mgh.harvard.edu
>> <mailto:mreuter@nmr.mgh.harvard.edu>> wrote:
>>
>> Hi Tudor,
>>
>> the longitudinal pipeline in FS is actually one of the best
on
>> the planet as far as I know :-). If there is any
contradictory
>> information on the wiki, can you point me to that so I can
see
>> what causes the misconception. Really: compared to
independent
>> processing, it significantly increases sensitivity. Also we
>> have designed it to be unbiased with respect to a single
time
>> point or directionality. It is quite mature by now.
>>
>> You should definitely use the longitudinal pipeline for the
>> analysis of your data. Now to your questions
>>
>> 1. QDEC: I am not too familiar with qdec. You can
definitely
>> try the 2-stage approach described on the wiki. There you
>> first compute a measure of change (e.g. hippocampal volume
>> change during your week) and then compare that measure
across
>> groups similar to a cross sectional volume/thickness
analysis.
>> You can also use our tools to run a linear mixed effects
model
>> if you want to do that (it is more involved and requires
you
>> to use matlab tools). In your case, you probably have 2
time
>> points for all subjects and the time distance is probably
the
>> same for all subjects, so the 2-stage approach should be
fine.
>>
>> 2. The image processing is done via the longitudinal
pipeline
>> (three steps: cross, base, long), to prepare the data look
at
>> the description of the 2-stage model
>> http://freesurfer.net/fswiki/LongitudinalTwoStageModel
>> and also the longitudinal tutorial
>>
http://freesurfer.net/fswiki/FsTutorial/LongitudinalTutorial
>>
>> 3. At the recon all level in FS you get (after the 3 steps)
>> measurement for all time points. So you would compare those
>> results across time in the stats.
>>
>> Hope that helps, Martin
>>
>>
>> On 05/08/2014 08:14 AM, Tudor Popescu wrote:
>>> Sorry for the repeat, wasn't sure whether this was
received
>>> the first time.
>>> Tudor
>>>
>>>
>>> On 6 May 2014 19:55, Tudor Popescu <tudor3@gmail.com
>>> <mailto:tudor3@gmail.com>> wrote:
>>>
>>> Dear FS list,
>>>
>>> I have structural data from a learning study
>>> (pre&post-training scans, with 3 groups). Although the
>>> training was only one week, I'm guessing from an
analysis
>>> point of view, this still qualifies as longitudinal. I
>>> want to check for
>>>
>>> * the main within-subjects effect of time point
>>> (pre&post)
>>> * the main between-subjects effect of group
(treatment
>>> A, treatment B, control),
>>> * the time x group interaction
>>>
>>> I intend to look at thickness, surface area, volume,
and
>>> lGI.
>>>
>>> I read on the wiki
>>>
<http://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalProcessing>
>>> that FS is currently not optimal for longitudinal
>>> analyses. I intend my FreeSurfer analysis to
supplement a
>>> VBM analysis done in FSL. In case it is in fact a good
>>> idea to do this, my questions (not covered in the
>>> 'longitudinal' wiki page) are:
>>>
>>> 1) Can QDEC be used for such an analysis, and if so,
what
>>> would be different as compared to a cross-sectional
(no
>>> temporal/within factor) study?
>>>
>>> 2) Also, is the pre-processing stage any different?
>>>
>>> 3) In FSL, for longitudinal designs you do stats on
>>> images obtained as the difference between consecutive
>>> time points. Does this have to be done in FreeSurfer
as
>>> well, and if so, is it done at the recon-all level or
>>> only at the stats (QDEC) level?
>>>
>>> Thanks!
>>>
>>> Tudor
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu
>>> <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>> --
>> Martin Reuter, Ph.D.
>>
>> Instructor in Neurology
>> Harvard Medical School
>> Assistant in Neuroscience
>> Dept. of Radiology, Massachusetts General Hospital
>> Dept. of Neurology, Massachusetts General Hospital
>> Research Affiliate
>> Computer Science and Artificial Intelligence Lab,
>> Dept. of Electrical Engineering and Computer Science,
>> Massachusetts Institute of Technology
>>
>> A.A.Martinos Center for Biomedical Imaging
>> 149 Thirteenth Street, Suite 2301
>> Charlestown, MA 02129
>>
>> Phone:+1-617-724-5652 <tel:%2B1-617-724-5652>
>> Email:
>> mreuter@nmr.mgh.harvard.edu
>> <mailto:mreuter@nmr.mgh.harvard.edu>
>> reuter@mit.edu <mailto:reuter@mit.edu>
>> Web :http://reuter.mit.edu
>>
>>
>> _______________________________________________
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>> 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.
>>
>>
>>
>>
>> _______________________________________________
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
> --
> Martin Reuter, Ph.D.
>
> Instructor in Neurology
> Harvard Medical School
> Assistant in Neuroscience
> Dept. of Radiology, Massachusetts General Hospital
> Dept. of Neurology, Massachusetts General Hospital
> Research Affiliate
> Computer Science and Artificial Intelligence Lab,
> Dept. of Electrical Engineering and Computer Science,
> Massachusetts Institute of Technology
>
> A.A.Martinos Center for Biomedical Imaging
> 149 Thirteenth Street, Suite 2301
> Charlestown, MA 02129
>
> Phone: +1-617-724-5652
> Email:
> mreuter@nmr.mgh.harvard.edu
> reuter@mit.edu
> Web : http://reuter.mit.edu
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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.
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
---------------------------------Dr. Martin ReuterAssistant in Neuroscience - Massachusetts General Hospital
Instructor in Neurology - Harvard Medical School
MGH / HMS / MIT
A.A.Martinos Center for Biomedical Imaging
149 Thirteenth Street, Suite 2301
Charlestown, MA 02129
Phone: +1-617-724-5652
Email:
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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.
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Martin Reuter, Ph.D. Instructor in Neurology Harvard Medical School Assistant in Neuroscience Dept. of Radiology, Massachusetts General Hospital Dept. of Neurology, Massachusetts General Hospital Research Affiliate Computer Science and Artificial Intelligence Lab, Dept. of Electrical Engineering and Computer Science, Massachusetts Institute of Technology A.A.Martinos Center for Biomedical Imaging 149 Thirteenth Street, Suite 2301 Charlestown, MA 02129 Phone: +1-617-724-5652 Email: mreuter@nmr.mgh.harvard.edu reuter@mit.edu Web : http://reuter.mit.edu
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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.