Re: [HCP-Users] importing HCP files into Brainstorm

2017-02-01 Thread Sylvain Baillet, Dr
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: hcp-users-boun...@humanconnectome.org 
<hcp-users-boun...@humanconnectome.org> on behalf of 
hcp-users-requ...@humanconnectome.org <hcp-users-requ...@humanconnectome.org>
Sent: Wednesday, February 1, 2017 1:00 PM
To: hcp-users@humanconnectome.org
Subject: HCP-Users Digest, Vol 51, Issue 1

Send HCP-Users mailing list submissions to
hcp-users@humanconnectome.org

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
hcp-users-requ...@humanconnectome.org

You can reach the person managing the list at
hcp-users-ow...@humanconnectome.org

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 +
From: "K Jeffrey Eriksen" <eriks...@ohsu.edu>
Subject: [HCP-Users] importing HCP files into Brainstorm
To: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org>
Message-ID: <d4b6509f.4109%eriks...@ohsu.edu>
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 <tsc...@mst.edu>
Subject: Re: [HCP-Users] importing HCP files into Brainstorm
To: K Jeffrey Eriksen <eriks...@ohsu.edu>
Cc: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org>
Message-ID:

Re: [HCP-Users] importing HCP files into Brainstorm

2017-01-31 Thread Timothy Coalson
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
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

Tim


On Tue, Jan 31, 2017 at 4:33 PM, K Jeffrey Eriksen 
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
> 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] importing HCP files into Brainstorm

2017-01-31 Thread K Jeffrey Eriksen
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
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users