Re: [HCP-Users] Question about Multi-Modal Surface Mapping

2018-09-28 Thread Sang-Young Kim
Thanks for prompt response! Tim!

Yes, the volume files are individual results. And this data is not part of HCP 
S1200 released data, but for the our data. 
That’s why "SubjID=300" seems to be unclear to you. 

I have one more quick question. If I want to have MSMAll-registered data for 
"$StudyFolder/$Subject/MNINonLinear/Results/rfMRI_REST1_AP/rfMRI_REST1_AP_Atlas.dtseries.nii"
 (which is not FIX-cleaned data), 

do I have to run MSMAll pipeline with changing input variable name? or is there 
a simple command for getting that as volume-to-surface-mapping?

Thanks again. 

Sang-Young  

> On Sep 28, 2018, at 7:42 PM, Timothy Coalson  wrote:
> 
> If the volume files are per-individual results, then mapping them to that 
> individual's own MSMAll surfaces will result in them being accurately 
> registered through multimodal surface matching, yes.  I am not clear on the 
> "SubjID=300" line, though.
> 
> To be clear, group average "subjects" do not count for this process, and any 
> group MNI space volume results for all of cortex can't be accurately mapped 
> to surfaces (the accuracy has already been lost due to volume-based group 
> averaging).
> 
> However, the typical HCP process is to put the unprocessed (well, 
> preprocessed) individual cortical data onto surfaces via the individual's own 
> surfaces, and then compute results in cifti space, not MNI.  We typically use 
> the native mesh surfaces to achieve the most fidelity to the original 
> segmentation, and then resample afterward, but the 32k surfaces are probably 
> good enough.
> 
> Tim
> 
> 
> On Fri, Sep 28, 2018 at 6:04 PM, Sang-Young Kim  > wrote:
> Dear Experts:
> 
> I have a certain kinds of volume maps in MNI space. I would like to mapping 
> this map to surface. 
> I know how to use wb_command -volume-to-surface-mapping. 
> My question is that if I use following command, is this also multi-modal 
> surface matched map?
> 
> StudyFolder="/Volumes/easystore/projects/HCP"
> SubjID="300"
> AtlasFolder="$StudyFolder/$SubjID/MNINonLinear/fsaverage_LR32k"
> ResultFolder="$StudyFolder/$SubjID/MNINonLinear/Results/rfMRI_REST1_AP"
> MapName="rfMRI_REST1_AP_map_tstat.nii.gz"
> 
> # Left hemi
> /Applications/workbench/bin_macosx64/wb_command -volume-to-surface-mapping \
> $ResultFolder/$MapName \
> $AtlasFolder/${SubjID}.L.midthickness_MSMAll.32k_fs_LR.surf.gii \
> $ResultFolder/L.card_coupling_tstat.32k_fs_LR.func.gii \
> -ribbon-constrained $AtlasFolder/${SubjID}.L.white_MSMAll.32k_fs_LR.surf.gii \
> $AtlasFolder/${SubjID}.L.pial_MSMAll.32k_fs_LR.surf.gii \
> 
> 
> If not, could anyone please let me know how to do that?
> 
> Thanks in advance. 
> 
> Best, 
> 
> Sang-Young 
> ___
> HCP-Users mailing list
> HCP-Users@humanconnectome.org 
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users 
> 
> 


___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] Question about Multi-Modal Surface Mapping

2018-09-28 Thread Timothy Coalson
If the volume files are per-individual results, then mapping them to that
individual's own MSMAll surfaces will result in them being accurately
registered through multimodal surface matching, yes.  I am not clear on the
"SubjID=300" line, though.

To be clear, group average "subjects" do not count for this process, and
any group MNI space volume results for all of cortex can't be accurately
mapped to surfaces (the accuracy has already been lost due to volume-based
group averaging).

However, the typical HCP process is to put the unprocessed (well,
preprocessed) individual cortical data onto surfaces via the individual's
own surfaces, and then compute results in cifti space, not MNI.  We
typically use the native mesh surfaces to achieve the most fidelity to the
original segmentation, and then resample afterward, but the 32k surfaces
are probably good enough.

Tim


On Fri, Sep 28, 2018 at 6:04 PM, Sang-Young Kim  wrote:

> Dear Experts:
>
> I have a certain kinds of volume maps in MNI space. I would like to
> mapping this map to surface.
> I know how to use wb_command -volume-to-surface-mapping.
> My question is that if I use following command, is this also multi-modal
> surface matched map?
>
> StudyFolder="/Volumes/easystore/projects/HCP"
> SubjID="300"
> AtlasFolder="$StudyFolder/$SubjID/MNINonLinear/fsaverage_LR32k"
> ResultFolder="$StudyFolder/$SubjID/MNINonLinear/Results/rfMRI_REST1_AP"
> MapName="rfMRI_REST1_AP_map_tstat.nii.gz"
>
> # Left hemi
> /Applications/workbench/bin_macosx64/wb_command
> -volume-to-surface-mapping \
> $ResultFolder/$MapName \
> $AtlasFolder/${SubjID}.L.midthickness_MSMAll.32k_fs_LR.surf.gii \
> $ResultFolder/L.card_coupling_tstat.32k_fs_LR.func.gii \
> -ribbon-constrained $AtlasFolder/${SubjID}.L.white_MSMAll.32k_fs_LR.surf.gii
> \
> $AtlasFolder/${SubjID}.L.pial_MSMAll.32k_fs_LR.surf.gii \
>
>
> If not, could anyone please let me know how to do that?
>
> Thanks in advance.
>
> Best,
>
> Sang-Young
> ___
> HCP-Users mailing list
> HCP-Users@humanconnectome.org
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] Question about Multi-Modal Surface Mapping

2018-09-28 Thread Sang-Young Kim
Dear Experts:

I have a certain kinds of volume maps in MNI space. I would like to mapping 
this map to surface. 
I know how to use wb_command -volume-to-surface-mapping. 
My question is that if I use following command, is this also multi-modal 
surface matched map?

StudyFolder="/Volumes/easystore/projects/HCP"
SubjID="300"
AtlasFolder="$StudyFolder/$SubjID/MNINonLinear/fsaverage_LR32k"
ResultFolder="$StudyFolder/$SubjID/MNINonLinear/Results/rfMRI_REST1_AP"
MapName="rfMRI_REST1_AP_map_tstat.nii.gz"

# Left hemi
/Applications/workbench/bin_macosx64/wb_command -volume-to-surface-mapping \
$ResultFolder/$MapName \
$AtlasFolder/${SubjID}.L.midthickness_MSMAll.32k_fs_LR.surf.gii \
$ResultFolder/L.card_coupling_tstat.32k_fs_LR.func.gii \
-ribbon-constrained $AtlasFolder/${SubjID}.L.white_MSMAll.32k_fs_LR.surf.gii \
$AtlasFolder/${SubjID}.L.pial_MSMAll.32k_fs_LR.surf.gii \


If not, could anyone please let me know how to do that?

Thanks in advance. 

Best, 

Sang-Young 
___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] PostFreeSurfer debugging

2018-09-28 Thread Jayasekera, Dinal
Tim,


That was actually the only file that was generated. I also see all the expected 
files which is great.


From: Timothy Coalson 
Sent: Friday, September 28, 2018 4:34:06 PM
To: Jayasekera, Dinal
Cc: hcp-users@humanconnectome.org
Subject: Re: [HCP-Users] PostFreeSurfer debugging

That is fairly close to a rotation, you are probably fine:

octave:1> testaff=[0.7667402625 -0.5285026431 -0.3340375125 -0.1109555215; 
0.4481533766  0.8319512010  -0.3437587619  -3.7439153194; 0.4568423331  
0.1273678243  0.8731399179 -2.1462702751; 0 0 0 1];
octave:2> det(testaff(1:3, 1:3))
ans =  0.98823
octave:5> testaff(1:3, 1)' * testaff(1:3, 2)
ans =  0.025804
octave:6> testaff(1:3, 1)' * testaff(1:3, 3)
ans = -0.011289
octave:7> testaff(1:3, 2)' * testaff(1:3, 3)
ans =  0.0017591

This may in fact be a normal warning to get, based on the current suboptimal 
way of approximating a rotation.

Did you get an error after that, or are there expected files that weren't 
generated?  It sounds like it may have run successfully.

Tim


On Fri, Sep 28, 2018 at 3:59 PM, Jayasekera, Dinal 
mailto:dinal.jayasek...@wustl.edu>> wrote:

Tim,


Thanks for the quick reply. I'm not quite sure I understand what your 
recommended course of action. I've attached the affine for one of the patients 
I ran the pipeline on. Based on the .mat file I've attached, what would you 
recommend to be my next best course of action?


From: Timothy Coalson mailto:tsc...@mst.edu>>
Sent: Friday, September 28, 2018 1:57:25 PM
To: Jayasekera, Dinal
Cc: hcp-users@humanconnectome.org
Subject: Re: [HCP-Users] PostFreeSurfer debugging

It looks like the step that uses it in the PostFreeSurfer pipeline is 
generating a spherical rotation that gets close to the freesurfer registration 
- this is done by regressing an affine from the coordinates, applying it, and 
then "fixing" the coordinates to make them spherical again - this process could 
be improved by decomposing the affine and extracting an actual rotation, rather 
than applying the whole affine and then trying to fix it afterwards.  It is 
plausible that this affine could have large enough non-rotation components to 
trip this warning without anything actually being wrong.

You could check the affine at 
"$AtlasSpaceFolder"/"$NativeFolder"/MSMSulc/${Hemisphere}.mat to make sure it 
is mostly a rotation.  Unfortunately the pipelines overwrite the non-spherical 
result of applying the affine, so you can't just look at it to make sure it was 
still mostly spherical.

Tim


On Fri, Sep 28, 2018 at 1:49 PM, Timothy Coalson 
mailto:tsc...@mst.edu>> wrote:
That warning message does not prevent the command from generating its output.  
It is generated by wb_command -surface-modify-sphere.  I am not sure why it 
would be tripped during PostFreeSurfer, though, as the main thing that might 
trip it is dedrifting (which should be done only when making a new atlas, not 
just running subjects through a pipeline).  So, the fact that it came up might 
indicate that something prior to it has gone wrong.

Tim


On Fri, Sep 28, 2018 at 12:32 PM, Jayasekera, Dinal 
mailto:dinal.jayasek...@wustl.edu>> wrote:

Dear all,


I've completely run the PreFreeSurfer and FreeSurfer batch scripts on our 
patietn data and am currently running the PostFreeSurfer script. However, when 
running the script on the patients I got the following message:


WARNING: input sphere is either unusually irregular or not centered, inspect 
the input


This warning message prevented the PostFreeSurfer script from running to 
completion. It seems this warning message is generated by one of the algorithms 
in the workbench folder. Does anyone have any insight into this?


Kind regards,
Dinal Jayasekera
PhD Candidate | Department of Biomedical Engineering
Ammar Hawasli Lab
Washington University in St. Louis

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users




___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] PostFreeSurfer debugging

2018-09-28 Thread Timothy Coalson
That is fairly close to a rotation, you are probably fine:

octave:1> testaff=[0.7667402625 -0.5285026431 -0.3340375125 -0.1109555215;
0.4481533766  0.8319512010  -0.3437587619  -3.7439153194; 0.4568423331
0.1273678243  0.8731399179 -2.1462702751; 0 0 0 1];
octave:2> det(testaff(1:3, 1:3))
ans =  0.98823
octave:5> testaff(1:3, 1)' * testaff(1:3, 2)
ans =  0.025804
octave:6> testaff(1:3, 1)' * testaff(1:3, 3)
ans = -0.011289
octave:7> testaff(1:3, 2)' * testaff(1:3, 3)
ans =  0.0017591

This may in fact be a normal warning to get, based on the current
suboptimal way of approximating a rotation.

Did you get an error after that, or are there expected files that weren't
generated?  It sounds like it may have run successfully.

Tim


On Fri, Sep 28, 2018 at 3:59 PM, Jayasekera, Dinal <
dinal.jayasek...@wustl.edu> wrote:

> Tim,
>
>
> Thanks for the quick reply. I'm not quite sure I understand what your
> recommended course of action. I've attached the affine for one of the
> patients I ran the pipeline on. Based on the .mat file I've attached, what
> would you recommend to be my next best course of action?
> --
> *From:* Timothy Coalson 
> *Sent:* Friday, September 28, 2018 1:57:25 PM
> *To:* Jayasekera, Dinal
> *Cc:* hcp-users@humanconnectome.org
> *Subject:* Re: [HCP-Users] PostFreeSurfer debugging
>
> It looks like the step that uses it in the PostFreeSurfer pipeline is
> generating a spherical rotation that gets close to the freesurfer
> registration - this is done by regressing an affine from the coordinates,
> applying it, and then "fixing" the coordinates to make them spherical again
> - this process could be improved by decomposing the affine and extracting
> an actual rotation, rather than applying the whole affine and then trying
> to fix it afterwards.  It is plausible that this affine could have large
> enough non-rotation components to trip this warning without anything
> actually being wrong.
>
> You could check the affine at "$AtlasSpaceFolder"/"$
> NativeFolder"/MSMSulc/${Hemisphere}.mat to make sure it is mostly a
> rotation.  Unfortunately the pipelines overwrite the non-spherical result
> of applying the affine, so you can't just look at it to make sure it was
> still mostly spherical.
>
> Tim
>
>
> On Fri, Sep 28, 2018 at 1:49 PM, Timothy Coalson  wrote:
>
> That warning message does not prevent the command from generating its
> output.  It is generated by wb_command -surface-modify-sphere.  I am not
> sure why it would be tripped during PostFreeSurfer, though, as the main
> thing that might trip it is dedrifting (which should be done only when
> making a new atlas, not just running subjects through a pipeline).  So, the
> fact that it came up might indicate that something prior to it has gone
> wrong.
>
> Tim
>
>
> On Fri, Sep 28, 2018 at 12:32 PM, Jayasekera, Dinal <
> dinal.jayasek...@wustl.edu> wrote:
>
> Dear all,
>
>
> I've completely run the PreFreeSurfer and FreeSurfer batch scripts on our
> patietn data and am currently running the PostFreeSurfer script. However,
> when running the script on the patients I got the following message:
>
>
> WARNING: input sphere is either unusually irregular or not centered,
> inspect the input
>
> This warning message prevented the PostFreeSurfer script from running to
> completion. It seems this warning message is generated by one of the
> algorithms in the workbench folder. Does anyone have any insight into this?
>
> Kind regards,
> Dinal Jayasekera
> PhD Candidate | Department of Biomedical Engineering
> Ammar Hawasli Lab
> Washington University in St. Louis
>
> ___
> HCP-Users mailing list
> HCP-Users@humanconnectome.org
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>
>
>
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] PostFreeSurfer debugging

2018-09-28 Thread Jayasekera, Dinal
Tim,


Thanks for the quick reply. I'm not quite sure I understand what your 
recommended course of action. I've attached the affine for one of the patients 
I ran the pipeline on. Based on the .mat file I've attached, what would you 
recommend to be my next best course of action?


From: Timothy Coalson 
Sent: Friday, September 28, 2018 1:57:25 PM
To: Jayasekera, Dinal
Cc: hcp-users@humanconnectome.org
Subject: Re: [HCP-Users] PostFreeSurfer debugging

It looks like the step that uses it in the PostFreeSurfer pipeline is 
generating a spherical rotation that gets close to the freesurfer registration 
- this is done by regressing an affine from the coordinates, applying it, and 
then "fixing" the coordinates to make them spherical again - this process could 
be improved by decomposing the affine and extracting an actual rotation, rather 
than applying the whole affine and then trying to fix it afterwards.  It is 
plausible that this affine could have large enough non-rotation components to 
trip this warning without anything actually being wrong.

You could check the affine at 
"$AtlasSpaceFolder"/"$NativeFolder"/MSMSulc/${Hemisphere}.mat to make sure it 
is mostly a rotation.  Unfortunately the pipelines overwrite the non-spherical 
result of applying the affine, so you can't just look at it to make sure it was 
still mostly spherical.

Tim


On Fri, Sep 28, 2018 at 1:49 PM, Timothy Coalson 
mailto:tsc...@mst.edu>> wrote:
That warning message does not prevent the command from generating its output.  
It is generated by wb_command -surface-modify-sphere.  I am not sure why it 
would be tripped during PostFreeSurfer, though, as the main thing that might 
trip it is dedrifting (which should be done only when making a new atlas, not 
just running subjects through a pipeline).  So, the fact that it came up might 
indicate that something prior to it has gone wrong.

Tim


On Fri, Sep 28, 2018 at 12:32 PM, Jayasekera, Dinal 
mailto:dinal.jayasek...@wustl.edu>> wrote:

Dear all,


I've completely run the PreFreeSurfer and FreeSurfer batch scripts on our 
patietn data and am currently running the PostFreeSurfer script. However, when 
running the script on the patients I got the following message:


WARNING: input sphere is either unusually irregular or not centered, inspect 
the input


This warning message prevented the PostFreeSurfer script from running to 
completion. It seems this warning message is generated by one of the algorithms 
in the workbench folder. Does anyone have any insight into this?


Kind regards,
Dinal Jayasekera
PhD Candidate | Department of Biomedical Engineering
Ammar Hawasli Lab
Washington University in St. Louis

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users



___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


L.mat
Description: L.mat


Re: [HCP-Users] PostFreeSurfer debugging

2018-09-28 Thread Timothy Coalson
It looks like the step that uses it in the PostFreeSurfer pipeline is
generating a spherical rotation that gets close to the freesurfer
registration - this is done by regressing an affine from the coordinates,
applying it, and then "fixing" the coordinates to make them spherical again
- this process could be improved by decomposing the affine and extracting
an actual rotation, rather than applying the whole affine and then trying
to fix it afterwards.  It is plausible that this affine could have large
enough non-rotation components to trip this warning without anything
actually being wrong.

You could check the affine
at "$AtlasSpaceFolder"/"$NativeFolder"/MSMSulc/${Hemisphere}.mat to make
sure it is mostly a rotation.  Unfortunately the pipelines overwrite the
non-spherical result of applying the affine, so you can't just look at it
to make sure it was still mostly spherical.

Tim


On Fri, Sep 28, 2018 at 1:49 PM, Timothy Coalson  wrote:

> That warning message does not prevent the command from generating its
> output.  It is generated by wb_command -surface-modify-sphere.  I am not
> sure why it would be tripped during PostFreeSurfer, though, as the main
> thing that might trip it is dedrifting (which should be done only when
> making a new atlas, not just running subjects through a pipeline).  So, the
> fact that it came up might indicate that something prior to it has gone
> wrong.
>
> Tim
>
>
> On Fri, Sep 28, 2018 at 12:32 PM, Jayasekera, Dinal <
> dinal.jayasek...@wustl.edu> wrote:
>
>> Dear all,
>>
>>
>> I've completely run the PreFreeSurfer and FreeSurfer batch scripts on our
>> patietn data and am currently running the PostFreeSurfer script. However,
>> when running the script on the patients I got the following message:
>>
>>
>> WARNING: input sphere is either unusually irregular or not centered,
>> inspect the input
>>
>> This warning message prevented the PostFreeSurfer script from running to
>> completion. It seems this warning message is generated by one of the
>> algorithms in the workbench folder. Does anyone have any insight into this?
>>
>> Kind regards,
>> Dinal Jayasekera
>> PhD Candidate | Department of Biomedical Engineering
>> Ammar Hawasli Lab
>> Washington University in St. Louis
>>
>> ___
>> HCP-Users mailing list
>> HCP-Users@humanconnectome.org
>> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>>
>
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] PostFreeSurfer debugging

2018-09-28 Thread Timothy Coalson
That warning message does not prevent the command from generating its
output.  It is generated by wb_command -surface-modify-sphere.  I am not
sure why it would be tripped during PostFreeSurfer, though, as the main
thing that might trip it is dedrifting (which should be done only when
making a new atlas, not just running subjects through a pipeline).  So, the
fact that it came up might indicate that something prior to it has gone
wrong.

Tim


On Fri, Sep 28, 2018 at 12:32 PM, Jayasekera, Dinal <
dinal.jayasek...@wustl.edu> wrote:

> Dear all,
>
>
> I've completely run the PreFreeSurfer and FreeSurfer batch scripts on our
> patietn data and am currently running the PostFreeSurfer script. However,
> when running the script on the patients I got the following message:
>
>
> WARNING: input sphere is either unusually irregular or not centered,
> inspect the input
>
> This warning message prevented the PostFreeSurfer script from running to
> completion. It seems this warning message is generated by one of the
> algorithms in the workbench folder. Does anyone have any insight into this?
>
> Kind regards,
> Dinal Jayasekera
> PhD Candidate | Department of Biomedical Engineering
> Ammar Hawasli Lab
> Washington University in St. Louis
>
> ___
> HCP-Users mailing list
> HCP-Users@humanconnectome.org
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] PostFreeSurfer debugging

2018-09-28 Thread Jayasekera, Dinal
Dear all,


I've completely run the PreFreeSurfer and FreeSurfer batch scripts on our 
patietn data and am currently running the PostFreeSurfer script. However, when 
running the script on the patients I got the following message:


WARNING: input sphere is either unusually irregular or not centered, inspect 
the input


This warning message prevented the PostFreeSurfer script from running to 
completion. It seems this warning message is generated by one of the algorithms 
in the workbench folder. Does anyone have any insight into this?


Kind regards,
Dinal Jayasekera
PhD Candidate | Department of Biomedical Engineering
Ammar Hawasli Lab
Washington University in St. Louis

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users