Hi everybody,
I am using Freesurfer to measure the cortical thickness, and I was wondering if there was any way to specify the WMFilter Expert Preferences when running recon-all -stage1 from the commandline?
Thanks in advance,
Marie Schaer
what preferences exactly?
On Tue, 8 Mar 2005, Marie Schaer wrote:
Hi everybody,
I am using Freesurfer to measure the cortical thickness, and I was wondering if there was any way to specify the WMFilter Expert Preferences when running recon-all -stage1 from the commandline?
Thanks in advance,
Marie Schaer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The ones in csurf-Expert Preferences Settings Menu, under WMFilter: white low limit and gray high limit.
Thanks,
Marie
Quoting Bruce Fischl fischl@nmr.mgh.harvard.edu:
what preferences exactly?
On Tue, 8 Mar 2005, Marie Schaer wrote:
Hi everybody,
I am using Freesurfer to measure the cortical thickness, and I was
wondering if
there was any way to specify the WMFilter Expert Preferences when running recon-all -stage1 from the commandline?
Thanks in advance,
Marie Schaer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
mri_segment -wm_low <low val> -gray_hi <hi val> <input vol> <output vol>
On Tue, 8 Mar 2005, Marie Schaer wrote:
The ones in csurf-Expert Preferences Settings Menu, under WMFilter: white low limit and gray high limit.
Thanks,
Marie
Quoting Bruce Fischl fischl@nmr.mgh.harvard.edu:
what preferences exactly?
On Tue, 8 Mar 2005, Marie Schaer wrote:
Hi everybody,
I am using Freesurfer to measure the cortical thickness, and I was
wondering if
there was any way to specify the WMFilter Expert Preferences when running recon-all -stage1 from the commandline?
Thanks in advance,
Marie Schaer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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
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
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 greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
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 greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
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 greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
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 greve@nmr.mgh.harvard.edu 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
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 greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
-- Daniel Goldenholz
Cell: 617-935-9421 http://people.bu.edu/danielg/
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
Hi Daniel -
I've implemented and tested a mechanism to "drive" the dijkstra process from a script file. This file contains a set of instructions that are sent, one after the other to a "back-end" process that performs the actual search.
It's a pseudo client/server model. The server is 'dijkstra_p1' that operates on FreeSurfer surfaces. The main client is 'dijk_dscript.py' that parses instructions either from a separate file, or passed directly on the command line. This python script handles the handshaking and synchronisation with the server.
You don't really have to worry about any of that. I've appended a bash script to this email that generates a set of 'dijkstra_p1' instructions, saves them to a file, and calls 'dijk_dscript' on this file - as we spoke about yesterday. This bash script generates several different scripts set about different seed vertices.
Take a look at the file. Most of the code up to line 180 is fluff. The "meat" is between lines 182 and 221. I'm sure you'd be able to adapt / expand this to suit your needs.
If you want to try all this out, let me know and I'll help you set up the prerequisites. I'm occupied with something for the rest of this afternoon, so we can get together tomorrow if you feel like it.
Cheers --R
freesurfer@nmr.mgh.harvard.edu