Re: [caret-users] Creating a surface-based atlas from a volumetric-atlas

2015-01-08 Thread Donna Dierker
On Jan 8, 2015, at 11:12 AM, "HINDRIKS, RIKKERT"  
wrote:

> Hi Donna,
> 
> Thank you very much for your response.
> 
> You're right about the smoothing: the deformed individual surface in the 
> target directory is indeed the same as the
> original one (after the flattening). Clear.
> 
> Would the deformed individual surface in the target directory be considered 
> native space? The only difference with
> the unregistered surface is that it is resampled onto standard mesh (but the 
> shape is the same).

The deformed surface is in the same *stereotaxic space* as the source surface.

The surfaces in the atlas directory are on the same mesh as the atlas surface.

> All goodies also
> project nicely to it. I also plotted them over one another and they perfectly 
> overlap. FYI: I am calculating an EcoG
> leadfield on the surface so the exact shape needs to stay the same.

I would think you'd want to work on native mesh, then (individual/source 
directory).

> And am I correct that the deformed template surfaces in the source directory 
> are resampled onto the individual
> mesh? In this directory, however, I only see the deformed spherical. I that 
> all the boxes "Deform coordinate files to
> atlas" so these I assume, are the deformed surfaces in the target directory. 
> I see however, no box "atlas to individual".

Whatever files were in the atlas/target spec file when you ran registration 
will get resampled onto the source subject's mesh and saved in the source 
directory.  You can also apply the deform_map in the source dir to your atlas 
goodies, or just re-run registration using a spec file that points to the 
goodies you want resampled onto native mesh.

> I figured out how to export a paint file and input it in Matlab: I save it as 
> a labeled GIFTI file and open it in Matlab
> with gifti.m (from the GIFTI toolbox). I then have all 19 columns at once!

Now you have to ponder which are useful to you.

> Kind regards,
> Rikkert
> 
> P.S. I noticed that in the Paxinos atlas, V5 is merged with the medial wall.
> 
> 
> On Thu, Jan 8, 2015 at 3:51 PM, Donna Dierker  
> wrote:
> On Jan 7, 2015, at 10:16 AM, "HINDRIKS, RIKKERT"  
> wrote:
> 
> >
> > Hi Donna,
> >
> > I now have performed the spherical registration. What I would need is the 
> > PHT atlas on the individual surface.
> 
> If you checked the box requesting atlas to individual, then you should have 
> that in your individual/source directory.
> 
> > I am however, not sure how to interpret the generated surfaces. For 
> > example, in the target directory there appear
> > coordinate files with the prefix "deformed" and refer to the individual 
> > monkey. Although the shape of the fiducial
> > one is very similar to the shape of the (undeformed) individual surface, 
> > there are some slight differences (for
> > example, the medial wall is smoothed). What is the exact interpretation of 
> > these surfaces?
> 
> Yes, the medial wall gets smoothed at the beginning of flattening, if I 
> recall correctly (it's been a long time!), and a version of the sphere is 
> generated from the fiducial with the smoothed medial wall.  This is what goes 
> into registration.
> 
> What you are seeing in the atlas directory is the source/individual 
> midthickness (with smoothed medial wall) resampled onto the target mesh.  It 
> will be slighter smoother than the source, and thus have slightly smaller 
> surface area.  But it will look a lot like the source.
> 
> > I noticed that I can view the different atlases defined on the template on 
> > these deformed atlases. Does this
> > mean that I have mapped them to the individual surface (which is what I 
> > want)?
> 
> It sounds like things went reasonably well.  Now you're at a point where you 
> need to decide:
> 
> * do I work with atlas goodies on my native individual surface 
> (assuming you checked that box)? or
> * do I work with individual goodies on atlas surfaces
> 
> The answer depends on what you're doing with the data.  If it's more 
> important that the surface stays native (e.g., for folding/areal 
> measurements), then the former option is better.  If it's handy to have 
> things on the atlas standard mesh for other reasons, then atlas-land is the 
> way to go.  With just one subject, native-land may be fine.  I did skim the 
> history below, but don't have the time to fully digest it at the moment.  But 
> maybe this will get you further along in your own thinking about next steps.
> 
> > One more question about exporting the results: When I export the deformed 
> > surface with the atlas as a
> > .label.gii file and read it into Matlab, I get a nice list of ROI names and 
> > corresponding RGB and alpha
> > values. However, the .cdata fields has 20 columns which I don't understand. 
> > I hoped to get, for each
> > vertex, an index into the ROI list. I've also tried to export it as a 
> > surf.gii file, the then the .cdata field has
> > 4 columns whose meaning I don't understand as

Re: [caret-users] Creating a surface-based atlas from a volumetric-atlas

2015-01-08 Thread HINDRIKS, RIKKERT
Hi Donna,

Thank you very much for your response.

You're right about the smoothing: the deformed individual surface in the
target directory is indeed the same as the
original one (after the flattening). Clear.

Would the deformed individual surface in the target directory be considered
native space? The only difference with
the unregistered surface is that it is resampled onto standard mesh (but
the shape is the same). All goodies also
project nicely to it. I also plotted them over one another and they
perfectly overlap. FYI: I am calculating an EcoG
leadfield on the surface so the exact shape needs to stay the same.

And am I correct that the deformed template surfaces in the source
directory are resampled onto the individual
mesh? In this directory, however, I only see the deformed spherical. I that
all the boxes "Deform coordinate files to
atlas" so these I assume, are the deformed surfaces in the target
directory. I see however, no box "atlas to individual".

I figured out how to export a paint file and input it in Matlab: I save it
as a labeled GIFTI file and open it in Matlab
with gifti.m (from the GIFTI toolbox). I then have all 19 columns at once!

Kind regards,
Rikkert

P.S. I noticed that in the Paxinos atlas, V5 is merged with the medial
wall.


On Thu, Jan 8, 2015 at 3:51 PM, Donna Dierker 
wrote:

> On Jan 7, 2015, at 10:16 AM, "HINDRIKS, RIKKERT" 
> wrote:
>
> >
> > Hi Donna,
> >
> > I now have performed the spherical registration. What I would need is
> the PHT atlas on the individual surface.
>
> If you checked the box requesting atlas to individual, then you should
> have that in your individual/source directory.
>
> > I am however, not sure how to interpret the generated surfaces. For
> example, in the target directory there appear
> > coordinate files with the prefix "deformed" and refer to the individual
> monkey. Although the shape of the fiducial
> > one is very similar to the shape of the (undeformed) individual surface,
> there are some slight differences (for
> > example, the medial wall is smoothed). What is the exact interpretation
> of these surfaces?
>
> Yes, the medial wall gets smoothed at the beginning of flattening, if I
> recall correctly (it's been a long time!), and a version of the sphere is
> generated from the fiducial with the smoothed medial wall.  This is what
> goes into registration.
>
> What you are seeing in the atlas directory is the source/individual
> midthickness (with smoothed medial wall) resampled onto the target mesh.
> It will be slighter smoother than the source, and thus have slightly
> smaller surface area.  But it will look a lot like the source.
>
> > I noticed that I can view the different atlases defined on the template
> on these deformed atlases. Does this
> > mean that I have mapped them to the individual surface (which is what I
> want)?
>
> It sounds like things went reasonably well.  Now you're at a point where
> you need to decide:
>
> * do I work with atlas goodies on my native individual surface
> (assuming you checked that box)? or
> * do I work with individual goodies on atlas surfaces
>
> The answer depends on what you're doing with the data.  If it's more
> important that the surface stays native (e.g., for folding/areal
> measurements), then the former option is better.  If it's handy to have
> things on the atlas standard mesh for other reasons, then atlas-land is the
> way to go.  With just one subject, native-land may be fine.  I did skim the
> history below, but don't have the time to fully digest it at the moment.
> But maybe this will get you further along in your own thinking about next
> steps.
>
> > One more question about exporting the results: When I export the
> deformed surface with the atlas as a
> > .label.gii file and read it into Matlab, I get a nice list of ROI names
> and corresponding RGB and alpha
> > values. However, the .cdata fields has 20 columns which I don't
> understand. I hoped to get, for each
> > vertex, an index into the ROI list. I've also tried to export it as a
> surf.gii file, the then the .cdata field has
> > 4 columns whose meaning I don't understand as well. Could you please
> clearify this for me and tell me
> > how to get a ROI-number for each vertex?
>
> The atlas label/paint file may have multiple columns for multiple
> parcellations (e.g., LVE00 vs OrbitalFrontal).  You might need to extract
> just one of these and work with a single parcellation at a time.  This is
> my best guess as to what is going on there.
>
> >
> > Much appreciated!
> > Kind regards,
> > Rikkert
> >
> >
> >
> >
> >
> > On Wed, Nov 5, 2014 at 3:20 PM, Donna Dierker 
> wrote:
> > On Nov 5, 2014, at 7:05 AM, "HINDRIKS, RIKKERT" <
> rikkert.hindr...@upf.edu> wrote:
> >
> > >
> > > Hi Donna,
> > >
> > > I've constructed a .borderproj file (and a .bordercolor file)
> containing the 23 LANDMARKS that correspond to the 23 LANDMARKS
> > > in the file
> Macaque.F99UA1.LR.AVERAGE.LANDMARKS_for_FULL-HEMISPHERE_

Re: [caret-users] Creating a surface-based atlas from a volumetric-atlas

2015-01-08 Thread Donna Dierker
On Jan 7, 2015, at 10:16 AM, "HINDRIKS, RIKKERT"  
wrote:

> 
> Hi Donna,
> 
> I now have performed the spherical registration. What I would need is the PHT 
> atlas on the individual surface.

If you checked the box requesting atlas to individual, then you should have 
that in your individual/source directory.

> I am however, not sure how to interpret the generated surfaces. For example, 
> in the target directory there appear
> coordinate files with the prefix "deformed" and refer to the individual 
> monkey. Although the shape of the fiducial
> one is very similar to the shape of the (undeformed) individual surface, 
> there are some slight differences (for
> example, the medial wall is smoothed). What is the exact interpretation of 
> these surfaces?

Yes, the medial wall gets smoothed at the beginning of flattening, if I recall 
correctly (it's been a long time!), and a version of the sphere is generated 
from the fiducial with the smoothed medial wall.  This is what goes into 
registration.

What you are seeing in the atlas directory is the source/individual 
midthickness (with smoothed medial wall) resampled onto the target mesh.  It 
will be slighter smoother than the source, and thus have slightly smaller 
surface area.  But it will look a lot like the source.

> I noticed that I can view the different atlases defined on the template on 
> these deformed atlases. Does this
> mean that I have mapped them to the individual surface (which is what I want)?

It sounds like things went reasonably well.  Now you're at a point where you 
need to decide:

* do I work with atlas goodies on my native individual surface 
(assuming you checked that box)? or
* do I work with individual goodies on atlas surfaces

The answer depends on what you're doing with the data.  If it's more important 
that the surface stays native (e.g., for folding/areal measurements), then the 
former option is better.  If it's handy to have things on the atlas standard 
mesh for other reasons, then atlas-land is the way to go.  With just one 
subject, native-land may be fine.  I did skim the history below, but don't have 
the time to fully digest it at the moment.  But maybe this will get you further 
along in your own thinking about next steps.

> One more question about exporting the results: When I export the deformed 
> surface with the atlas as a
> .label.gii file and read it into Matlab, I get a nice list of ROI names and 
> corresponding RGB and alpha
> values. However, the .cdata fields has 20 columns which I don't understand. I 
> hoped to get, for each
> vertex, an index into the ROI list. I've also tried to export it as a 
> surf.gii file, the then the .cdata field has
> 4 columns whose meaning I don't understand as well. Could you please clearify 
> this for me and tell me
> how to get a ROI-number for each vertex?

The atlas label/paint file may have multiple columns for multiple parcellations 
(e.g., LVE00 vs OrbitalFrontal).  You might need to extract just one of these 
and work with a single parcellation at a time.  This is my best guess as to 
what is going on there.

> 
> Much appreciated!
> Kind regards,
> Rikkert
> 
> 
> 
> 
> 
> On Wed, Nov 5, 2014 at 3:20 PM, Donna Dierker  
> wrote:
> On Nov 5, 2014, at 7:05 AM, "HINDRIKS, RIKKERT"  
> wrote:
> 
> >
> > Hi Donna,
> >
> > I've constructed a .borderproj file (and a .bordercolor file) containing 
> > the 23 LANDMARKS that correspond to the 23 LANDMARKS
> > in the file 
> > Macaque.F99UA1.LR.AVERAGE.LANDMARKS_for_FULL-HEMISPHERE_RegWithPHT00.73730.borderproj
> >  with
> > corresponding .bordercolor filee Macaque.LANDMARKS_for_FULL-HEM.bordercolor 
> > and I think there is a good correspondence
> > between the individual and template LANDMARKS.
> >
> > To perform the spherical registration however, I need the template sphere 
> > of the left hemisphere, while I can only find the one of the
> > right hemisphere (Macaque.ATLAS.sphere.6.73730.coord). Do you know where I 
> > can find it? (Maybe I can obtain it by mirroring, but
> > I have no idea how this could be done).
> 
> Use the right for both.  Caret with x-flip the left hems when it does its 
> thing, provided the source spec file correctly identifies the hemisphere.
> 
> In this way, the resulting left and right hem resampled surfaces are in 
> register with one another.
> 
> Just make sure there is a hemisphere tag that correctly identifies your left 
> hem, and Caret will do the rest.
> 
> > And I have a couple of general questions:
> >
> > 1. In which file-types are the sulcal-depths stored? (this applies both to 
> > individual as well as template data)?  I quess this should be a
> > .surface_shape file, but I cannot find it. I ask this because I want to 
> > make a new directory which only contains those files that I need.
> 
> Should be surface_shape, but depending on what spec file you are using, you 
> might not have one.  Or if it is more recent, it might be shape.gii.  The 
> Sept 2006