Hi Folks:

We've just completed an online tutorial about how to import HCP data into 
Brainstorm. If further clarifications are required, we encourage everyone to 
use the Brainstorm forum for further discussion.


http://neuroimage.usc.edu/brainstorm/Tutorials/HCP-MEG


Hope this helps!


Cheers,


Sylvain.

Sylvain Baillet, PhD
Professor & Acting Director, McConnell Brain Imaging Centre
Montreal Neurological Institute
McGill University
http://mcgill.ca/bic


________________________________
From: [email protected] 
<[email protected]> on behalf of 
[email protected] <[email protected]>
Sent: Wednesday, February 1, 2017 1:00 PM
To: [email protected]
Subject: HCP-Users Digest, Vol 51, Issue 1

Send HCP-Users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.humanconnectome.org/mailman/listinfo/hcp-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of HCP-Users digest..."


Today's Topics:

   1. importing HCP files into Brainstorm (K Jeffrey Eriksen)
   2. Re: importing HCP files into Brainstorm (Timothy Coalson)
   3. Re: importing HCP files into Brainstorm (Glasser, Matthew)


----------------------------------------------------------------------

Message: 1
Date: Tue, 31 Jan 2017 22:33:04 +0000
From: "K Jeffrey Eriksen" <[email protected]>
Subject: [HCP-Users] importing HCP files into Brainstorm
To: "[email protected]" <[email protected]>
Message-ID: <d4b6509f.4109%[email protected]>
Content-Type: text/plain; charset="us-ascii"

Hello,

I am a very new HCP Connectome WB user trying to import nifti and gifti files 
into Brainstorm (Bst) for EEG modeling. I am having a strange problem and am 
looking for some direction. In the past I was able to import T1.nii volume 
files and lh.pial/rh.pial files from FreeSurfer with no problem into 
Brainstorm. Now I am trying to import similar files proceed by the HCP 
pipeline. Let me call these HCP-T1 and HCP-cortsurf, and the original 
FreeSurfer files FS-T1 and FS-cortsurf.

When I import the FS files into Bst they can be plotted in 3D, and align well. 
However, when I import the HCP-T1 and HCP-cortsurf, they do not align. In fact, 
assuming the T1 is correctly displayed, the surface ends up displaced about two 
head diameters worth and is also inverted L-R and upside down. This is very odd 
since these same two files align perfectly when viewed with the Connectome 
Workbench.

I need to point out that the FS-cortsurf is a full 250,000 vertex file for a 
particular subject, while the HCP-cortsurf is the 64,000 vertex version using 
the HCP standard.

Please provide me with some suggestions of how to begin to address this 
problem. The Brainstorm support personnel are unable to help me on this.

Thanks,
-Jeff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.humanconnectome.org/pipermail/hcp-users/attachments/20170131/b6566342/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 31 Jan 2017 19:44:31 -0600
From: Timothy Coalson <[email protected]>
Subject: Re: [HCP-Users] importing HCP files into Brainstorm
To: K Jeffrey Eriksen <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID:
        <CAK_=tawpXmaMSwCXx2QA7V4bP4==pSnKwp==ndqnicems8m...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Freesurfer has a coordinate displacement between their surfaces and
volumes, which depends on the volume space that was used.  That might be
part of the picture.  However, this is purely a shift, no rotation or flip,
and I think is typically about half the brain size, so something else must
also be going on.

Another thing that that the HCP pipelines do is that they pull some tricks
to avoid downsampling the 0.7mm structural images when putting them through
freesurfer.  This involves a specific cropping and faking a new volume
space that pretends to be 1mm isotropic.  The HCP pipelines correct for
this change in coordinate space, and also correct for the shift that
freesurfer puts into its surface coordinates.

The end result is that all of the anatomical gifti surface outputs from the
HCP pipelines have raw coordinates that are already aligned with the
relevant 0.7mm T1 voxel coordinates (NOT the modified volumes that it runs
freesurfer on), per the nifti standard coordinate conventions (via the
sform method).  Thus, wb_view and wb_command do not need to apply any
shifts when reading, displaying, or computing in order to align them.

Hopefully this is useful information for understanding what the issue might
be.  Here are some relevant code snippets as to how we interpret the
coordinate information in the file types in question, which might be useful
to the Brainstorm developers:

Note that we do not apply any of the transform matrices that are in the
gifti file, because freesurfer does something strange with them:
https://github.com/Washington-University/workbench/blob/master/src/Files/SurfaceFile.cxx#L263
So, we use the coordinate array exactly as it comes out of the base64/gzip
encoding.

Using nifti sform info:
https://github.com/Washington-University/workbench/blob/master/src/FilesBase/VolumeSpace.h#L145
[https://avatars3.githubusercontent.com/u/1493901?v=3&s=400]<https://github.com/Washington-University/workbench/blob/master/src/FilesBase/VolumeSpace.h#L145>

Washington-University/workbench<https://github.com/Washington-University/workbench/blob/master/src/FilesBase/VolumeSpace.h#L145>
github.com
workbench - Connectome Workbench



m_sform is just a copy of the sform fields from the nifti header (as long
as sform_code is nonzero, see
https://github.com/Washington-University/workbench/blob/master/src/Nifti/NiftiHeader.cxx#L220
- otherwise it constructs the equivalent sform from whatever spacing
information is available)

Some computation code showing direct comparison of voxel and surface
coordinates:
https://github.com/Washington-University/workbench/blob/master/src/Algorithms/AlgorithmVolumeToSurfaceMapping.cxx#L306
[https://avatars3.githubusercontent.com/u/1493901?v=3&s=400]<https://github.com/Washington-University/workbench/blob/master/src/Algorithms/AlgorithmVolumeToSurfaceMapping.cxx#L306>

Washington-University/workbench<https://github.com/Washington-University/workbench/blob/master/src/Algorithms/AlgorithmVolumeToSurfaceMapping.cxx#L306>
github.com
workbench - Connectome Workbench




Tim


On Tue, Jan 31, 2017 at 4:33 PM, K Jeffrey Eriksen <[email protected]>
wrote:

> Hello,
>
> I am a very new HCP Connectome WB user trying to import nifti and gifti
> files into Brainstorm (Bst) for EEG modeling. I am having a strange problem
> and am looking for some direction. In the past I was able to import T1.nii
> volume files and lh.pial/rh.pial files from FreeSurfer with no problem into
> Brainstorm. Now I am trying to import similar files proceed by the HCP
> pipeline. Let me call these HCP-T1 and HCP-cortsurf, and the original
> FreeSurfer files FS-T1 and FS-cortsurf.
>
> When I import the FS files into Bst they can be plotted in 3D, and align
> well. However, when I import the HCP-T1 and HCP-cortsurf, they do not
> align. In fact, assuming the T1 is correctly displayed, the surface ends up
> displaced about two head diameters worth and is also inverted L-R and
> upside down. This is very odd since these same two files align perfectly
> when viewed with the Connectome Workbench.
>
> I need to point out that the FS-cortsurf is a full 250,000 vertex file for
> a particular subject, while the HCP-cortsurf is the 64,000 vertex version
> using the HCP standard.
>
> Please provide me with some suggestions of how to begin to address this
> problem. The Brainstorm support personnel are unable to help me on this.
>
> Thanks,
> -Jeff
>
> _______________________________________________
> HCP-Users mailing list
> [email protected]
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.humanconnectome.org/pipermail/hcp-users/attachments/20170131/81f5341c/attachment-0001.html

------------------------------

Message: 3
Date: Wed, 1 Feb 2017 01:50:14 +0000
From: "Glasser, Matthew" <[email protected]>
Subject: Re: [HCP-Users] importing HCP files into Brainstorm
To: NEUROSCIENCE tim <[email protected]>, K Jeffrey Eriksen
        <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <d4b69a0b.136384%[email protected]>
Content-Type: text/plain; charset="us-ascii"

Some amendments to this:

  1.  If there is an oblique sform in the input image header to FreeSurfer, 
there can be more than a translation.  The HCP MRI Pipelines always avoid this 
situation.  The MEG pipelines may not.
  2.  For human data, there is not volume space faking by the HCP Pipelines, 
rather the data are down sampled to 1mm and then highres data are incorporated 
in white surface placement and pial surface placement (at their full resolution 
and with correct headers).  The faking that Tim is talking about occurs in an 
unreleased pipeline for processing non-human primate data.

Matt.

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Timothy Coalson <[email protected]<mailto:[email protected]>>
Date: Tuesday, January 31, 2017 at 7:44 PM
To: K Jeffrey Eriksen <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: [HCP-Users] importing HCP files into Brainstorm

Freesurfer has a coordinate displacement between their surfaces and volumes, 
which depends on the volume space that was used.  That might be part of the 
picture.  However, this is purely a shift, no rotation or flip, and I think is 
typically about half the brain size, so something else must also be going on.

Another thing that that the HCP pipelines do is that they pull some tricks to 
avoid downsampling the 0.7mm structural images when putting them through 
freesurfer.  This involves a specific cropping and faking a new volume space 
that pretends to be 1mm isotropic.  The HCP pipelines correct for this change 
in coordinate space, and also correct for the shift that freesurfer puts into 
its surface coordinates.

The end result is that all of the anatomical gifti surface outputs from the HCP 
pipelines have raw coordinates that are already aligned with the relevant 0.7mm 
T1 voxel coordinates (NOT the modified volumes that it runs freesurfer on), per 
the nifti standard coordinate conventions (via the sform method).  Thus, 
wb_view and wb_command do not need to apply any shifts when reading, 
displaying, or computing in order to align them.

Hopefully this is useful information for understanding what the issue might be. 
 Here are some relevant code snippets as to how we interpret the coordinate 
information in the file types in question, which might be useful to the 
Brainstorm developers:

Note that we do not apply any of the transform matrices that are in the gifti 
file, because freesurfer does something strange with them:
https://github.com/Washington-University/workbench/blob/master/src/Files/SurfaceFile.cxx#L263
[https://avatars3.githubusercontent.com/u/1493901?v=3&s=400]<https://github.com/Washington-University/workbench/blob/master/src/Files/SurfaceFile.cxx#L263>

Washington-University/workbench<https://github.com/Washington-University/workbench/blob/master/src/Files/SurfaceFile.cxx#L263>
github.com
workbench - Connectome Workbench



So, we use the coordinate array exactly as it comes out of the base64/gzip 
encoding.

Using nifti sform info:
https://github.com/Washington-University/workbench/blob/master/src/FilesBase/VolumeSpace.h#L145
[https://avatars3.githubusercontent.com/u/1493901?v=3&s=400]<https://github.com/Washington-University/workbench/blob/master/src/FilesBase/VolumeSpace.h#L145>

Washington-University/workbench<https://github.com/Washington-University/workbench/blob/master/src/FilesBase/VolumeSpace.h#L145>
github.com
workbench - Connectome Workbench



m_sform is just a copy of the sform fields from the nifti header (as long as 
sform_code is nonzero, see 
https://github.com/Washington-University/workbench/blob/master/src/Nifti/NiftiHeader.cxx#L220
 - otherwise it constructs the equivalent sform from whatever spacing 
information is available)

Some computation code showing direct comparison of voxel and surface 
coordinates:
https://github.com/Washington-University/workbench/blob/master/src/Algorithms/AlgorithmVolumeToSurfaceMapping.cxx#L306
[https://avatars3.githubusercontent.com/u/1493901?v=3&s=400]<https://github.com/Washington-University/workbench/blob/master/src/Algorithms/AlgorithmVolumeToSurfaceMapping.cxx#L306>

Washington-University/workbench<https://github.com/Washington-University/workbench/blob/master/src/Algorithms/AlgorithmVolumeToSurfaceMapping.cxx#L306>
github.com
workbench - Connectome Workbench




Tim


On Tue, Jan 31, 2017 at 4:33 PM, K Jeffrey Eriksen 
<[email protected]<mailto:[email protected]>> wrote:
Hello,

I am a very new HCP Connectome WB user trying to import nifti and gifti files 
into Brainstorm (Bst) for EEG modeling. I am having a strange problem and am 
looking for some direction. In the past I was able to import T1.nii volume 
files and lh.pial/rh.pial files from FreeSurfer with no problem into 
Brainstorm. Now I am trying to import similar files proceed by the HCP 
pipeline. Let me call these HCP-T1 and HCP-cortsurf, and the original 
FreeSurfer files FS-T1 and FS-cortsurf.

When I import the FS files into Bst they can be plotted in 3D, and align well. 
However, when I import the HCP-T1 and HCP-cortsurf, they do not align. In fact, 
assuming the T1 is correctly displayed, the surface ends up displaced about two 
head diameters worth and is also inverted L-R and upside down. This is very odd 
since these same two files align perfectly when viewed with the Connectome 
Workbench.

I need to point out that the FS-cortsurf is a full 250,000 vertex file for a 
particular subject, while the HCP-cortsurf is the 64,000 vertex version using 
the HCP standard.

Please provide me with some suggestions of how to begin to address this 
problem. The Brainstorm support personnel are unable to help me on this.

Thanks,
-Jeff


_______________________________________________
HCP-Users mailing list
[email protected]<mailto:[email protected]>
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


_______________________________________________
HCP-Users mailing list
[email protected]<mailto:[email protected]>
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.humanconnectome.org/pipermail/hcp-users/attachments/20170201/f7059c69/attachment-0001.html

------------------------------

_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


End of HCP-Users Digest, Vol 51, Issue 1
****************************************

_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to