Re: [HCP-Users] Regress confounds out of CIFTIs

2019-01-24 Thread Leonardo Tozzi
Dear Matt,

Looks like I really need to improve my linear algebra.
Thank you very much!

Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu | (650) 5615738


From: "Glasser, Matthew" 
Date: Thursday, January 24, 2019 at 3:05 PM
To: Leonardo Tozzi , "hcp-users@humanconnectome.org" 

Subject: Re: [HCP-Users] Regress confounds out of CIFTIs

We do this in matlab.  It is not necessary to loop, just use proper matrix 
math.  For example:

newdtseries = dtseries - (demean(regressor) * (pinv(demean(regressor)) * 
dtseries'))’;

Where demean(regressor) removes the mean of each regressor.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Leonardo Tozzi mailto:lto...@stanford.edu>>
Date: Thursday, January 24, 2019 at 2:04 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] Regress confounds out of CIFTIs

Dear Experts,

I have a text file of confound regressors that I would like to regress out of a 
resting state .dtseries.nii file and save the residuals of this procedure as a 
new .dtseries.nii file.
I was wondering if there is a computationally efficient way of doing this, 
possibly using the wb_command. Right now, the only thing I can think about is 
using matlab but it is obviously impractical to loop over the 90k greyordinates.
I have looked into the fsl_glm command, but it doesn’t take in CIFTIs, so I 
would have to then work on the NIFTI and transform it to CIFTI again, for 
example by rerunning the surface preprocessing step.
Would you have any suggestions?
Thank you,


Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu | (650) 5615738


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


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

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


Re: [HCP-Users] Regress confounds out of CIFTIs

2019-01-24 Thread Glasser, Matthew
We do this in matlab.  It is not necessary to loop, just use proper matrix 
math.  For example:

newdtseries = dtseries - (demean(regressor) * (pinv(demean(regressor)) * 
dtseries'))’;

Where demean(regressor) removes the mean of each regressor.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Leonardo Tozzi mailto:lto...@stanford.edu>>
Date: Thursday, January 24, 2019 at 2:04 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] Regress confounds out of CIFTIs

Dear Experts,

I have a text file of confound regressors that I would like to regress out of a 
resting state .dtseries.nii file and save the residuals of this procedure as a 
new .dtseries.nii file.
I was wondering if there is a computationally efficient way of doing this, 
possibly using the wb_command. Right now, the only thing I can think about is 
using matlab but it is obviously impractical to loop over the 90k greyordinates.
I have looked into the fsl_glm command, but it doesn’t take in CIFTIs, so I 
would have to then work on the NIFTI and transform it to CIFTI again, for 
example by rerunning the surface preprocessing step.
Would you have any suggestions?
Thank you,


Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu | (650) 5615738


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


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

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


Re: [HCP-Users] NaN introduced in cifti

2019-01-24 Thread Glasser, Matthew
Does your FOV cover the whole brain?

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of "Sanchez, Juan (NYSPI)" 
mailto:juan.sanc...@nyspi.columbia.edu>>
Date: Thursday, January 24, 2019 at 1:29 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] NaN introduced in cifti


Dear HCP community

We processed through a subject using the HCP v. 31rc3 pipelines.

The Volume output and anatomy look fine and we checked and did not find any 
NaN's int he processed fMRI multi band run.

However after running the GenericfMRISurfaceProcessingPipeline we noticed that 
NaN's were introduced in the dtseries (attached)


Has anyone seen this ?

Thanks

Juan Sanchez

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


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

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


Re: [HCP-Users] Question: How to transform MNINonLinear-derived dscalar surface to T1w space?

2019-01-24 Thread David Warren
Hi Tim,

 Terrific!  I hadn't appreciated how the spatial coordinates of surface
vertices were distinct from data at those vertices until now.  Many thanks
for the quick and thorough reply!  Best,

Dave

On Thu, Jan 24, 2019 at 2:10 PM Timothy Coalson  wrote:

> Surface data is different - we don't actually put surface coordinates into
> dscalar, or any other cifti files (or metric files).  In our data, the
> surface coordinates are only contained in .surf.gii files.  Getting the
> surface data into "Native" volume space is as simple as using the surfaces
> in the T1w folder, rather than the ones in MNINonLinear.  The same data
> file is used.
>
> The FAQ you found is actually about going between different surface
> meshes, not coordinate spaces.  Put simply, freesurfer uses ~40,000
> vertices in their most relevant standard mesh, while our version uses
> ~32,000 vertices, and those instructions are about how to jump that gap.
> They don't actually change the coordinates of any blob in the data or fold
> of the surface.
>
> However, the subcortical data is in voxels, not surfaces, and voxel-based
> data is tied to a specific volume space (and are MNINonLinear in our
> standard grayordinates space).  You can use wb_command -cifti-separate with
> the -volume-all option to extract all the voxel-based data, and then use
> the appropriate volume warpfield to resample it, however this will give a
> masked version, and the resampling will blur the edges of the mask somewhat
> - if this is an issue, you should probably dilate the extracted subcortical
> data before resampling it (and also resample the mask, and remask it
> afterwards).
>
> Tim
>
>
> On Thu, Jan 24, 2019 at 12:25 PM David Warren 
> wrote:
>
>> Hi all,
>>
>>   What is the procedure for transforming scalar surfaces in the
>> MNINonLinear space back to a subject’s (processed) T1w space using
>> wb_command tools?
>>
>>   Briefly, I am working with an independently-collected, HCP-like
>> dataset which has been processed with the HCP Pipelines tools.  Based on
>> processed outputs, I have a dscalar surface under MNINonLinear (in the
>> fsaverage_LR32k) space that is congruent with surfaces appropriate for the
>> MNINonLinear/ T1w_restore.nii.gz volume.  I would like to transform the
>> dscalar surface so that it is instead congruent with surfaces appropriate
>> for the T1w/T1w_acpc*.nii.gz volumes.
>>
>>   The PDF guide referenced on the wiki (
>> https://wiki.humanconnectome.org/display/PublicData/HCP+Users+FAQ#HCPUsersFAQ-9.HowdoImapdatabetweenFreeSurferandHCP?)
>> has some useful hints, but seems intended for transformations moving in the
>> other direction.  Any help would be greatly appreciated.
>>
>>  Please let me know if I can provide any additional information.
>> Best,
>>
>> Dave
>>
>>
>> --
>>
>> *David E. Warren, PhDAssistant Professor*
>> Department of Neurological Sciences
>>
>> *University of Nebraska Medical Center*
>> 988440 Nebraska Medical Center
>> Omaha, NE 68198-8440
>>
>> phone 402.559.5805 | fax 402.559.3441
>> david.war...@unmc.edu
>>
>> ___
>> HCP-Users mailing list
>> HCP-Users@humanconnectome.org
>> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>>
>

-- 

*David E. Warren, PhDAssistant Professor*
Department of Neurological Sciences

*University of Nebraska Medical Center*
988440 Nebraska Medical Center
Omaha, NE 68198-8440

phone 402.559.5805 | fax 402.559.3441
david.war...@unmc.edu

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


Re: [HCP-Users] Question: How to transform MNINonLinear-derived dscalar surface to T1w space?

2019-01-24 Thread Timothy Coalson
Surface data is different - we don't actually put surface coordinates into
dscalar, or any other cifti files (or metric files).  In our data, the
surface coordinates are only contained in .surf.gii files.  Getting the
surface data into "Native" volume space is as simple as using the surfaces
in the T1w folder, rather than the ones in MNINonLinear.  The same data
file is used.

The FAQ you found is actually about going between different surface meshes,
not coordinate spaces.  Put simply, freesurfer uses ~40,000 vertices in
their most relevant standard mesh, while our version uses ~32,000 vertices,
and those instructions are about how to jump that gap.  They don't actually
change the coordinates of any blob in the data or fold of the surface.

However, the subcortical data is in voxels, not surfaces, and voxel-based
data is tied to a specific volume space (and are MNINonLinear in our
standard grayordinates space).  You can use wb_command -cifti-separate with
the -volume-all option to extract all the voxel-based data, and then use
the appropriate volume warpfield to resample it, however this will give a
masked version, and the resampling will blur the edges of the mask somewhat
- if this is an issue, you should probably dilate the extracted subcortical
data before resampling it (and also resample the mask, and remask it
afterwards).

Tim


On Thu, Jan 24, 2019 at 12:25 PM David Warren 
wrote:

> Hi all,
>
>   What is the procedure for transforming scalar surfaces in the
> MNINonLinear space back to a subject’s (processed) T1w space using
> wb_command tools?
>
>   Briefly, I am working with an independently-collected, HCP-like
> dataset which has been processed with the HCP Pipelines tools.  Based on
> processed outputs, I have a dscalar surface under MNINonLinear (in the
> fsaverage_LR32k) space that is congruent with surfaces appropriate for the
> MNINonLinear/ T1w_restore.nii.gz volume.  I would like to transform the
> dscalar surface so that it is instead congruent with surfaces appropriate
> for the T1w/T1w_acpc*.nii.gz volumes.
>
>   The PDF guide referenced on the wiki (
> https://wiki.humanconnectome.org/display/PublicData/HCP+Users+FAQ#HCPUsersFAQ-9.HowdoImapdatabetweenFreeSurferandHCP?)
> has some useful hints, but seems intended for transformations moving in the
> other direction.  Any help would be greatly appreciated.
>
>  Please let me know if I can provide any additional information.  Best,
>
> Dave
>
>
> --
>
> *David E. Warren, PhDAssistant Professor*
> Department of Neurological Sciences
>
> *University of Nebraska Medical Center*
> 988440 Nebraska Medical Center
> Omaha, NE 68198-8440
>
> phone 402.559.5805 | fax 402.559.3441
> david.war...@unmc.edu
>
> ___
> 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] Regress confounds out of CIFTIs

2019-01-24 Thread Leonardo Tozzi
Dear Experts,

I have a text file of confound regressors that I would like to regress out of a 
resting state .dtseries.nii file and save the residuals of this procedure as a 
new .dtseries.nii file.
I was wondering if there is a computationally efficient way of doing this, 
possibly using the wb_command. Right now, the only thing I can think about is 
using matlab but it is obviously impractical to loop over the 90k greyordinates.
I have looked into the fsl_glm command, but it doesn’t take in CIFTIs, so I 
would have to then work on the NIFTI and transform it to CIFTI again, for 
example by rerunning the surface preprocessing step.
Would you have any suggestions?
Thank you,


Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu | (650) 5615738


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


[HCP-Users] Question: How to transform MNINonLinear-derived dscalar surface to T1w space?

2019-01-24 Thread David Warren
Hi all,

  What is the procedure for transforming scalar surfaces in the
MNINonLinear space back to a subject’s (processed) T1w space using
wb_command tools?

  Briefly, I am working with an independently-collected, HCP-like
dataset which has been processed with the HCP Pipelines tools.  Based on
processed outputs, I have a dscalar surface under MNINonLinear (in the
fsaverage_LR32k) space that is congruent with surfaces appropriate for the
MNINonLinear/ T1w_restore.nii.gz volume.  I would like to transform the
dscalar surface so that it is instead congruent with surfaces appropriate
for the T1w/T1w_acpc*.nii.gz volumes.

  The PDF guide referenced on the wiki (
https://wiki.humanconnectome.org/display/PublicData/HCP+Users+FAQ#HCPUsersFAQ-9.HowdoImapdatabetweenFreeSurferandHCP?)
has some useful hints, but seems intended for transformations moving in the
other direction.  Any help would be greatly appreciated.

 Please let me know if I can provide any additional information.  Best,

Dave


-- 

*David E. Warren, PhDAssistant Professor*
Department of Neurological Sciences

*University of Nebraska Medical Center*
988440 Nebraska Medical Center
Omaha, NE 68198-8440

phone 402.559.5805 | fax 402.559.3441
david.war...@unmc.edu

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


[HCP-Users] Downloading Movement Regressor Data for 7T Scans

2019-01-24 Thread Mark O'Reilly
Hi,

I am trying to download a group of movement regressor text files for 7T resting 
state scans via REST but there does not seem to be any relation between the 
subject number and the URL needed to download the file.  For example the URL 
for the first 7T rest scan for subject 100610 is 
https://db.humanconnectome.org/data/experiments/ConnectomeDB_E24170/resources/389115/files/rfMRI_REST1_7T_PA/Movement_Regressors_dt.txt

Is there anywhere I can find a correspondence between the 7T URLs and their 
subjects?

Thanks,
Mark


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