[Freesurfer] mri_surf2surf (and mri_preproc) clarification

2020-11-23 Thread Daniel Leopold
External Email - Use Caution

Dear Freesurfer experts,

The mri_surf2surf example 1 specifies that lh thickness is resampled onto
the 7th order icosahedron. Does it place the lh.thickness curv into
freesurfer space, or is it still in the subject's native space (i.e.,
pre-transformation to the fsaverage template)?

I used a similar process to downsample subjects' thickness to fs5
resolution, which I then concatenated and used as input for PALM. What I'm
now wondering is whether results may be due to misalignment between
individual subjects because they were not transformed to the fsaverage
template and space. Do the inputs below (-srcsurfval) need to be
thickness.fsaverage.mgh (already mris_preproc'd in the recon-all pipeline)
instead?

mri_surf2surf --hemi lh --srcsubject 1001 --srcsurfval thickness --src_type
curv --cortex --trgsubject ico --trgicoorder 5 --trgsurfval
./mgh/1001_lh_fs5_thick.mgh --trg_type mgh –fwhm-trg 10

**Note: My apologies if this re-posts, but it doesn't seem like my initial
submission went through**


With gratitude,
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Accessing posted files

2020-10-30 Thread Daniel Leopold
External Email - Use Caution

Dear FS experts,

Can you please direct me as to how I can access/download a file suggested
in the listserv? I've tried ftp (e.g.,
https://surfer.nmr.mgh.harvard.edu/fswiki/FtpFileExchange), scp, ssh,
Googling, clicking on the hyperlink, etc. using combinations of anonymous,
my listserv login/password, and my email address, and have been unable to
access the needed file. The desired file is the following:
https://gate.nmr.mgh.harvard.edu/safelinks/greve/freesurfer_read_surf.m

Any help would be greatly appreciated.


Many thanks,
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Extracting stats from palm results (.mgz)

2019-02-19 Thread Daniel Leopold
External Email - Use Caution

Thank you, Doug. I'm aware of fspalm, but stayed with palm in order to take
advantage of NPC and exchangeability blocks because I've got twins and
singletons in the sample. Does --pargs allow for all palm functionality,
including things like TFCE, eb's, and npc? Per another thread, I looked
through the fspalm code and my next approach is to try mri_surfcluster or
mri_volcluster with the .mgz palm results I've already got.


Thanks,
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Extracting stats from palm results (.mgz)

2019-02-16 Thread Daniel Leopold
External Email - Use Caution

Hi all,

Do you have any suggestions on how I could extract stats (e.g., thickness,
area, LGI, etc.) from a cluster(s) identified via palm? I've tried
mri_label2label in order to turn the palm output .mgz into a paint .label
file, but mri_label2label cannot seem to read the .mgz, .mgz.nii (i.e.,
.mgz mri_converted to .nii), or .mgz.nii.gz files. My inputs to palm are 4D
.mgh files, hence the .mgz results, which are in a data-per-vertex format.
Here are the errors I get when trying convert/input .mgz and .mgz.nii files:

G??M{?Kӭ7?xK/i?Mb4Ե??(???.!?t:6>|???ѧ???+F??c\Ϟ??U}??m?/8q?~ي???\???C??n?h+???~?}?w*jo???ʵS_??_??w?>ԏ??N?no+?8w
mri_label2label: could not scan # of lines from label file
ERROR reading
wordadhd_lgi_cft3.1/wordadhd_lgi_cft3.1_lh_tfce_tstat_cfwep_c4.mgz

/___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Advice re: cluster thresholding, smoothing, and best practices?

2019-02-04 Thread Daniel Leopold
External Email - Use Caution

Hi all,

I'm hoping to get some input on clustering, multiple correction, smoothing
preferences, and (if available) best practices. Please correct me if I'm
wrong, but it seems that the amount of attention given to multiple
correction and spatial dependencies in fMRI hasn't yet translated to
MRI/SBM. Doug & Bruce's recent paper (#1) beautifully highlights the value
of permutation-based analyses for control of FPR (despite some of its
complexities), but I'm wondering what (if any) consensus or reasoning
exists as to the optimal spatial smoothing and correction methods that can
be applied during permutations-based analysis of surface inputs (i.e.,
surface area, thickness, NPC of the two for volume, LGI, etc.).

1) The FSL page on randomise (
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/UserGuide) suggests that
cluster-based thresholding based upon the null distribution of the maximum
cluster size/extent is passé in comparison to using the maximum cluster
mass. PALM offers both extent and mass options, but does this same
sentiment for functional data apply to SBM?

2) My understanding is that LGI is already smoothed at ~ FWHM=15 during
default processing of pial_lgi. If one were to look at area, thickness, and
LGI, is there value to all variables being at the same level of smoothing
(e.g., area @ 20mm, thickness @ 20mm, LGI @ 5mm)?

3) Whereas earlier papers (e.g., #2) advocated for p < .005 and cluster
size > 10 voxels for functional analyses, for example, a number of folks
have more recently suggested a high initial CFT (e.g., CFT=.001) and FWE =
.05 (#s 3 & 4). Do any similar simulation results or suggestions exist for
SBM rather than fMRI?

4) Does anyone know of guidance on FWE (or FDR or voxel/vertex-wise for
that matter) thresholds for TFCE-corrected results?

5) Does anyone know of similar papers about FPRs in surface-based analyses
that *also* consider false negative rates as well?

6) Have any journals made similar declarations about SBM/morphometry
results like NeuroImage: Clinical did for functional data (#5)?

Although I'm neither the first nor the last person to ask these questions,
I wanted to gather my thoughts and hopefully tap into the collective wisdom
of this listserv community. My apologies if this email is seen as
incendiary or faux pas, but I'm new to this world and would love any and
all suggestions.


Thanks in advance for sharing any thoughts and helping rectify my naiveté!
Dan


1: Greve, D. N., & Fischl, B. (2018). False positive rates in surface-based
anatomical analysis. *NeuroImage*, *171*, 6-14.
2: Lieberman, M. D., & Cunningham, W. A. (2009). Type I and Type II error
concerns in fMRI research: re-balancing the scale. *Social Cognitive
and Affective Neuroscience, 4*(4), 423-428.
3: Eklund, A., Nichols, T. E., & Knutsson, H. (2016). Cluster failure: why
fMRI inferences for spatial extent have inflated false-positive rates.
PNAS, 113(28), 7900-7905. https://doi.org/10.1073/pnas.1602413113
4: Woo CW, Krishnan A, Wager TD (2014) Cluster-extent based thresholding in
fMRI analyses: Pitfalls and recommendations. *NeuroImage, 91*, 412–419.
5: Roiser, J. P., Linden, D. E., Gorno-Tempinin, M. L., Moran, R. J.,
Dickerson, B. C., & Grafton, S. T. (2016). Minimum statistical standards
for submissions to Neuroimage: Clinical. *NeuroImage: Clinical*, *12*, 1045.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Smoothing before or after PALM (and results conversion for Surf Ice)

2019-01-30 Thread Daniel Leopold
External Email - Use Caution

Hi Bruce,

Chris Rorden informed me that Surfice previously assumed that MGZ/MGH files
were voxelwise images used to surface-paint a mesh. Anderson's palm,
however, uses the format as a one-to-one correspondence with the vertices
(i.e., data-per-vertex). Chris' newest/upcoming version of Surfice
automatically detects this data-per-vertex format and can load the files
appropriately.

The main feature that freeview lacks is the ability to display multiple
overlays/sets of palm results at once. My initial approach was to convert
the .mgz palm outputs into .nii so that I could use fslmaths to combine
results, but (apparently) NIFTI handles a maximum of 65,535 voxels in any
one dimension, which is why Chris thought Anderson used MGH, which allows
billions of vertices (32-bit).

So, Surfice can now load the palm .mgz outputs onto ?h.inflated, .pial, and
.curv surfaces, but I'm now wondering if mgh/mgz overlays be be loaded on
top of other background meshes (such as BrainMesh_ICBM152 or mni2fs meshes
that are provided with Surfice). I've emailed Darren Price because I'm
essentially looking for the inverse transform of his mni2fs package (i.e.,
fs2mni), but I was wondering if you or Doug have encountered this question
or similar requests to convert freesurfer to mni surfaces/meshes before?
I'm familiar with the Freesurfer Coordinate Systems info, but I don't know
how I might generalize the RAS to MNI152 point conversion to an entire
surface.


Thank you again for your suggestions and help!
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Smoothing before or after PALM (and results conversion for Surf Ice)

2019-01-23 Thread Daniel Leopold
External Email - Use Caution

Hello FS experts and enthusiasts,

Thus far, I have used mri_concat to make 4D files of subjects'
lh.thickness.fwhm15.fsaverage.mgh files to be used as input for palm. The
results maps are of the .mgz format. I can convert these to .nii using
mri_convert in order to use fslmaths or fslstats. My dilemma is that I'd
like to use another viewing package for the palm results (i.e., Surf Ice)
because of its features and some quirks I've encountered while loading
results in Freeview. Surf Ice accepts a number of formats (
https://www.nitrc.org/plugins/mwiki/index.php/surfice:MainPage#Supported_Formats),
including Freesurfer's .asc, .srf, .curv, .gcs, .pial, and .w (among
*many* others),
but I have yet to successfully convert these .mgz maps to a readable
format. Surf Ice can read .nii, but loading my mri_converted .nii files
results in a uniform surface with 0 at all vertices. Thus, I have two
questions:

1) Can you think of a means to convert these surface "volumes" (.mgh/.mgz)
to a desired format that can be read by Surf Ice? I've attempted
mri_vol2surf, mri_surf2surf, and mris_convert, but cannot find an
appropriate format/get things to work.
In case it's helpful, readable formats are:

2) My alternative idea would be to instead use mri_concat on subjects'
lh.thickness files and later apply fwhm smoothing. Would this approach be
feasible? I could test whether pre-palm smoothed and post-palm smoothed
results are equivalent, but I'm afraid that the variable dimensions of
subjects' native thickness files would cause problems either with palm or
when later trying to view the group-level results.

Version information:
Recon-all run with FreeSurfer 5.3.0
FSL 5.0.8
palm alpha112

Thank you in advance for any suggestions, and please let me know if any
additional information would be helpful.


With gratitude,
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Error saving NPC results

2018-12-23 Thread Daniel Leopold
External Email - Use Caution

Dear Freesurfer Community, Drs. Winkler, Greve, Fischl, et al.

*My apologies if this reposts, but this is my first time emailing the
listserv, and I'm not sure if my earlier email went through*

Could anyone help me understand which palm options are needed in order to
produce tfce and clustere NPC results that are fwe-corrected across
contrasts (i.e., npc_fisher_cfwep_)?

I'm analyzing area and thickness and have four one-tailed contrasts of
interest (e.g., C1+, C1-, C2+, C2-). Currently, I am only able to get the
"output'_dpv_npc_fisher_cfwep_c[1234]" results, but the palm log ends
abruptly after saving these files and does not save the _tfce_ or
_clustere_ versions:

Saving p-values for NPC between modalities (uncorrected and corrected
within contrasts).
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c1
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c1
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c1
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c1
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c1
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c2
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c2
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c2
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c2
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c2
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c3
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c3
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c3
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c3
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c3
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c4
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c4
 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c4
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c4
 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c4
Saving p-values for NPC between modalities (corrected across contrasts).
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c1
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c2
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c3
 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c4
>>

The error log contains the following text, and my efforts to read through
these source files have been in vain:
{^HCell contents reference from a non-cell array object.

 Error in palm_saveall (line 1043)
distmax(:,j) = plm.Tclumax{m}{c};

Error in palm_core (line 2489)
palm_saveall(plm,opts);

Error in palm (line 81)
palm_core(varargin{:});
}^H
^G

I have essentially permuted the various -corr(con/mod) and -npc(con/mod)
options, as well as various combinations of -T & -C {z}, -Tuni & -Cuni {z},
and -Tnpc & -Cnpc {z}, using a small number of permutations to assess the
number of output maps and whether jobs finish appropriately.

Here's an example of one of the palm commands that resulted in these output
and error logs (with line-breaks for legibility):
fsl_sub -l $logdir palm -designperinput
-i {area_dir}/292_${hemi}.area_stack.mgh
-d {design_dir}/wordadhd_npc_areatotal.mat
-t {design_dir}/wordadhd_npc_areatotal.con
-i {thickness_dir}/292_${hemi}.thickness_stack.mgh
-d {design_dir}/wordadhd_npc_thickmean.mat
-t {design_dir}/wordadhd_npc_thickmean.con
-m {base_dir}/palm/input/${hemi}mask.mgz
-s ${surf_dir}/${hemi}.white ${surf_dir}/${hemi}.white.avg.area.mgh
-o wordadhd_npc_${hemi}
-eb ${EB} -corrcon -corrmod
 -logp -ise -npc -T -C 1.64485 -n 5

If knowing versions helps at all:
PALM alpha109
MATLAB 8.3.0.532 (R2014a)
FreeSurfer 5.3.0
FSL 5.0.8

Any advice you could provide on this particular error, why my input doesn't
produce the tfce_npc_fisher_cfwep or clustere__npc_fisher_cfwep results, or
other problem-solving suggestions would be greatly appreciated!


With gratitude,
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Error while saving NPC results

2018-12-21 Thread Daniel Leopold
External Email - Use Caution

Dear Drs. Winkler, Greve, Fischl, et al.

Could you help me understand which palm options are needed in order to
produce tfce and clustere NPC results that are fwe-corrected across
contrasts (i.e., _cfwep_)?

I'm analyzing area and thickness and have four one-tailed contrasts of
interest (e.g., C1+, C1-, C2+, C2-). Currently, I am only able to get the
"output'_dpv_npc_fisher_cfwep_c[1234]" results, but the palm log ends
abruptly after saving these files and does not save the _tfce_ or
_clustere_ versions:

Saving p-values for NPC between modalities (uncorrected and corrected
within contrasts).

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c1

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c1

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c1

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c1

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c1

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c2

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c2

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c2

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c2

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c2

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c3

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c3

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c3

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c3

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c3

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_fwep_c4

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_c4

 Saving file: wordadhd_npc_lh_clustere_npc_fisher_fwep_c4

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_c4

 Saving file: wordadhd_npc_lh_tfce_npc_fisher_fwep_c4

Saving p-values for NPC between modalities (corrected across contrasts).

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c1

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c2

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c3

 Saving file: wordadhd_npc_lh_dpv_npc_fisher_cfwep_c4

>>


The error log contains the following text, and my efforts to read through
these source files have been in vain:
{^HCell contents reference from a non-cell array object.

 Error in palm_saveall (line 1043)
distmax(:,j) = plm.Tclumax{m}{c};

Error in palm_core (line 2489)
palm_saveall(plm,opts);

Error in palm (line 81)
palm_core(varargin{:});
}^H
^G

I have essentially permuted the various -corr(con/mod) and -npc(con/mod)
options, as well as various combinations of -T & -C {z}, -Tuni & -Cuni {z},
and -Tnpc & -Cnpc {z}, using a small number of permutations to assess the
number of output maps and whether jobs finish appropriately.

Here's an example of one of the palm commands that resulted in these output
and error logs (with line-breaks for legibility):

fsl_sub -l $logdir palm -designperinput

-i {area_dir}/292_${hemi}.area_stack.mgh

-d {design_dir}/wordadhd_npc_areatotal.mat

-t {design_dir}/wordadhd_npc_areatotal.con

-i {thickness_dir}/292_${hemi}.thickness_stack.mgh

-d {design_dir}/wordadhd_npc_thickmean.mat

-t {design_dir}/wordadhd_npc_thickmean.con

-m {base_dir}/palm/input/${hemi}mask.mgz

-s ${surf_dir}/${hemi}.white ${surf_dir}/${hemi}.white.avg.area.mgh

-o wordadhd_npc_${hemi}

-eb ${EB} -corrcon -corrmod

 -logp -ise -npc -T -C 1.64485 -n 5

If knowing versions helps at all:
PALM alpha109
MATLAB 8.3.0.532 (R2014a)
FreeSurfer 5.3.0
FSL 5.0.8

Any advice you could provide on this particular error, why my input doesn't
produce the tfce_cfwep or clustere_cfwep results, or other problem-solving
suggestions would be greatly appreciated!


With gratitude,
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer