[Freesurfer] Making a patch of area A

2005-03-08 Thread Daniel Goldenholz
Hi. I have a graph theory question:
I would like to make a definition of a particular patch of cortex, that 
has a centroid at position (x,y,z) and has a total area of A.

I thought that this was going to be somewhat hard, but I soon learned that 
it is very hard.

First, I found some code for the Dijkstra algorithm, which can quickly 
tell me what is the minimum number of jumps needed from one vertex to 
another. IF the freesurfer surface triangles were all of EXACTLY the same 
euclidean distances on each side, then this alone could solve my problem. 
I could simply take all vertices which have a jump distance less than 
some number.

However, because the side lengths of the triangles in a freesurfer surface 
are NOT the same, I need to get more sophisticated.

Ideally, what I would like is the following:
	If I were an ant, walking along on the surface of the folded 
brain, I could walk from the centroid in any direction for a certain 
distance, and still be within my "patch."
	Knowing that distance (radius), I could just use pi*r^2 and call 
that the area of the patch.

But how do I find this idealized patch in real life?
Thanks
Daniel Goldenholz
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-08 Thread Doug Greve

You might try starting off with the ?h.sphere. It's easy to parameterize
these things on the sphere. The sphere, of course, has some metric
distortion, but if the patch is small, it might not be to bad. Once
you've identified the vertices in the patch (or maybe a slightly bigger
patch), then you can refine it in the folded space.

doug


Daniel Goldenholz wrote:
> 
> Hi. I have a graph theory question:
> 
> I would like to make a definition of a particular patch of cortex, that
> has a centroid at position (x,y,z) and has a total area of A.
> 
> I thought that this was going to be somewhat hard, but I soon learned that
> it is very hard.
> 
> First, I found some code for the Dijkstra algorithm, which can quickly
> tell me what is the minimum number of jumps needed from one vertex to
> another. IF the freesurfer surface triangles were all of EXACTLY the same
> euclidean distances on each side, then this alone could solve my problem.
> I could simply take all vertices which have a jump distance less than
> some number.
> 
> However, because the side lengths of the triangles in a freesurfer surface
> are NOT the same, I need to get more sophisticated.
> 
> Ideally, what I would like is the following:
> If I were an ant, walking along on the surface of the folded
> brain, I could walk from the centroid in any direction for a certain
> distance, and still be within my "patch."
> Knowing that distance (radius), I could just use pi*r^2 and call
> that the area of the patch.
> 
> But how do I find this idealized patch in real life?
> 
> Thanks
> Daniel Goldenholz
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-08 Thread Rudolph Pienaar
Hi Daniel -

Well it seems to me that you're almost there already. A Dijkstra algorithm is 
the ideal engine to determine radial paths from a central node - I suspect 
you just need to tune the graph cost function to take the Euclidean distance 
between nodes (as opposed to the logical distance) into account.

--R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: [EMAIL PROTECTED]
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street, Charlestown, MA 02129 USA
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-08 Thread Daniel Goldenholz
Doug
I was thinking of trying something like that.
If I took all vertices which are a radius M or less from my centriod, 
aren't I basically done?
(M is defined as the maximum euclidean distance between the centroid on 
the sphere and the ring of outer vertices. If my surface distance max is 
called R, I can use some geometry to figure out the relation between R and 
M)

What tweaks would I need to do at the folded surface level?
On Tue, 8 Mar 2005, Doug Greve wrote:
You might try starting off with the ?h.sphere. It's easy to parameterize
these things on the sphere. The sphere, of course, has some metric
distortion, but if the patch is small, it might not be to bad. Once
you've identified the vertices in the patch (or maybe a slightly bigger
patch), then you can refine it in the folded space.
doug
Daniel Goldenholz wrote:
Hi. I have a graph theory question:
I would like to make a definition of a particular patch of cortex, that
has a centroid at position (x,y,z) and has a total area of A.
I thought that this was going to be somewhat hard, but I soon learned that
it is very hard.
First, I found some code for the Dijkstra algorithm, which can quickly
tell me what is the minimum number of jumps needed from one vertex to
another. IF the freesurfer surface triangles were all of EXACTLY the same
euclidean distances on each side, then this alone could solve my problem.
I could simply take all vertices which have a jump distance less than
some number.
However, because the side lengths of the triangles in a freesurfer surface
are NOT the same, I need to get more sophisticated.
Ideally, what I would like is the following:
If I were an ant, walking along on the surface of the folded
brain, I could walk from the centroid in any direction for a certain
distance, and still be within my "patch."
Knowing that distance (radius), I could just use pi*r^2 and call
that the area of the patch.
But how do I find this idealized patch in real life?
Thanks
Daniel Goldenholz
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358
Fax: 617-726-7422
--
Daniel Goldenholz
-
Cell: 617-935-9421  http://people.bu.edu/danielg/
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-08 Thread Bruce Fischl
Hi Daniel,
don't use Euclidean distance. Use the length of the great circle 
connecting each point to the central vertex on the ?h.sphere surface.

Bruce
On 
Tue, 8 Mar 2005, Daniel Goldenholz wrote:

Doug
I was thinking of trying something like that.
If I took all vertices which are a radius M or less from my centriod, aren't 
I basically done?
(M is defined as the maximum euclidean distance between the centroid on the 
sphere and the ring of outer vertices. If my surface distance max is called 
R, I can use some geometry to figure out the relation between R and M)

What tweaks would I need to do at the folded surface level?
On Tue, 8 Mar 2005, Doug Greve wrote:
You might try starting off with the ?h.sphere. It's easy to parameterize
these things on the sphere. The sphere, of course, has some metric
distortion, but if the patch is small, it might not be to bad. Once
you've identified the vertices in the patch (or maybe a slightly bigger
patch), then you can refine it in the folded space.
doug
Daniel Goldenholz wrote:
Hi. I have a graph theory question:
I would like to make a definition of a particular patch of cortex, that
has a centroid at position (x,y,z) and has a total area of A.
I thought that this was going to be somewhat hard, but I soon learned 
that
it is very hard.

First, I found some code for the Dijkstra algorithm, which can quickly
tell me what is the minimum number of jumps needed from one vertex to
another. IF the freesurfer surface triangles were all of EXACTLY the 
same
euclidean distances on each side, then this alone could solve my 
problem.
I could simply take all vertices which have a jump distance less than
some number.

However, because the side lengths of the triangles in a freesurfer 
surface
are NOT the same, I need to get more sophisticated.

Ideally, what I would like is the following:
If I were an ant, walking along on the surface of the folded
brain, I could walk from the centroid in any direction for a certain
distance, and still be within my "patch."
Knowing that distance (radius), I could just use pi*r^2 and call
that the area of the patch.
But how do I find this idealized patch in real life?
Thanks
Daniel Goldenholz
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358
Fax: 617-726-7422

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-09 Thread Daniel Goldenholz
Hi Bruce
Yes, I'm sorry I wasn't clear in my previous posting. I think that you and 
I are talking about the same thing...

The surface distance along the sphere from my vertex point... let's call 
that arc length. So I want to have all freesurfer points which are less 
than or equal to an arc length of R. Lets now consider the boundary 
condition, where I am looking at only locations that are arc length R. Now 
I could calculate the euclidean distance from vertex to any point on the 
sphere which has exactly arc length R. It turns out that a 
circle is formed on the sphere surface. The euclidean distance that I 
measure is a constant value - M. Therefore, I could identify that boundary 
in another way. I could get the intersection of two spheres: 1 the 
original freesurfer sphere, and 2, a sphere with my vertex at the origin, 
and the radius M. Intersecting these two spheres gives me that same 
boundary. Indeed, if I take all the points from the freesurfer ?h.sphere 
which are inside the second sphere, then I should now have my patch.

Whew. Now the question is this: if I do all that (which I believe is 
equivalent to Bruce's suggestion) then do I correctly generate a patch 
which:
a. has a centroid at my vertex
b. has an area given approximately by pi*R^2
c. from a surface point of view, has radial symmetry
   (meaning an ant could walk in any direction from the centroi
along the surface, and until he reaches distance R, he is
still inside the patch)

?
Thanks
Daniel
On Tue, 8 Mar 2005, Bruce Fischl wrote:
Hi Daniel,
don't use Euclidean distance. Use the length of the great circle connecting 
each point to the central vertex on the ?h.sphere surface.

Bruce
On Tue, 8 Mar 2005, Daniel Goldenholz wrote:
Doug
I was thinking of trying something like that.
If I took all vertices which are a radius M or less from my centriod, 
aren't I basically done?
(M is defined as the maximum euclidean distance between the centroid on 
the sphere and the ring of outer vertices. If my surface distance max is 
called R, I can use some geometry to figure out the relation between R and 
M)

What tweaks would I need to do at the folded surface level?
On Tue, 8 Mar 2005, Doug Greve wrote:
You might try starting off with the ?h.sphere. It's easy to parameterize
these things on the sphere. The sphere, of course, has some metric
distortion, but if the patch is small, it might not be to bad. Once
you've identified the vertices in the patch (or maybe a slightly bigger
patch), then you can refine it in the folded space.
doug
Daniel Goldenholz wrote:
Hi. I have a graph theory question:
I would like to make a definition of a particular patch of cortex, 
that
has a centroid at position (x,y,z) and has a total area of A.

I thought that this was going to be somewhat hard, but I soon learned 
that
it is very hard.

First, I found some code for the Dijkstra algorithm, which can quickly
tell me what is the minimum number of jumps needed from one vertex to
another. IF the freesurfer surface triangles were all of EXACTLY the 
same
euclidean distances on each side, then this alone could solve my 
problem.
I could simply take all vertices which have a jump distance less than
some number.

However, because the side lengths of the triangles in a freesurfer 
surface
are NOT the same, I need to get more sophisticated.

Ideally, what I would like is the following:
If I were an ant, walking along on the surface of the folded
brain, I could walk from the centroid in any direction for a certain
distance, and still be within my "patch."
Knowing that distance (radius), I could just use pi*r^2 and 
call
that the area of the patch.

But how do I find this idealized patch in real life?
Thanks
Daniel Goldenholz
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358
Fax: 617-726-7422


--
Daniel Goldenholz
-
Cell: 617-935-9421  http://people.bu.edu/danielg/
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-09 Thread Doug Greve


The sphere-based patch will change size and shape a little when you map
it back to the folded surface due to metric distortion. So you could
refine it some, eg, run your Dijstra algorithm on just the patch. I
would not expect the distortion to make much of a difference, so it's
probably not worth the trouble.

dougx

Daniel Goldenholz wrote:
> 
> Doug
> 
> I was thinking of trying something like that.
> If I took all vertices which are a radius M or less from my centriod,
> aren't I basically done?
> (M is defined as the maximum euclidean distance between the centroid on
> the sphere and the ring of outer vertices. If my surface distance max is
> called R, I can use some geometry to figure out the relation between R and
> M)
> 
> What tweaks would I need to do at the folded surface level?
> 
> On Tue, 8 Mar 2005, Doug Greve wrote:
> 
> >
> > You might try starting off with the ?h.sphere. It's easy to parameterize
> > these things on the sphere. The sphere, of course, has some metric
> > distortion, but if the patch is small, it might not be to bad. Once
> > you've identified the vertices in the patch (or maybe a slightly bigger
> > patch), then you can refine it in the folded space.
> >
> > doug
> >
> >
> > Daniel Goldenholz wrote:
> >>
> >> Hi. I have a graph theory question:
> >>
> >> I would like to make a definition of a particular patch of cortex, that
> >> has a centroid at position (x,y,z) and has a total area of A.
> >>
> >> I thought that this was going to be somewhat hard, but I soon learned that
> >> it is very hard.
> >>
> >> First, I found some code for the Dijkstra algorithm, which can quickly
> >> tell me what is the minimum number of jumps needed from one vertex to
> >> another. IF the freesurfer surface triangles were all of EXACTLY the same
> >> euclidean distances on each side, then this alone could solve my problem.
> >> I could simply take all vertices which have a jump distance less than
> >> some number.
> >>
> >> However, because the side lengths of the triangles in a freesurfer surface
> >> are NOT the same, I need to get more sophisticated.
> >>
> >> Ideally, what I would like is the following:
> >> If I were an ant, walking along on the surface of the folded
> >> brain, I could walk from the centroid in any direction for a certain
> >> distance, and still be within my "patch."
> >> Knowing that distance (radius), I could just use pi*r^2 and call
> >> that the area of the patch.
> >>
> >> But how do I find this idealized patch in real life?
> >>
> >> Thanks
> >> Daniel Goldenholz
> >> ___
> >> Freesurfer mailing list
> >> Freesurfer@nmr.mgh.harvard.edu
> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> >
> > --
> > Douglas N. Greve, Ph.D.
> > MGH-NMR Center
> > [EMAIL PROTECTED]
> > Phone Number: 617-724-2358
> > Fax: 617-726-7422
> >
> 
> --
> Daniel Goldenholz
> -
> Cell: 617-935-9421  http://people.bu.edu/danielg/

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Making a patch of area A

2005-03-09 Thread Rutvik Desai

Hello,

You may prefer to write your own code for calculating the patch, but
I thought I would just mention that this functionality is implemented
in Caret (http://brainmap.wustl.edu/resources/caretnew.html). Caret
can read FreeSurfer surfaces. It will calculate the distance of all
nodes from a given seed node, along your chosen surface. Then it is easy
to select all nodes at or within a certain radius.

best,
Rutvik

On Wed, 9 Mar 2005, Daniel Goldenholz wrote:

> Hi Bruce
>
> Yes, I'm sorry I wasn't clear in my previous posting. I think that you and
> I are talking about the same thing...
>
> The surface distance along the sphere from my vertex point... let's call
> that arc length. So I want to have all freesurfer points which are less
> than or equal to an arc length of R. Lets now consider the boundary
> condition, where I am looking at only locations that are arc length R. Now
> I could calculate the euclidean distance from vertex to any point on the
> sphere which has exactly arc length R. It turns out that a
> circle is formed on the sphere surface. The euclidean distance that I
> measure is a constant value - M. Therefore, I could identify that boundary
> in another way. I could get the intersection of two spheres: 1 the
> original freesurfer sphere, and 2, a sphere with my vertex at the origin,
> and the radius M. Intersecting these two spheres gives me that same
> boundary. Indeed, if I take all the points from the freesurfer ?h.sphere
> which are inside the second sphere, then I should now have my patch.
>
> Whew. Now the question is this: if I do all that (which I believe is
> equivalent to Bruce's suggestion) then do I correctly generate a patch
> which:
> a. has a centroid at my vertex
> b. has an area given approximately by pi*R^2
> c. from a surface point of view, has radial symmetry
> (meaning an ant could walk in any direction from the centroi
>  along the surface, and until he reaches distance R, he is
>  still inside the patch)
>
> ?
>
>
> Thanks
>
> Daniel
>
> On Tue, 8 Mar 2005, Bruce Fischl wrote:
>
> > Hi Daniel,
> >
> > don't use Euclidean distance. Use the length of the great circle connecting
> > each point to the central vertex on the ?h.sphere surface.
> >
> > Bruce
> >
> > On Tue, 8 Mar 2005, Daniel Goldenholz wrote:
> >
> >> Doug
> >>
> >> I was thinking of trying something like that.
> >> If I took all vertices which are a radius M or less from my centriod,
> >> aren't I basically done?
> >> (M is defined as the maximum euclidean distance between the centroid on
> >> the sphere and the ring of outer vertices. If my surface distance max is
> >> called R, I can use some geometry to figure out the relation between R and
> >> M)
> >>
> >> What tweaks would I need to do at the folded surface level?
> >>
> >> On Tue, 8 Mar 2005, Doug Greve wrote:
> >>
> >>>
> >>> You might try starting off with the ?h.sphere. It's easy to parameterize
> >>> these things on the sphere. The sphere, of course, has some metric
> >>> distortion, but if the patch is small, it might not be to bad. Once
> >>> you've identified the vertices in the patch (or maybe a slightly bigger
> >>> patch), then you can refine it in the folded space.
> >>>
> >>> doug
> >>>
> >>>
> >>> Daniel Goldenholz wrote:
> 
>  Hi. I have a graph theory question:
> 
>  I would like to make a definition of a particular patch of cortex,
>  that
>  has a centroid at position (x,y,z) and has a total area of A.
> 
>  I thought that this was going to be somewhat hard, but I soon learned
>  that
>  it is very hard.
> 
>  First, I found some code for the Dijkstra algorithm, which can quickly
>  tell me what is the minimum number of jumps needed from one vertex to
>  another. IF the freesurfer surface triangles were all of EXACTLY the
>  same
>  euclidean distances on each side, then this alone could solve my
>  problem.
>  I could simply take all vertices which have a jump distance less than
>  some number.
> 
>  However, because the side lengths of the triangles in a freesurfer
>  surface
>  are NOT the same, I need to get more sophisticated.
> 
>  Ideally, what I would like is the following:
>  If I were an ant, walking along on the surface of the folded
>  brain, I could walk from the centroid in any direction for a certain
>  distance, and still be within my "patch."
>  Knowing that distance (radius), I could just use pi*r^2 and
>  call
>  that the area of the patch.
> 
>  But how do I find this idealized patch in real life?
> 
>  Thanks
>  Daniel Goldenholz
>  ___
>  Freesurfer mailing list
>  Freesurfer@nmr.mgh.harvard.edu
>  https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> >>>
> >>> --
> >>> Douglas N. Greve, Ph.D.
> >>> MGH-NMR Center
> >>> [EMAIL PROTECTED]
> >>> Phone Number: 617-724-23