Re: [Freesurfer] mris_pmake update

2015-01-08 Thread Rudolph Pienaar
I can send you the updated binary. What Linux are you running on? 
CentOS? 32 bit? 64 bit?

Best
-=R

On 1/8/15 09:23 , Francesca Strappini wrote:
> Dear Freesurfer experts,
>
> I'm currently working with Freesurfer 5.3-stable and I would like to
> calculate the geodesic distance between two points.
> I red in the support main-list that in this Freesurfer's version
> 'mris_pmake' might be outdated. How can I get the updated version?
>
> Thanks
>
> Francesca
>
> --
> Francesca Strappini, Ph.D.
> Neurobiology Department
> Weizmann Institute of Science
> 234 Herzl Street, Rehovot 7610001 Israel
> Tel.: +972 58 444 2584
> E-mail: francesca.strapp...@weizmann.ac.il
> <mailto:francesca.strapp...@weizmann.ac.il>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] citation for mris_pmake

2015-08-03 Thread Rudolph Pienaar
Which methods do you mean? 'mris_pmake' essentially uses Dijkstra's 
algorithm -- using FreeSurfer vertices as graph nodes, and the mesh 
connections between vertices as edges. The definition of "edge" can mean 
many things, from simple distance (in which mris_pmake will optimize for 
shortest path along the mesh) to something like curvature which isn't a 
distance metric and in which case mris_pmake will minimize some function 
of curvature along all paths on the mesh.



On 8/1/15 12:49 , SHAHIN NASR wrote:
> Dear Surfer,
>  I want to cite the methods used in mris_pmake command but I can't
> find it in wikisurfer or the help of this command.  Is the method used
> in this command described in a published paper?
>
> Regards
>
> --
> Shahin Nasr
>
> PhD in Cognitive Neuroscience
> Martinos Imaging Center, MGH
> Harvard Medical School
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] Sulc value of given Tal coordinates

2015-09-28 Thread Rudolph Pienaar
Hi Karen --

A given FreeSurfer surface can be thought of as a triangular mesh. This 
mesh contains many "points" (i.e. the vertex points of the constituent 
triangles).

Each of these mesh vertex points contains many internal values, i.e. the 
x, y, z position of the point, the normal to the surface at this point, 
some curvature values at this point, and many more.

Each of these mesh points is also referenced by a single number, its ID 
if you will. If there are 100,000 mesh points, this ID will range in 
value from 0 (the arbitrary first point) to 99,999 (the last point on 
the mesh).

A sulc or curvature file, is simply a long array of sulc or curvature 
values. The index of the array corresponds to the ID of the same indexed 
point on the FreeSurfer surface (there is slightly confusing change in 
that in MatLAB counting of arrays starts at 1, while in FreeSurfer the 
counting starts at 0). So, for example, a file "lh.sulc", is simply a 
long list of values, in order, corresponding to the sulc value at each 
corresponding index location of the surface.

So, in MatLAB, a line like:

[curv, fnum] = read_curv(fname);

and assuming that

fname = '/some/path/to/lh.sulc';

will read the lh.sulc located at the directory spec '/some/path/to/' and 
will return two bits of data. The 'fnum' you can ignore. The 'curv' is 
what you are interested in. It is a MatLAB array (or vector) of, in this 
case, the sulc values.

curv[1] corresponds to the sulc value at the first mesh point (which is 
actually index 0 of the mesh).

curv[2] corresponds to the sulc value at the second mesh point (which is 
actually index 1 of the mesh).

and so on and so forth.

If you set fname to

fname = '/some/path/to/lh.curv';

then the lh.curv file and its values are read and returned as the 
indexed MatLAB vector.

In order to get the sulc and curv at a given tal coordinate, you'd have 
to map the tal coordinate to the index of the point on the FreeSurfer mesh.

HTH
-=R

On 9/28/15 12:31 , Bunday, Karen wrote:
> Hi
>
> I am not a Freesurfer expert or Matlab connoisseur. I am trying to find
> out how to get the Sulc and Curv value for a given  tal coordinate.  I
> was told that you load it in Matlab using read_curv, but how exactly do
> I do this, what does they syntax look like?
>
> I can see in the help this: [curv, fnum] = read_curv(fname)
>
> But I don’t know what I’m supposed to out in here more explicitly.
>
> Thanks
>
> Karen
>
> Karen Bunday, PhD
>
> Honorary Research Associate
>
> Sobell Department of Motor Neuroscience and Movement Disorders
>
> Institute of Neurology, University College London
>
> 33 Queen Square
>
> London
>
> WC1N 3BG
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] mris_calc cluster infos

2016-09-19 Thread Rudolph Pienaar
'mris_calc' is designed to perform be a simple "calculator" that 
performs a set of operations between two operands of the same type. 
These operands are either 3D structures (like volumes) or 1D arrays 
(like curvature files). You can add/subtract/multiply/divide/etc two 
operands.


How would you want to use 'mris_calc' on groups? When you say "mris_calc 
doesn't have a .log as output" do you mean you'd like to use mris_calc 
on two "log" files? Can you explain more what you are trying to do?


Best

-=R


On 18/09/16 10:55, Nick Corriveau Lecavalier wrote:
>
> Hi Freesurfer team,
>
>
> I have a 2 Group (MCI, CTL) x 2 (Time1, Time2) protocol. As suggested 
> in an earlier discussion, I measured the rate atrophy for each group 
> between my two time points. Then I applied the clusterwise correction 
> for multiple comparison, which give a lot of information about each 
> group (for example, number of clusters, # of voxels, regions where 
> there's a significant difference).
>
>
> Then I used mris_calc to compute the difference between my groups.
>
>
> My question is: Is there a way to obtain the same informations on the 
> group difference? Since mris_calc doesn't have a .log as output, I 
> can't compute mris_glmfit-sim on it and I cannot get any infos on the 
> cluster summary.
>
>
> Regards,
>
>
> Nick Corriveau-Lecavalier, B.Sc. (Hons.)
> Étudiant au Ph.D. recherche/intervention, option neuropsychologie clinique
> Coordonateur à la recherche, Association étudiante des cycles 
> supérieurs en psychologie de l'Université de Montréal (AÉCSPUM)
> Université de Montréal
> Centre de recherche de l'Institut universitaire de gériatrie de 
> Montréal, bureau M7819
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


[Freesurfer] Easiest way to resample a volume..?

2013-10-16 Thread Rudolph Pienaar
Hi all --

I have a volume of say 100x100x100 1mm^3 and I'd like to resample it to 
300x300x300 0.33mm^3.

What's the easiest way to do this? Will 'mri_convert' do the trick?

Best
-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Easiest way to resample a volume..?

2013-10-16 Thread Rudolph Pienaar
Perfect! That worked :-)

Thanks

On 10/16/13 16:03 , Juan Eugenio Iglesias wrote:
> Hi Rudolph,
> yes, you can use mri_convert with the flag -vs 0.33 0.33 0.33
> You might want to play with -rt as well to switch from linear to cubic 
> resampling.
> Cheers,
> /Eugenio
>
>
> On 10/16/2013 03:36 PM, Rudolph Pienaar wrote:
>> Hi all --
>>
>> I have a volume of say 100x100x100 1mm^3 and I'd like to resample it to
>> 300x300x300 0.33mm^3.
>>
>> What's the easiest way to do this? Will 'mri_convert' do the trick?
>>
>> Best
>> -=R
>>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Easiest way to resample a volume..?

2013-10-16 Thread Rudolph Pienaar
Thanks, Jon -- although the '-ds' seems depreciated:

[paris:x86_64-Linux-chb-fs-stable]...olphpienaar/tmp$>mri_convert -vs 1 
1 1 -ds 0.25 0.25 0.25 BM05_recon.nii BM05_recon3.nii
mri_convert -vs 1 1 1 -ds 0.25 0.25 0.25 BM05_recon.nii BM05_recon3.nii

mri_convert: unknown flag "-ds"

type mri_convert -u for usage



On 10/16/13 16:07 , Jon Wieser wrote:
> mri_convert can change the voxel resolution for you
>
>
> mri_convert  -vs 1 1 1 -ds 0.33 0.33 0.33  
>
>
> see the help:
> https://surfer.nmr.mgh.harvard.edu/pub/docs/html/mri_convert.help.xml.html
>
> Jon
>
> - Original Message -
> From: "Rudolph Pienaar" 
> To: freesurfer@nmr.mgh.harvard.edu
> Sent: Wednesday, October 16, 2013 2:36:37 PM
> Subject: [Freesurfer] Easiest way to resample a volume..?
>
> Hi all --
>
> I have a volume of say 100x100x100 1mm^3 and I'd like to resample it to
> 300x300x300 0.33mm^3.
>
> What's the easiest way to do this? Will 'mri_convert' do the trick?
>
> Best
> -=R
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] mris_calc recon-all problem

2013-11-27 Thread Rudolph Pienaar
Not sure if it's relevant, but the syntax for mris_calc in this case is:

mris_calc -o   mul 

Your log is missing  so the syntax doesn't make sense and 
mris_calc will fail...

On 11/27/13, 18:10 , Douglas N Greve wrote:
>
> Does it happen on every subject? Any chance that the disk is full?
>
> On 11/27/2013 07:43 AM, Johnson, Eileanoir wrote:
>>
>> Hi there,
>>
>> I am currently trying to run freesurfer version 5.3.0 on a cluster and
>> am encountering an error when running recon-all.
>>
>> The error is:
>>
>> Writing to ./tmp.mri_nu_correct.mni.2867/output.mean.dat
>>
>> mri_segstats done
>>
>> mris_calc -o ./tmp.mri_nu_correct.mni.2867/nu2.mnc
>> ./tmp.mri_nu_correct.mni.2867/nu2.mnc mul
>>
>> Linux blue34 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:28:30 EDT 2009
>> x86_64 x86_64 x86_64 GNU/Linux
>>
>> recon-all -s 22057 exited with ERRORS at Wed Nov 27 12:31:54 GMT 2013
>>
>> Does anyone know what might be causing recon-all to exit at this
>> point? I have attached the full log file.
>>
>> Thanks,
>>
>> Eli
>>
>> Eli Johnson
>> Research Assistant, Track-On
>> UCL Institute of Neurology, Box 104 Queen Square, London, WC1N 3BG
>> Tel:+44(0)207 242 0038
>>
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] basic math operations for volume labels?

2014-02-06 Thread Rudolph Pienaar
'mris_calc' accepts as inputs volumes or "curvature" files. Calculations 
on labels don't make sense in the context for which "mris_calc" was 
written -- what would an operation like "label1 multiply-by label2" even 
mean?

Having said that, 'mris_calc' does support labels in as much as using a 
label as a filter or ROI on which to do some calculation.

What you're looking to do, i.e. process labels and filter out 
non-overlapping from overlapping, isn't supported by 'mris_calc'.


On 2/6/14, 13:09 , Kami Koldewyn wrote:
> As far as I can tell - and I may very well be using incorrect syntax -
> mris_calc needs volumes as inputs and does not accept labels.  Does
> mris_calc accept label files as inputs, for instance in a command like:
> "mris_calc roi2.label and roi3.label"? If so, could someone point me at
> the correct syntax to use?
>
>
> Thanks,


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



[Freesurfer] reading colorized labels in tcl file to tksurfer...

2014-04-03 Thread Rudolph Pienaar
Hi all --

I have a process that generates a list of ROIs (from aparc.annot) based 
on some cost condition. I wanted to view these labeled ROIs in 
'tksurfer'. I created the following rough tcl script:

'label_load.tcl'

set label lh.bankssts.label ; read_and_color_labeled_vertices 255 255 0
set label lh.caudalanteriorcingulate.label ; 
read_and_color_labeled_vertices 255 255 10
set label lh.caudalmiddlefrontal.label ; read_and_color_labeled_vertices 
255 255 20
set label lh.cuneus.label ; read_and_color_labeled_vertices 255 255 30
set label lh.inferiorparietal.label ; read_and_color_labeled_vertices 
255 255 40
set label lh.lateraloccipital.label ; read_and_color_labeled_vertices 
255 255 50

and then ran with

tksurfer-tcl label_load.tcl

The labels all load, but they are all the same teal-like color. I'm 
guessing that I am using the wrong tksurfer internal command... I have 
looked through the wiki, but didn't immediately see a solution.

Help?

Best
-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] reading colorized labels in tcl file to tksurfer...

2014-04-07 Thread Rudolph Pienaar
Hey Doug --

I ended up doing something like this, which worked:

labl_load rh.G_and_S_paracentral.label ; labl_set_color 0 255 255 0
labl_load rh.G_front_inf-Opercular.label ; labl_set_color 1 255 255 15
labl_load rh.G_insular_short.label ; labl_set_color 2 255 255 30
labl_load rh.G_occipital_sup.label ; labl_set_color 3 255 255 45
labl_load rh.G_oc-temp_med-Lingual.label ; labl_set_color 4 255 255 60



On 4/4/14, 15:50 , Douglas N Greve wrote:
>
> You can use mris_label2annot to create an annotation and then control
> the colors via the ctab
> doug
>
> On 04/03/2014 09:13 AM, Rudolph Pienaar wrote:
>> Hi all --
>>
>> I have a process that generates a list of ROIs (from aparc.annot) based
>> on some cost condition. I wanted to view these labeled ROIs in
>> 'tksurfer'. I created the following rough tcl script:
>>
>> 'label_load.tcl'
>>
>> set label lh.bankssts.label ; read_and_color_labeled_vertices 255 255 0
>> set label lh.caudalanteriorcingulate.label ;
>> read_and_color_labeled_vertices 255 255 10
>> set label lh.caudalmiddlefrontal.label ; read_and_color_labeled_vertices
>> 255 255 20
>> set label lh.cuneus.label ; read_and_color_labeled_vertices 255 255 30
>> set label lh.inferiorparietal.label ; read_and_color_labeled_vertices
>> 255 255 40
>> set label lh.lateraloccipital.label ; read_and_color_labeled_vertices
>> 255 255 50
>>
>> and then ran with
>>
>>  tksurfer-tcl label_load.tcl
>>
>> The labels all load, but they are all the same teal-like color. I'm
>> guessing that I am using the wrong tksurfer internal command... I have
>> looked through the wiki, but didn't immediately see a solution.
>>
>> Help?
>>
>> Best
>> -=R
>>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] FreeSurfer Ubuntu Server

2015-10-01 Thread Rudolph Pienaar
Yes, FreeSurfer can be installed on Ubuntu without any issues. There is 
also no functional difference between Ubuntu server and Ubuntu Desktop.

Do you have a compelling reason for wanting to use Ubuntu 12.04? It was 
released in 2012 and is rather ancient in Ubuntu terms. The current 
version of Ubuntu is 15.04 and in fact 15.10 is about to released in 
three weeks.

I'd strongly recommend you update to a modern Ubuntu.

Having said that, certainly on Ubuntu 14.04 and above, once installed 
you need to simply symlink some libraries since the versions FreeSurfer 
has been compiled against are depreciated on Ubuntu 14.04 and later.

In a terminal, simply type (make sure that each command is on a single 
line -- the email formatting might have split it in two):

For Trackvis and dtk

sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5 
/usr/lib/x86_64-linux-gnu/libtiff.so.3

sudo ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2.0.2 
/usr/lib/x86_64-linux-gnu/libmng.so.1

For FreeSurfer:

sudo ln -s /usr/lib/x86_64-linux-gnu/libvnl_algo.so 
/usr/lib/x86_64-linux-gnu/libvnl_algo.so.1.14

sudo ln -s /usr/lib/x86_64-linux-gnu/libvnl.so 
/usr/lib/x86_64-linux-gnu/libvnl.so.1.14

sudo ln -s /usr/lib/x86_64-linux-gnu/libv3p_netlib.so 
/usr/lib/x86_64-linux-gnu/libv3p_netlib.so.1.14

HTH
-=R

On 10/1/15 15:58 , Bruno LAD wrote:
> Hi, could you help me please, because a couldn't find the answer for my
> question in the wiki.
>
> Can FreeSurfer be installed on ubuntu server 12.04? How can I do it, if
> it's possible?
>
>
> Thank you.
>
> --
> Best Regards
> Bruno Bragança Mendes
> Laboratório de Alto Desempenho LAD/PUCRS
> Av. Ipiranga, 6681 - Prédio 32 Térreo - Sala 120
> +55 51 33538001 
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] FreeSurfer Ubuntu Server

2015-10-02 Thread Rudolph Pienaar
Your best bet I fear might be to try and build FreeSurfer yourself on 
your specific distro of Ubuntu.


https://surfer.nmr.mgh.harvard.edu/fswiki/ReadOnlyCVS

While not impossible (we have done this), it does require some detailed 
knowledge of Linux in general and Ubuntu in particular as you will have 
to resolve all the required dependencies and adapt the build commands 
accordingly. Still compiling your own FreeSurfer  will mean that there 
will be no library version conflicts which is what most likely will 
happen in the case of running the CentOS version on Ubuntu. And once you 
compile your own version from source, it will run on all your cluster 
nodes w/o issues.


If you use a binary version (like the CentOS build), you would have to 
execute the instructions I presented (i.e. the synlinks) on *every* 
cluster node.


CentOS, like Ubuntu, is a distribution of Linux. That means that they 
are all Linux, but differ in the type and versions of various 
applications and libraries. CentOS is typically more conservative and 
generally has older versions of libraries than Ubuntu. Since the 
distributed FreeSurfer is dynamically compiled against the installation 
of CentOS at the NMR, it expects very specific version numbers on 
various system libraries. Usually these versions are no longer bundled 
on other more agile distributions like Ubuntu. Thankfully, it is usually 
sufficient to "trick" the various CentOS FreeSurfer apps on Ubuntu by 
simply making a symbolic from an existing system library to the 
name/version the FreeSurfer app expects. This is a "hack" and not 
guaranteed to always work. Having said that, the CentOS build of 
FreeSurfer works fine on Ubuntu 14.04+ using the link commands I listed 
earlier.


All you need to do is Just download the CentOS version and try those 
link command. Although, I'm not 100% sure about Ubuntu 12.04. As I said, 
those link instructions are valid for Ubuntu 14.04 and above, so your 
mileage might vary. Also, you will need to have root access on each 
machine that you want to run those commands on. In the case of a 
cluster, this would mean running those command (as sudo) on *all* 
cluster nodes.  Unless you are the cluster administrator, this might be 
difficult (or impossible) to do.


It might be that the best option for you is to roll your own FreeSurfer 
by compiling it from source in your environment.


HTH
-=R

On 10/02/2015 10:53 AM, Bruno LAD wrote:

Thanks for you reply, Rudolph.

We have a cluster environment in our university, and the best Ubuntu 
version to us for now is Ubuntu 12.04 (in a closest future we will 
update to a newer version, but not now...).


In the download page there is only FreeSurfer for CentOS, Mac and a 
Virtual Machine of Xubuntu, but not to Ubuntu. ( 
https://surfer.nmr.mgh.harvard.edu/fswiki/Download )


I couldn't find the binaries to compile, too. I've looked at ( 
http://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/ ).


To me the best choice is the binaries or the compiled source (not apt, 
yum, etc..) , because we put all applications in "/usr/local".



Could you help me to find one of these options to download?


Thanks again

--
Att,
Bruno Bragança Mendes
Laboratório de Alto Desempenho LAD/PUCRS
Av. Ipiranga, 6681 - Prédio 32 Térreo - Sala 120
+55 51 33538001 

2015-10-01 18:40 GMT-03:00 Rudolph Pienaar <mailto:rudolph@gmail.com>>:


Yes, FreeSurfer can be installed on Ubuntu without any issues.
There is
also no functional difference between Ubuntu server and Ubuntu
Desktop.

Do you have a compelling reason for wanting to use Ubuntu 12.04?
It was
released in 2012 and is rather ancient in Ubuntu terms. The current
version of Ubuntu is 15.04 and in fact 15.10 is about to released in
three weeks.

I'd strongly recommend you update to a modern Ubuntu.

Having said that, certainly on Ubuntu 14.04 and above, once installed
you need to simply symlink some libraries since the versions
FreeSurfer
has been compiled against are depreciated on Ubuntu 14.04 and later.

In a terminal, simply type (make sure that each command is on a single
line -- the email formatting might have split it in two):

For Trackvis and dtk

sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5
/usr/lib/x86_64-linux-gnu/libtiff.so.3

sudo ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2.0.2
/usr/lib/x86_64-linux-gnu/libmng.so.1

For FreeSurfer:

sudo ln -s /usr/lib/x86_64-linux-gnu/libvnl_algo.so
/usr/lib/x86_64-linux-gnu/libvnl_algo.so.1.14

sudo ln -s /usr/lib/x86_64-linux-gnu/libvnl.so
/usr/lib/x86_64-linux-gnu/libvnl.so.1.14

sudo ln -s /usr/lib/x86_64-linux-gnu/libv3p_netlib.so
/usr/lib/x86_64-linux-gnu/libv3p_netlib.so.1.14

HTH
-=R

On 10/1/15 15:58 , Bruno LAD wrote:
> Hi, could you help me please, because a couldn't find the answer
for my
   

Re: [Freesurfer] Building from source -- autoconf error

2016-02-19 Thread Rudolph Pienaar
I have been able to build the FS GUI tools succesfully on Ubuntu in the 
past... Admittedly this was a long time ago (pre 14.04 days). I can dig 
through my notes and see if they are still applicable. We no longer have 
any Ubuntu 14.04 boxes -- we're currently on 15.10 ... which I suppose 
in a few weeks will be superseded by 16.04's release.


On 2/19/16 12:45 , Z K wrote:
> Hello Yaroslav,
>
> Ive built freesurfer on Debian "Jessie" platform. It was just a matter
> of adding "libtool-bin" and "tcsh" to the list of packages that need to
> be installed. Ive update the wiki page:
>
>
> https://surfer.nmr.mgh.harvard.edu/fswiki/freesurfer_linux_developers_page
>
> I still wasnt quite able to get the freeview GUI to build. But If you
> change the "--disable-GUI-build" flag to "--without-qt" then you will
> get all the tktool GUIs except freeview. Im working on getting freeview
> to build at the moment and will update the wiki page once I figure it out.
>
> -Zeke
>
>
>
>
> On 02/18/2016 05:04 PM, Yaroslav Halchenko wrote:
>> Gotcha, thanks!
>>
>> On February 18, 2016 3:27:21 PM EST, Z K  
>> wrote:
>>>
>>>> I would be infinitely grateful if freesurfer could build natively on
>>> Debian
>>>> stable! ;)  Thanks for trying.  In my case I am trying the build
>>> under jessie
>>>> chroot (using schroot helper), so I could quickly setup/enter such
>>> environment
>>>> while maintaining user/directory.  I will do the same now for 14.04.
>>> If you
>>>> would like more -- let me know I could give a bit more detailed
>>>> instructions.
>>>>
>>>
>>> I have a debian jessie system just setup, but I have a high priority
>>> project due Monday, so I would be able to begin determining the exact
>>> build procedure on Debian jessie until beginning of next week. It is
>>> something I have been meaning to do so I plan on getting to it. If you
>>> dont hear from me by Tuesday/Wedensday feel free to shoot me an email
>>> for an update. Thanks.
>>>
>>> -Zeke
>>>
>>>
>>> The information in this e-mail is intended only for the person to whom
>>> it is
>>> addressed. If you believe this e-mail was sent to you in error and the
>>> e-mail
>>> contains patient information, please contact the Partners Compliance
>>> HelpLine at
>>> http://www.partners.org/complianceline . If the e-mail was sent to you
>>> in error
>>> but does not contain patient information, please contact the sender and
>>> properly
>>> dispose of the e-mail.
>>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] mri_convert mgz to nifti

2013-06-04 Thread Rudolph Pienaar
The command is 'mri_convert' not 'Mri_convert'  -- at least on case 
sensitive filesystems (like Linux and some-but-not-all Mac OS X).

On 6/4/13 10:46 , Ray, Siddharth wrote:
>
> Hi all,
>
> I just want to convert .mgz files to .nifti using mri_convert, do I 
> have to flip my image when I do that using RAS ? or I should simply use:
>
> Mri_convert  input_file_name.mgz  output_file_name.nii
>
> Thanks in advance,
>
> Siddharth
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] mris_calc erroe in recon-all

2013-09-12 Thread Rudolph Pienaar
The error would indicate that the number of elements in 'lh.area' and 
'lh.area.pial' are not the same. You can check this also with mris_calc:

mris_calc lh.area stats

mris_calc lh.area.pial stats

which will provide some basic statistical output, including the size 
(i.e. number of elements) of each. The sizes have to match in order to add.

HTH
-=R

On 9/12/13 02:56 , std...@virgilio.it wrote:
> Hi list,
>
> I have a problem during recon-all
>
> #@# Surf Volume lh Thu Sep 12 08:25:31 CEST 2013
> /Applications/freesurfer/subjects/subject_prova/Con28/SUBJECTS_DIR/surf
> \n mris_calc -o lh.area.mid lh.area add lh.area.pial \n
>
> mris_calc:
> Sorry, but I seem to have encountered an error.
> While checking on input filetype sizes,
> I found a size mismatch, i.e. len(input1)!=len(input2)
>
> Darwin iMac-di-Stefano.local 12.4.0 Darwin Kernel Version 12.4.0: Wed 
> May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
>
> recon-all -s SUBJECTS_DIR exited with ERRORS at Thu Sep 12 08:25:31 
> CEST 2013
>
> For more details, see the log file 
> /Applications/freesurfer/subjects/subject_prova/Con28/SUBJECTS_DIR/scripts/recon-all.log
> To report a problem, see 
> http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>
>
> Thanks,
>
>
>
> Stefano
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] R: Re: R: Re: mris_calc erroe in recon-all

2013-09-12 Thread Rudolph Pienaar
Hmmm... I'm sorry, but I can't really help/comment on why your specific 
run of recon-all resulted in those two files having different sizes.



On 9/12/13 16:00 , std...@virgilio.it wrote:
> OK. But, I have run a simple command (recon-all) for cortical 
> parcellation.
> I have already used this command for other structural images.
> This is the image features:
> data_type  FLOAT32
> dim1   212
> dim2   320
> dim3   320
> dim4   1
> datatype   16
> pixdim10.800119
> pixdim20.800119
> pixdim30.800119
> pixdim40.010999
> cal_max0.
> cal_min0.
> file_type  NIFTI-1+
>
> Thanks,
>
>
> Stefano
>
>
> Messaggio originale
> Da: rudo...@nmr.mgh.harvard.edu
> Data: 12-set-2013 17.50
> A: 
> Cc: 
> Ogg: Re: R: Re: [Freesurfer] mris_calc erroe in recon-all
>
> The file 'lh.area' contains 126850 elements. The file 'lh.area.pial'
> contains 126355 elements.
>
> You cannot add them together since they have different sizes.
>
> On 9/12/13 11:14 , std...@virgilio.it wrote:
> > Thanks.
> >
> > These are the output
> > [iMac-di-Stefano:Con28/SUBJECTS_DIR/surf] Stefano% mris_calc lh.area 
> stats
> > Size   [ 126850 ]
> >Min@(index)[ -0.322716
> > (56402) ]
> >Max@(index)   [ 12.367171
> > (123284) ]
> >   Mean [ 0.587518 ]
> >Std [ 0.402374 ]
> >Sum [ 74526.703125 ]
> >   Prod [ 0.00 ]
> > [iMac-di-Stefano:Con28/SUBJECTS_DIR/surf] Stefano% mris_calc
> > lh.area.pial stats
> > Size   [ 126355 ]
> >Min@(index) [ 0.00 (97676) ]
> >Max@(index)   [ 22.833410
> > (119901) ]
> >   Mean [ 0.785660 ]
> >Std [ 0.738523 ]
> >Sum [ 99272.054688 ]
> >   Prod [ 0.00 ]
> >
> > but I do not understand what's happen.
> >
> > Stefano
> >
> > Messaggio originale
> > Da: rudo...@nmr.mgh.harvard.edu
> > Data: 12-set-2013 14.49
> > A: 
> > Cc: 
> > Ogg: Re: [Freesurfer] mris_calc erroe in recon-all
> >
> > The error would indicate that the number of elements in 'lh.area' and
> > 'lh.area.pial' are not the same. You can check this also with mris_calc:
> >
> > mris_calc lh.area stats
> >
> > mris_calc lh.area.pial stats
> >
> > which will provide some basic statistical output, including the size
> > (i.e. number of elements) of each. The sizes have to match in order to
> > add.
> >
> > HTH
> > -=R
> >
> > On 9/12/13 02:56 , std...@virgilio.it wrote:
> > > Hi list,
> > >
> > > I have a problem during recon-all
> > >
> > > #@# Surf Volume lh Thu Sep 12 08:25:31 CEST 2013
> > > 
> /Applications/freesurfer/subjects/subject_prova/Con28/SUBJECTS_DIR/surf
> > > \n mris_calc -o lh.area.mid lh.area add lh.area.pial \n
> > >
> > > mris_calc:
> > > Sorry, but I seem to have encountered an error.
> > > While checking on input filetype sizes,
> > > I found a size mismatch, i.e. len(input1)!=len(input2)
> > >
> > > Darwin iMac-di-Stefano.local 12.4.0 Darwin Kernel Version 12.4.0: Wed
> > > May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
> > >
> > > recon-all -s SUBJECTS_DIR exited with ERRORS at Thu Sep 12 08:25:31
> > > CEST 2013
> > >
> > > For more details, see the log file
> > >
> > 
> /Applications/freesurfer/subjects/subject_prova/Con28/SUBJECTS_DIR/scripts/recon-all.log
> > > To report a problem, see
> > > http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> > >
> > >
> > > Thanks,
> > >
> > >
> > >
> > > Stefano
> > >
> > >
> > > ___
> > > Freesurfer mailing list
> > > Freesurfer@nmr.mgh.harvard.edu
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> >
> >
> &g

Re: [Freesurfer] R: Re: mris_calc erroe in recon-all

2013-09-12 Thread Rudolph Pienaar
The file 'lh.area' contains 126850 elements. The file 'lh.area.pial' 
contains 126355 elements.

You cannot add them together since they have different sizes.

On 9/12/13 11:14 , std...@virgilio.it wrote:
> Thanks.
>
> These are the output
> [iMac-di-Stefano:Con28/SUBJECTS_DIR/surf] Stefano% mris_calc lh.area stats
>   Size   [ 126850 ]
>Min@(index)[ -0.322716 
> (56402) ]
>Max@(index)   [ 12.367171 
> (123284) ]
>   Mean [ 0.587518 ]
>Std [ 0.402374 ]
>Sum [ 74526.703125 ]
>   Prod [ 0.00 ]
> [iMac-di-Stefano:Con28/SUBJECTS_DIR/surf] Stefano% mris_calc 
> lh.area.pial stats
>   Size   [ 126355 ]
>Min@(index) [ 0.00 (97676) ]
>Max@(index)   [ 22.833410 
> (119901) ]
>   Mean [ 0.785660 ]
>Std [ 0.738523 ]
>Sum [ 99272.054688 ]
>   Prod [ 0.00 ]
>
> but I do not understand what's happen.
>
> Stefano
>
> Messaggio originale
> Da: rudo...@nmr.mgh.harvard.edu
> Data: 12-set-2013 14.49
> A: 
> Cc: 
> Ogg: Re: [Freesurfer] mris_calc erroe in recon-all
>
> The error would indicate that the number of elements in 'lh.area' and
> 'lh.area.pial' are not the same. You can check this also with mris_calc:
>
> mris_calc lh.area stats
>
> mris_calc lh.area.pial stats
>
> which will provide some basic statistical output, including the size
> (i.e. number of elements) of each. The sizes have to match in order to 
> add.
>
> HTH
> -=R
>
> On 9/12/13 02:56 , std...@virgilio.it wrote:
> > Hi list,
> >
> > I have a problem during recon-all
> >
> > #@# Surf Volume lh Thu Sep 12 08:25:31 CEST 2013
> > /Applications/freesurfer/subjects/subject_prova/Con28/SUBJECTS_DIR/surf
> > \n mris_calc -o lh.area.mid lh.area add lh.area.pial \n
> >
> > mris_calc:
> > Sorry, but I seem to have encountered an error.
> > While checking on input filetype sizes,
> > I found a size mismatch, i.e. len(input1)!=len(input2)
> >
> > Darwin iMac-di-Stefano.local 12.4.0 Darwin Kernel Version 12.4.0: Wed
> > May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
> >
> > recon-all -s SUBJECTS_DIR exited with ERRORS at Thu Sep 12 08:25:31
> > CEST 2013
> >
> > For more details, see the log file
> > 
> /Applications/freesurfer/subjects/subject_prova/Con28/SUBJECTS_DIR/scripts/recon-all.log
> > To report a problem, see
> > http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> >
> >
> > Thanks,
> >
> >
> >
> > Stefano
> >
> >
> > ___
> > Freesurfer mailing list
> > Freesurfer@nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> -- 
> Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
> MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
> 149 (2301) 13th Street, Charlestown, MA 02129 USA
>
>
>
> The information in this e-mail is intended only for the person to whom 
> it is
> addressed. If you believe this e-mail was sent to you in error and the 
> e-mail
> contains patient information, please contact the Partners Compliance 
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you 
> in error
> but does not contain patient information, please contact the sender 
> and properly
> dispose of the e-mail.
>
>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] mris_pmake options

2012-10-04 Thread Rudolph Pienaar
Hi Octavian --

On Wed Oct  3 17:43:51 2012, octavian lie wrote:
> mris_pmake --subject A --hemi rh --surface0 sphere.reg --curv0 sulc
> --curv1 sulc --mpmOverlay euclidean --mpmProg pathFind --mpmArgs
> startVertex:1,endVertex:2

That seems about right if you want to use the spherical surface.

> Questions:
> 1. Is the calculated path the geodesic, in this case
> spherical, measure that can be directly compared with that from
> another subject, or not?

The paths are calculated on the *actual* mesh surface. So, if you're 
using a spherical surface (as opposed to say, the 'smoothwm') you're 
getting close to a geodesic but it is not a true geodesic. Still, they 
should be quite usable for your purposes.

> 2. How could I compare the distance on the pial surface  of subject 1
> (vertex 1-vertex 2) to subject 2 (vertex 1 to2). Is changing
> --surface0 argument to pial enough?

Yes, that should work for computing distances on another surface.

(In the Recon-all Dev table,
> sphere.reg is an imput to generating label/?h.aparc.annot, which in
> turn is used to generate ?h.pial surfaces, does that mean that pial
> surfaces from 2 subjects are already registered?)

I'm not sure about your logic here. Keep in mind that by registering 
two subjects together you by necessity distort one of them. You should 
probably take care to compute distances on the original surfaces, not 
the registered ones or spherical ones. Plus, I'm not sure that 
registering two surface together allows for such one-to-one vertex 
index translations.

You would probably be better off visually/manually defining analogous 
regions/vertices on the two surfaces and computing the distances 
between those.

> 3. I do not understand the choice of defaults for  --surface0
> (inflated) ,  --surface1 (smoothwm), curve 0 and 1.

This is a historical artifact of earlier use cases for 'mris_pmake'. 
Sorry...  FWIW the current development version of 'mris_pmake' does 
away with '--surface0' and '--surface1' (just using '--surface') and 
the '--curv' flags are depreciated.

>Do I need to change any of the
> auxilliary terms used above with sphere.reg to accomplish what I want
> to accomplish?

No, in your case you should only care about 'surface0'. The 'surface1', 
'curv0', and 'curv1' terms are not relevant to the pathFind/euclidean 
use, and are really just dead appendices.

> 4. Last, is there a way to mark the vertices for these geodesic path
> on the main surface used in order to use then for label creation?

Yes.  Look in the 'options.txt' file and make sure that the 
'b_labelFileSave' flag is set to '1'. The name of the output file can 
be set with the 'labelFile' setting.

> Your insight is very important,
> thank you,
> Octavian.
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Error with mris_calc

2012-10-12 Thread Rudolph Pienaar
In your use case below, the output volumes in each case are 'out.mgz'. 
There should be *no* modifications to binF1.mgz or binF2.mgz. 
'mris_calc' in fact only reads from those files, it does not write to or 
manipulate them in any way.

So I don't completely understand how their contents can be modified. 
Assuming that somehow they are, you can double check with:

 cp binF1.mgz binF1-bak.mgz
 mris_calc -o out.mgz binF1.mgz add binF2.mgz

You report that the above operation has somehow modified binF1.mgz -- if 
so, then

 mris_calc -o out.mgz binF1.mgz sub binF1-bak.mgz

should result in a volume with non-zero elements. Can you check if that 
is the case?


>> To debug, I added the two volumes
>> mris_calc -o out.mgz binF1.mgz add binF2.mgz
>> I was surprise to see that one of the volumes (binF1) is shifted of tens
>> of voxels along an axis.
>> When doing
>> mris_calc -o out.mgz binF2.mgz add binF1.mgz,
>> the binF2 is shifted.
>>



-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] fscalc / mris_calc problem

2012-12-31 Thread Rudolph Pienaar
Hi Fred --

I'm currently traveling and have limited internet connectivity. I'll be back at 
the office later in the week and will take a look then.

In the meantime, has this ever worked for you previously? I know that older 
versions of 'mris_calc' were somewhat particular about filename lengths and 
filename conventions, and you might be seeing the same bug here...

Best
-=R

Sent from my iPad

On Dec 28, 2012, at 7:50, Fred Lado  wrote:

> Hi FreeSurfer Gurus,
>   I am having difficulty invoking the 'upl' and 'lrl' operations in 
> mris_calc. The following is the message I get for 'upl':
> 
> /usr/local/freesurfer/bin/fscalc rh.dat.mgh upl 20 --o tmp.mgh
> 
> freesurfer-Darwin-leopard-i686-stable-pub-v5.1.0
> Darwin Fred-Lados-MacBook-Pro.local 12.2.0 Darwin Kernel Version 12.2.0: Sat 
> Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
> mri_convert rh.dat.mgh ./tmpdir.fscalc.5004/tmp.mgh
> mri_convert rh.dat.mgh ./tmpdir.fscalc.5004/tmp.mgh 
> $Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
> reading from rh.dat.mgh...
> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
> i_ras = (-1, -0, 0)
> j_ras = (-0, -1, 0)
> k_ras = (-0, -0, -1)
> writing to ./tmpdir.fscalc.5004/tmp.mgh...
> --
> mris_calc -o ./tmpdir.fscalc.5004/tmp.mgh ./tmpdir.fscalc.5004/tmp.mgh upl 20
> Unknown operation upl failed.
> 
> No such file or directory
> 
> Fred Lado, MD PhD
> Director, Neurology Service - Moses & North Divisions
> Director, EEG Laboratory
> Associate Clinical Professor of Neurology
> Montefiore Medical Center 
> 718-920-8499 office
> 718-324-3730 fax
> email: ladof...@gmail.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] fscalc / mris_calc problem

2013-01-03 Thread Rudolph Pienaar
That error typically means you're trying to run a binary file compiled 
for a different architecture (i.e. running a Linux binary on a Mac or 
vice versa).

You can easily check what 'mris_calc' is compiled for.

# On a Mac:
$>cd $FREESURFER_HOME/bin
$>file mris_calc
mris_calc: Mach-O 64-bit executable x86_64

# On Linux:
$>cd $FREESURFER_HOME/bin
$>file mris_calc
mris_calc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.24, 
BuildID[sha1]=0x9323298c405a28417aa0700d979713651437a416, not stripped

Can you confirm what architecture your 'mris_calc' is compiled for?

Best
-=R


On 1/3/13 13:38 , Fred Lado wrote:
> Thank Nick, when I try mris_calc, I get the following error:
>
> /Users/Lado 1> mris_calc
> /usr/local/freesurfer/bin/mris_calc: Exec format error. Binary file not 
> executable.
>
> I applied chmod/chown/chgrp to the executable files to resemble the other 
> freesurfer executables, the prior mris_calc file was renamed to 
> mris_calc.old, shown below for comparison:
>
> /Users/Lado 10> ls -l /usr/local/freesurfer/bin/mris_calc*
> -rwxr-xr-x  1 root  wheel  5936512 Aug 13 19:53 
> /usr/local/freesurfer/bin/mris_calc
> -rwxr-xr-x  1 root  wheel  5903448 May 26  2011 
> /usr/local/freesurfer/bin/mris_calc.old
>
> Not sure what I'm missing, any suggestions?
> -Fred
>

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Downsampling/decimating overlays (not surfaces)

2013-01-24 Thread Rudolph Pienaar
If you specifically want to project overlays onto 'mris_decimate'd 
surfaces, you won't be able to do that. You could, however, generate new 
overlays using the decimated surface, if that's helpful, using 
'mris_curvature_stats' and feeding it the newly downsampled/demicated 
surface as input.

FWIW.

Best
-=R

On 1/23/13 18:07 , Nicola Toschi wrote:
> Hello list,
>
> is there a quick way to decimate an overlay /while respecting surface 
> geomery)? I am looking to downsample by about a factor 100.
>
> Alternatively, I know I can use mris_decimate to downsample a surface, 
> but I would have to project my highres overlays onto the downsampled 
> surface (which may not be straightforward).
>
> Thanks a lot in advance,
>
> Nicola
>
> PS apologies for the repost - my subject line was incorrect the first 
> time around.
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] mris_pmake

2013-01-30 Thread Rudolph Pienaar
Hi Andrew --

First the good news:

Indeed, there is a much simpler (and quicker way):

  mris_pmake --subj  --hemi  --surface  
--mpmProg autodijk --mpmArgs vertexPolar:0 --mpmOverlay euclidean

If called with hemi=lh and surface=smoothwm, it will create an output 
overlay called lh.autodijk.crv. Each index in the overlay will have a 
value equal to the shortest distance along the edges of the lh.smoothwm 
from a start (or polar) vertex, in this case 0, to that particular 
vertex index in the overlay.

The whole operation (including reading all the necessary inputs) takes 
about 10 seconds on a current-ish Linux workstation (with bogoMips -- 
type "cat /proc/cpuinfo" and look for bogomips -- of about 5000)

Now the bad news:

* The version of 'mris_pmake' in FreeSurfer stable (5.1) is horribly 
old. And broken. For a start, notice that the all the --surface0 
--curv0 --curv1 arguments are no longer required.

* The 5.1 version of mris_pmake moreover has a bug in the euclidean 
overlay code that means it won't work.

Better news:

* This is all fixed in 5.2 and the above command line I gave will work 
as advertised.

* If you can't wait for the new FS, I'm sure we can send you a compiled 
"preview" binary of 'mris_pmake' that will work.

* I really really need to update the documentation on mris_pmake... I'd 
really like to have that ready for the 5.2 release.

On Tue Jan 29 17:20:05 2013, Andrew Bock wrote:
> Dear all,
>
> I am trying to calculate the distance from a reference vertex to all
> other vertices in a surface mesh (or ideally to a subset of vertices),
> moving along the actual surface (e.g. smoothwm).
>
> I am able to loop through the pairs of vertices in which I'm
> interested, using mris_pmake in each loop, but this is quite time
> consuming.  I have tried using '--mpmProg autodijk' as described in
> the mris_pmake help file, but have been unsuccessful at getting this
> command to work.
>
> The current code I am using for each pair is:
>
> mris_pmake --subject  --surface0 smoothwm --curv0 sulc
> --curv1 sulc --mpmOverlay euclidean --mpmProg pathFind --mpmArgs
> startVertex:###,endVertex:###
>
> Any suggestions to cut down my processing time, while still
> calculating along the surface, would be greatly appreciated.
>
> Andrew
>
>
> ___________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] labels to lobes

2013-02-28 Thread Rudolph Pienaar
After a conventional FS run you can do the following:

$>mri_annotation2label --subject  --hemi  --lobesStrict 
.lobesStrict.annot

Which will create an annotation file .lobesStrict.annot 
containing the lobar labels. To extract these into their own individual 
label files, do

$>mri_annotation2label --subject  --hemi  --annotation 
lobesStrict --outdir /label

This will populate the /label directory with files:

.frontal.label
.parietal.label
.temporal.label
.occiptal.label
.cingulate.label

So, to be pendantic, if you want the lobar labels for the left 
hemisphere of a subject called 'sub1', you would

$>mri_annotation2label --subject sub1 --hemi lh --lobesStrict 
lh.lobesStrict.annot
$>mri_annotation2label --subject sub1 --hemi lh --annotation 
lobesStrict --outdir sub1/label

HTH
-=R


On Thu Feb 28 09:24:58 2013, Sudhin A. Shah wrote:
> Hello,
>
> Is there a lookup table I can use to convert free surfer labels to lobes? 
> Either label nos (1006, 2006 etc) or label names (ctx-rh-superiorfrontal)? I 
> have 86 labels and want an easy way to differentiate them into the 
> corresponding lobes.
>
> Thanks,
> S
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] labels to lobes

2013-02-28 Thread Rudolph Pienaar
It looks like you might be running a too-old version of 
mri_annotation2label. What FS build/version are you running?


On Thu Feb 28 11:36:50 2013, Sudhin A. Shah wrote:
> Hi I got an error -lobesStrict unknown. I am running mri_annotation2label 
> version stable5.
>
> Is there a workaround?
>
> On Feb 28, 2013, at 10:47 AM, Rudolph Pienaar wrote:
>
>> After a conventional FS run you can do the following:
>>
>> $>mri_annotation2label --subject  --hemi  --lobesStrict 
>> .lobesStrict.annot
>>
>> Which will create an annotation file .lobesStrict.annot containing the 
>> lobar labels. To extract these into their own individual label files, do
>>
>> $>mri_annotation2label --subject  --hemi  --annotation 
>> lobesStrict --outdir /label
>>
>> This will populate the /label directory with files:
>>
>> .frontal.label
>> .parietal.label
>> .temporal.label
>> .occiptal.label
>> .cingulate.label
>>
>> So, to be pendantic, if you want the lobar labels for the left hemisphere of 
>> a subject called 'sub1', you would
>>
>> $>mri_annotation2label --subject sub1 --hemi lh --lobesStrict 
>> lh.lobesStrict.annot
>> $>mri_annotation2label --subject sub1 --hemi lh --annotation lobesStrict 
>> --outdir sub1/label
>>
>> HTH
>> -=R
>>
>>
>> On Thu Feb 28 09:24:58 2013, Sudhin A. Shah wrote:
>>> Hello,
>>>
>>> Is there a lookup table I can use to convert free surfer labels to lobes? 
>>> Either label nos (1006, 2006 etc) or label names (ctx-rh-superiorfrontal)? 
>>> I have 86 labels and want an easy way to differentiate them into the 
>>> corresponding lobes.
>>>
>>> Thanks,
>>> S
>>> ___
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>
>>>
>>
>>
>>
>> --
>> Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
>> MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
>> 149 (2301) 13th Street, Charlestown, MA 02129 USA
>>
>>
>>
>> The information in this e-mail is intended only for the person to whom it is
>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>> contains patient information, please contact the Partners Compliance 
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in 
>> error
>> but does not contain patient information, please contact the sender and 
>> properly
>> dispose of the e-mail.
>
>



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] labels to lobes

2013-02-28 Thread Rudolph Pienaar
v5.0.0 is too old. I'd suggest grabbing the current 5.1.0 build and 
then just using the 'mri_annotation2label' from that.



On Thu Feb 28 12:17:02 2013, Sudhin A. Shah wrote:
> freesurfer-Linux-centos4_x86_64-stable-pub-v5.0.0
>
>
> On Feb 28, 2013, at 12:12 PM, Rudolph Pienaar wrote:
>
>> It looks like you might be running a too-old version of
>> mri_annotation2label. What FS build/version are you running?
>>
>>
>> On Thu Feb 28 11:36:50 2013, Sudhin A. Shah wrote:
>>> Hi I got an error -lobesStrict unknown. I am running mri_annotation2label 
>>> version stable5.
>>>
>>> Is there a workaround?
>>>
>>> On Feb 28, 2013, at 10:47 AM, Rudolph Pienaar wrote:
>>>
>>>> After a conventional FS run you can do the following:
>>>>
>>>> $>mri_annotation2label --subject  --hemi  --lobesStrict 
>>>> .lobesStrict.annot
>>>>
>>>> Which will create an annotation file .lobesStrict.annot containing 
>>>> the lobar labels. To extract these into their own individual label files, 
>>>> do
>>>>
>>>> $>mri_annotation2label --subject  --hemi  --annotation 
>>>> lobesStrict --outdir /label
>>>>
>>>> This will populate the /label directory with files:
>>>>
>>>> .frontal.label
>>>> .parietal.label
>>>> .temporal.label
>>>> .occiptal.label
>>>> .cingulate.label
>>>>
>>>> So, to be pendantic, if you want the lobar labels for the left hemisphere 
>>>> of a subject called 'sub1', you would
>>>>
>>>> $>mri_annotation2label --subject sub1 --hemi lh --lobesStrict 
>>>> lh.lobesStrict.annot
>>>> $>mri_annotation2label --subject sub1 --hemi lh --annotation lobesStrict 
>>>> --outdir sub1/label
>>>>
>>>> HTH
>>>> -=R
>>>>
>>>>
>>>> On Thu Feb 28 09:24:58 2013, Sudhin A. Shah wrote:
>>>>> Hello,
>>>>>
>>>>> Is there a lookup table I can use to convert free surfer labels to lobes? 
>>>>> Either label nos (1006, 2006 etc) or label names 
>>>>> (ctx-rh-superiorfrontal)? I have 86 labels and want an easy way to 
>>>>> differentiate them into the corresponding lobes.
>>>>>
>>>>> Thanks,
>>>>> S
>>>>> ___
>>>>> Freesurfer mailing list
>>>>> Freesurfer@nmr.mgh.harvard.edu
>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
>>>> MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
>>>> 149 (2301) 13th Street, Charlestown, MA 02129 USA
>>>>
>>>>
>>>>
>>>> The information in this e-mail is intended only for the person to whom it 
>>>> is
>>>> addressed. If you believe this e-mail was sent to you in error and the 
>>>> e-mail
>>>> contains patient information, please contact the Partners Compliance 
>>>> HelpLine at
>>>> http://www.partners.org/complianceline . If the e-mail was sent to you in 
>>>> error
>>>> but does not contain patient information, please contact the sender and 
>>>> properly
>>>> dispose of the e-mail.
>>>
>>>
>>
>>
>>
>> --
>> Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
>> 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
>
>



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] Curvature in FreeSurfer

2017-08-16 Thread Rudolph Pienaar
Curvature does not really connect simply to folding, although they are 
of course related. Nonetheless, one cannot  make universal statements 
like "A curvature  means an  in 
folding". Consider for example a pathology like poly-microgryria where 
numerous small "bumps" might appear on a brain surface. Though curvature 
might change vis-a-vis normal, folding patterns might not.


Also, there are many different functions of curvature. Mean curvature is 
the most "obvious", but others, such as the Gaussian curvature are for 
some purposes more meaningful.


You might want to take a look here for a background and study on 
curvature on brain surfaces and FreeSurfer:


https://surfer.nmr.mgh.harvard.edu/pub/articles/AMethodologyForAnalyzingCurvature.pdf

Best



On 08/16/17 10:13, Bruce Fischl wrote:

Hi Kaspar

if you mean the values we store in the  ?h.curv files, those are the 
spatially smoothed mean curvature (average of the two principal 
curvatures).


a). it is of the white surface, but you can use mris_curvature to 
compute the curv of the pial if you want


b) an increase in the curvature means that the radius of curvature 
decreases, which usually means the folding has increased (it is sharper)


c) curvature is negatively correlated with thickness, although the 
sign is a bit arbitrary (it comes from the arbitrary choice of an 
outwards pointing surface normal). Sulci in general are thinner than 
gyri.


cheers
Bruce


On Wed, 16 Aug 2017, Kasper Jessen wrote:


Dear FreeSurfer,

We have been discussing the mean curvature provided by FreeSurfer 
software.

As i understand the mean curvature is measured as 1/r and has a unit of
1/mm.

But

a) What is the curvature an expression of? Is it the degree of 
folding of

the brain and is it the white matter surface or pial surface?
b) An increased value of mean curvature - does that mean an increase in
folding of the brain?
c) What is the expected association between the mean curvature; and 
cortical

thickness and surface area? Any suggestions of litterature?

I have read through two webpages below, but unfortunately the confusion
still exist :-)

http://mathworld.wolfram.com/MeanCurvature.html
http://mathworld.wolfram.com/GaussianCurvature.html

I am aware that this may be a simple question but the different 
measures of
curvature (fx. gaussian vs mean curvature) made us discuss the 
differences

and what it is an expression of.

Best regards,
Kasper






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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


--
Rudolph Pienaar, Dr.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] Curvature in FreeSurfer

2017-08-18 Thread Rudolph Pienaar

> b) yes, it means that the fold is "sharper" at least in one direction
>

I want to underscore Bruce's point. Higher mean curvature could mean 
that folds are sharper. It does not mean that there are necessarily more 
folds.

-- 
Rudolph Pienaar, Dr.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] distance comparisons across subjects in fsaverage group sphere

2014-05-13 Thread Rudolph Pienaar
;
>>> Central Institute of Mental Health Square J 5
>>>
>>> 68159 Mannheim, Germany
>>>
>>>
>>>
>>>
>>>
>>> Christopher Milde, M.Sc. Biol.
>>>
>>> Institute for Cognitive and Clinical Neuroscience
>>>
>>> Central Institute of Mental Health Square J 5
>>>
>>> 68159 Mannheim, Germany
>>>
>>>
>>>
>>> Phone:  +49-621-1703-6313
>>>
>>> E-mail:      christopher.mi...@zi-mannheim.de
>>>
>>> Homepage:http://www.zi-mannheim.de/
>>>
>>> Office:  Forschungs- und Verwaltungsgebäude, Room 230
>>>
>>>
>>>
>>>
>>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] mris_calc problem

2011-09-19 Thread Rudolph Pienaar
The problem was a bug related to a buffer overflow on the string lengths 
of command line arguments. Basically, filename/directory names that were 
too long triggered it.

Nick might know if a newer Mac build is available. In the meantime, you 
can try re-running the command with shorter file/dir names:

1. Copy your inputs, beta1.mgh and beta2.mgh to some dir, say ~/tmp
2. Run something "shorter" like:

cd ~/tmp
mris_calc -o beta_out.mgh beta1.mgh div beta0.mgh
mv beta_out.mgh 
/Volumes/larry/cluster_results/1007base3/surf/lh.long.thickness-spc.fwhm0.mgh




On 9/19/11 15:47 , Dabbs (Kevin) wrote:
> I have ran into a problem with mris_calc using Freesurfer 5.1 on Mac OS
> Leopard. When running long_mris_slopes I am getting this error;
>
> ERROR 1 : mris_calc compute sym. pct. change (spc) problem?
>
> It seems to running properly until it hits;
> mris_calc -o
> /Volumes/larry/cluster_results/1007base3/surf/lh.long.thickness-spc.fwhm0.mgh
> ./tmp-1007base3_lh_thickness_PENQ8v/beta1.mgh div
> ./tmp-1007base3_lh_thickness_PENQ8v/beta0.mgh
>
> The ./tmp files do exist whern mris_calc is called.
> I have seen on the Wiki that a fixed version of mris_calc is available
> for Centos. If you think I could be running into the same problem, is a
> fix available for Leopard?
>
> Thanks, Kevin
> Department of Neurology
> University of Wisconsin-Madison
>
>
>
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] mris_pmake error

2011-10-25 Thread Rudolph Pienaar
'mris_pmake' is still very experimental. It's not run as part of the 
standard recon-all stream, and is more of a post-processing surface 
tool. It has a somewhat complicated set of dependencies at this stage 
(among them, a file called 'options.txt' that controls its behavior).

What are you looking to do with it?

Best
-=R

On 10/25/11 10:51 , Steph Bickel wrote:
> Hi,
>
> when trying to use mris_pmake I get error messages:
> when I run:mris_pmake
> I get:
> sh: cannot create lock: Permission denied
>
> mris_pmake
> I'm sorry, but an error condition has occurred.
> While I was checking on the options file,
> I couldn't access the options file. Does it exist?
>
> Exiting to system with code 40
>
>
> When I run: sudo ./bin/mris_pmake
> I get:
> mris_pmake
> I'm sorry, but an error condition has occurred.
> While I was processing environment,
> it seems that the SUBJECTS_DIR env variable is not set.
>
> Exiting to system with code 10
>
>
> I did specify SUBJECTS_DIR in SetUpFreesurfer.sh that I source in the
> bashrc file and the variable is set for the other freesurfer functions.
>
> I am using   freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0 on ubuntu
> 11.04.
>
> Any help is much appreciated.
>
> thanks,
>
> Stephan
>
>
>
>
>
>
>
>
> ___________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] mris_pmake error

2011-10-25 Thread Rudolph Pienaar
On 10/25/11 10:57 , Steph Bickel wrote:
> Hi Rudolph,
>
> thanks for your speedy response.
> I want to get distance along vertices (the surface) between two vertex
> points.

OK -- 'mris_pmake' works for this. Say you have a subject called 'test' 
and you want to calculate the distance on the lh 'smoothwm' from vertex 
1000 to 2:

mris_pmake --subject test --hemi lh --surface0 smoothwm --surface1 
smoothwm --curv0 curv --curv1 curv --mpmProg pathFind --mpmOverlay 
distance --mpmArgs startVertex:1000,endVertex:2

The only important options are '--surface0 smoothwm --mpmProg pathFind 
--mpmOverlab distance --mpmArgs startVertex:1000,endVertex:2'

The other args, '--surface 1 smoothwm --curv0 curv --curv1 curv' are not 
used for finding the path, but do nonetheless need to be filled in. As I 
indicated, "mris_pmake" is more developer than user friendly.

So, the above will generate in your terminal:

Start->End vertices[ 1000->2 ]
Total path cost  [ 55.957047 ]
LabelWrite: saving to ./dijk.label

Where the "Total path cost" corresponds to the distance along the mesh 
(using the "distance" overlay in the "pathFind" module between vertices 
1000 and 2 means that the minimum cost in moving between those 
locations is the minimum distance).

You can load the 'dijk.label' into Freeview to see the path itself.

If you want to use the 'inflated' surface instead, change the arg to 
'--surface0':

mris_pmake --subject test --hemi lh --surface0 inflated --surface1 
smoothwm --curv0 curv --curv1 curv --mpmProg pathFind --mpmOverlay 
distance --mpmArgs startVertex:1000,endVertex:2

which outputs:

Start->End vertices[ 1000->2 ]
Total path cost  [ 57.521545 ]
LabelWrite: saving to ./dijk.label

Oh, and I have a strong suspicion that you need to use the current 'dev' 
version of 'mris_pmake'. If you are using the 'stable' version and it 
won't work, let me know and we can get the 'dev' version out to you.

Best
-=R



-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] FW: Question on mris_pmake

2011-10-31 Thread Rudolph Pienaar
Yes -- the problem is that each 'mris_pmake' instance listens on a 
socket. This socket is used for communicating and controlling an 
mris_pmake instance that is already running.

If you open multiple 'mris_pmake's they will collide with the "Address 
already in use".

How to fix?

Each 'mris_pmake' instance reads an options file that controls its 
behavior. This file is called "options.txt" and resides in the same 
directory from which you started 'mris_pmake'.

Edit the file, and look for

# Control flags and settings
controlPort  = 1701

Change the controlPort to a different port and you should be fine. Of 
course, you'll need to probably start each of your 4 'mris_pmake' 
instances in separate directories so that they each get their own 
'controlPort'.

There is a much simpler way to run 'mris_pmake' and even specify a 
script that it can execute using a python script called 'dsh' (also part 
of FreeSurfer). I will add some documentation to the FS wiki (but 
probably only at the end of November).



On 10/27/11 10:41 , Jungwon Ryu wrote:
> Regarding my first question in my previous post below,
> the same error occurs even when I run my script (containing many repetition
> of mris_pmake command) on only one terminal window.
>
> *From:*Jungwon Ryu [mailto:rjung...@snu.ac.kr]
> *Sent:* Tuesday, October 25, 2011 8:11 PM
> *To:* 'freesurfer@nmr.mgh.harvard.edu'
> *Subject:* Question on mris_pmake
>
> Hi,
>
> I'm trying to get distances on a cortical surface between sets of voxels
> in visual areas and I have two questions;
>
> *1)*I have the following error message so often;
>
> ===
>
> System error: Address already in use
>
> Fatal error encountered.
>
> SSocket `Unnamed SSocket_UDP_receive' (id: 0)
>
> Current function: c_SSocket_UDP_receive::c_SSocket_UDP_receive
>
> Problem binding to socket 1701
>
> Error returned from system: Address already in use
>
> Throwing exception to (this) with code 1
>
> terminate called after throwing an instance of 'c_SSocket*'
>
> runSh_Ori_1_02_01.sh: line 5789: 93334 Abort trap mris_pmake --subject
> JR20110819 --hemi rh --surface0 white --curv0 sulc --curv1 sulc
> --mpmOverlay euclidean --mpmProg pathFind --mpmArgs
> startVertex:907,endVertex:731 >> result_Ori_1_02_01.txt
>
> ===
>
> I have around 10,000 voxel pairs to run mris_pmake( ) command. Since I
> have to call mris_pmake( ) so many times (one pair by one pair), I
> splitted the whole list of voxel pairs into four script files,
> containing many mris_pmake commands with 2,500 voxel pairs as arguments,
> then I ran scripts with four terminal windows saparately to parallelize
> the processing. All script files are located in the same diretory. Then
> I had the message as above. What might be the problem? (It seems as if
> multiple terminal instances share the socket port number)
>
> *2)*How can I get interhemispheric distances between visual areas across
> hemispheres?
>
> Ryu
>
> PhD student
>
> Department of Brain and Cognitive Sciences,
>
> Seoul National University, Korea
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] mris_pmake error

2011-10-31 Thread Rudolph Pienaar
On 10/25/11 17:38 , Steph Bickel wrote:
> Hi Rudolph and Bruce,
>
> thanks for your responses.
>
> rudolph, your example works great. just 2 questions:
> what dimension is the total path cost in the mris_pmake output?
> is there a way to input a file with several vertex point pairs to
> compute the distance between, or do I have to loop through the pairs I
> would like to compute?
>

Sorry for the delay.

The dimensions are in mm.

You can in fact write a "script" that mris_pmake understands that can 
loop through all your vertex pairs in one go. That cuts down on 
processing time considerably, since the meshes are only read in once. 
Calculating the actual path takes milliseconds, while reading in a mesh 
can take multiple seconds.

Having said that, I will not be able, however, to write up the 
documentation for this until the end of November, but will add to the 
wiki as soon as I can.

Best
-=R




-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] End-of-line detection in text file

2011-11-09 Thread Rudolph Pienaar

On 11/9/11 07:59 , Ed Gronenschild wrote:

After editing a text file holding the b vecs to be supplied
as input to dt_recon this tool did not interpret the text
file correctly. It turned out that dt_recon did not recognise
the end-of line character in this file: this was decimal
code 13 (called "CR"). It seems that dt_recon only
accepts decimal code 10 (called "LF").
Is it possible to change dt_recon?


What did you use to edit the b-vec file? Different operating systems use 
different end-of-line (EOL) conventions on text files:


Windows: 
"Old"-style (and largely depreciated) Mac: 
Unix (including Mac and Linux): 

My guess is that you might have used a (possibly old) Mac-based editor 
to edit your file. Often such editors have the option to save as "UNIX" 
format. Choose that.


It's not necessary to change 'dt_recon'. Simply convert your old-style 
Mac  text file to a new style  file with:


  sed s/x0d/x0a/ old-b-vec-file>  new-b-vec-file

This replaces the '0x0d' (10 in hex) characters in the file with '0x0a' 
(13 in hex).


For more details, see: 
http://www.peterbenjamin.com/seminars/crossplatform/texteol.html




--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] End-of-line detection in text file

2011-11-09 Thread Rudolph Pienaar
On 11/9/11 09:36 , Ed Gronenschild wrote:
> Hi Rudolph,
>
> I used TextEdit. On a Mac with OS version earlier than OS10.6
> this problem didn't occur. With TextEdit it is not possible to save
> as UNIX format.
> Thanks for the trick to use sed.
>
> Ed
>

I'm not a great fan of the built in 'TextEdit'. That having been said, 
did you check under its preferences and make sure that it is setup as 
'plain text' and not 'rich text'? I just tested on my TextEdit (Lion, 
10.7.2) and it saved in  and not  convention.

You might try 'aquamacs' on the Mac... assuming you're an emacs-ish type 
person. It works reasonably well. Another editor is "TextWrangler" 
(available in the Mac OSX App Store for free).  If you look in its 
preferences, under "Text Files" there is an explicit option to save as 
"Classic Mac, UNIX, or Windows". The default is "UNIX".

Oh, and make sure that the 's/x0d/x0a/' are enclosed in single quotes. I 
see that my copy-paste in the earlier email somehow lost the quotes. If 
you have a file called "file1.txt" and want to do the / sub and 
save to "file2.txt", the exact command is

sed 's/0xd/xoa/' file1.txt > file2.txt

HTH


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] End-of-line detection in text file

2011-11-09 Thread Rudolph Pienaar
On 11/9/11 09:49 , Rudolph Pienaar wrote:
>
> sed 's/0xd/xoa/' file1.txt > file2.txt
>
   sed 's/0xd/x0a/' file1.txt > file2.txt

Oops... critical typo.



-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Downsampling pial surfaces and mapping output to fsaverage6

2011-12-20 Thread Rudolph Pienaar

Take a look at "mris_decimate":

~$>mris_decimate -x
Help

NAME
mris_decimate

SYNOPSIS
mris_decimate []  

DESCRIPTION
This program reduces the number of triangles in a surface and 
outputs

the new surface to a file using the GNU Triangulated Surface (GTS)
Library.

POSITIONAL ARGUMENTS
input surface file

output surface file

REQUIRED FLAGGED ARGUMENTS
None

OPTIONAL FLAGGED ARGUMENTS
-d 
target decimation level of new surface (value between
0<-->1.0, default: 0.5). The resulting surface will have
approximately triangles =  * origTriangles

-m 
The minimum angle in degrees allowed between faces during
decimation (default: 1.0).

--help
print out information on how to use this program

--version
print out version and exit

REPORTING
Report bugs to 


On 12/20/11 10:47, Ecker, Christine wrote:

Dear FreeSurfer Experts,

I would like to down-sample the pial surface of individual subjects to 
have the same number of vertices as fsaverage6. I have done so using:


mri_surf2surf --hemi lh --srcsubject 'subjectID' --sval-xyz pial 
--trgsubject fsaverage6 --trgicoorder 6 --trgsurfval 'outputfilename'


This worked well and the pial output surface has 40962 vertices. I now 
have an overlay vector, which was computed on the down-sampled pial 
surface, which I would like to map back to fsaverage6 in order to 
perform a group comparison.


Please could you advise on how to do this as all scripts I am aware of 
(e.g. mris_preproc) use sphere.reg, which has ~15 vertices.


Many thanks,
Christine


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



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] FreeSurfer & Ubuntu 11.10

2011-12-31 Thread Rudolph Pienaar

FS works fine on Ubuntu (11.10).

On 12/30/11 15:12, James, Brian wrote:


/usr/local/freesurfer/tktools/tksurfer.bin: Exec format error.  Binary 
file not executable.




This error typically happens when you try and run a 64-bit executable on 
a 32-bit system. From your later posts, you are clearly running the 
64-bit FS:


 freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0 

The question now is, is your base system 32 or 64-bit?There are many 
ways to ascertain this. One simple one is to type


$>file /sbin/init

which on a 64 bit system returns:

/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped


and on a 32-bit system returns:

/sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped


Please verify your base system "bit"ness.

Best
-=R

--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


[Freesurfer] Re-generating spherical surfaces...

2012-01-20 Thread Rudolph Pienaar
Hi all --

If I make changes to a subject's ?h.smoothwm, how do I re-generate the 
?h.sphere surfaces? I'd like to reduce the number of mesh vertices using 
'mris_decimate' on a given hemisphere, and then (re)generate a 
corresponding spherical surface.

Thanks

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Ubuntu 11.10 64 bit

2012-01-22 Thread Rudolph Pienaar
On 01/22/12 22:21, Jesse Bledsoe wrote:
> I second Octavian's question. Does anyone know how FreeSurfer runs on 
> Ubuntu 11.10?

Works fine on both 11.04 and 11.10.

Best

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Ubuntu 11.10 64 bit

2012-01-23 Thread Rudolph Pienaar
On 1/23/12 08:17 , octavian lie wrote:
> Thank you for the info, can you share what freesurfer version you
> have that happens to work well with ubuntu 11.10?
> Octavian
>

The lastest stable works... as well as the development versions. There 
is sometimes a library version error which is easily fixed with a soft 
symlink: i.e. an app like 'mri_info' might complain on Ubuntu that 
"libxml2.so.1" not found since on Ubuntu the library is "libxml2.so.2". 
In such a case, it's easily fixed by:

cd /usr/lib
sudo ln -s libxml.so.2 libxml.so.1

(And this is just an example. I don't remember which odd library might 
have had issues -- it wasn't libxml, but the general fix is the same).

Best
-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] pial mesh decimation...

2012-05-31 Thread Rudolph Pienaar
You can also use 'mris_decimate' and its companion, 'mris_decimate_gui'...

On 05/31/12 17:05, Gonzalo Rojas Costa wrote:
> Hi:
>
>How can I do a decimation to 1 polygons aprox to the pial surface ?...
>
>Sincerely,
>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



[Freesurfer] creating "intermediate" surfaces

2008-10-23 Thread Rudolph Pienaar
Hi all -

Is there a way to create "intermediate" surfaces in FreeSurfer? By 
intermediate I mean "some fraction" between gray/white and pial.

Cheers
-=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] 6 direction mgh gradient sequence

2008-10-28 Thread Rudolph Pienaar
On Tuesday 28 October 2008 12:06:54 Victoria Williams wrote:
> Hello,
> Can anyone point me to where I could find a mgh gradient file for dti
> processing with 6 directions? I am trying to rerun some old data through
> dt_recon and the gradient_mgh_dti sequence packs start at 13. Any
> suggestions?
>

Try this:

 1   1  0
 1  -1  0
 0   1  1
 0  -1  1
 1   0  1
-1   0  1

Has worked for me, but your mileage may vary.

Cheers
-=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


[Freesurfer] FI and sulc -- how are they related?

2008-10-28 Thread Rudolph Pienaar
> Dear Rudolph Pienaar,
> could you please tell me if the Folding index and the sulc are in a way
> correlated?
> thank you

Hi David -

This question does not really have a simple yes or no answer, mostly because 
each measures different features. These features are both derived from the 
topology of the surface, but are not directly related.

The 'sulc' measurement is the distance that a specific vertex is away from a 
hypothetical "mid-surface" that exists between the gyri and the sulci. This 
surface is chosen so that the "mean" of all the displacements is zero. The 
'sulc' gives a indication then of linear *distance* and displacements: how 
"deep" and how "high" are the folds, but doesn't say much about how "sharply" 
folded they are, or in what manner are they folded (like cylinders, like 
spheres, etc).

The FI is a *curvature* (not distance) measure. It uses the k1 and k2 
principal curvatures at each vertex to calculate a value according to (per Van 
Essen/Drury 1997):

FI_i= fabs(k1) * (fabs(k1) - fabs(k2));

Conceptually the FI tries to give a measure of how (relatively) tightly or 
sharply folded a gyrus is in a cylindrical sense. The more cylindrical a gyrus 
is, the more the FI increases along its length. For regions with spherical or 
saddle folding, k1 = k2 and the FI is zero. So it tells us more about how much 
like cylinders the folds are, but tell us nothing about how "deep" the folds 
extend.

Essentially, the 'sulc' and the FI are related of course by the topology of 
the surface but they each measure conceptually different things. It is not 
possible to determine 'sulc' from the FI or vice versa.

-- 
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] 4.1.0 on Ubuntu 8.04

2008-10-29 Thread Rudolph Pienaar
On Wednesday 29 October 2008 22:10:15 hashiryu wrote:
> Dear all,
>
> I have installed the version 4.1.0 (centos x86_64) on Ubuntu 8.04 and tried
> the test commands for tkmedit and tksurfer as in "Testing your FreeSurfer
> installation. However, the graphics "flashed" when I typed the command and
> then disappeared. There was no error message on the terminal. The graphics
> showed up very briefly when I cricked on some places on the screen where
> the graphics flashed before. I also tried the centos4 32 bit version and
> the red hat 9 version, but ended up with the same problem.
>
> Is anyone having the similar problem?
>

Are you running any compiz desktop effects (wobbly windows, fade animations, 
etc.)? I've had similar problems with Ubuntu 8.04 and FreeSurfer tools if 
compiz effects were activated. If they are active, try turning them off...

-=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] mris_calc

2008-10-31 Thread Rudolph Pienaar

On Fri, 31 Oct 2008, Bruce Fischl wrote:


Hi Rudolph,

we store things like thickness in 'volume' formats these days - the volumes 
are nvertices x 1 x 1. Not sure why it didn't work, I would have thought it 
would.


Errr... I think nonetheless the problem might be the input hack that 
'mris_calc' uses. I basically re-coded the MatLAB 'read_curv.m' in C to 
use as input function for 'mris_calc'... (i.e. I didn't use MRISRead() -- 
maybe it's time for me to update things a bit).




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


Re: [Freesurfer] absolute curvature values for vertex-wise comparison

2008-11-13 Thread Rudolph Pienaar
On Thursday 13 November 2008 08:23:08 Carl Schultz wrote:
> Dear all,
>
> for a vertex-wise comparison of the mean curvature is there a
> possibility to change the signed curvature values from the preprocessed
> curv.mgh to unsigned (absolute) values for the glm?
>

The newest (i.e. dev) version of 'mris_calc' will do this:

$>mris_calc rh.curv abs

This will run an 'abs' (absolute value) function on each element in 'rh.curv'. 
Output is saved by default to 'out.crv'. You can specify a more meaningful 
output with '--output ', so

$>mris_calc --output rh.curv.abs rh.curv abs

Since this is only in the 'dev' tree, let me know if you'd like a binary.

-=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] shell choice

2008-11-28 Thread Rudolph Pienaar
On Friday 28 November 2008 09:02:33 Jared Price wrote:
> Hello freesurfer gurus,
> I noticed on the wiki that they recommend using tcsh when running
> freesurfer, although they say other shells can be used.  Is there a
> significant advantage to using tcsh when running freesurfer?  If I would
> rather use bash is there any significant reason not to?

You can use 'bash' as your conventional shell without any ill-effect 
FreeSurfer-wise. I myself use bash and not tcsh. Remember, of course, to just 
source the bash-script equivalent setup scripts (i.e. SetUpFreeSurfer.sh)...

HTH
-=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] Top Quartile of Active Voxels

2009-01-08 Thread Rudolph Pienaar
On Thursday 08 January 2009 15:29:47 Dave Brohawn wrote:

> I would like to create a functional constraint including only the 25%
> most active voxels (top quartile).
>
> Is there a command that can achieve this?
>

You can use 'mris_calc' (the development version):

$>mris_calc someVolume.mgz stats

--> will dump min/max/mean/std data

Based on the range max-min determine the 25% threshold, then:

$>mris_calc -o top25pc.mgz someVolume.mgz gte 

--> top25pc.mgz will contain only the voxels in someVolume.mgz with 
intensities greater than or equal to .

-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] qdec & ?h.sulc

2009-01-28 Thread Rudolph Pienaar
Hi Jenifer -

On Wednesday 28 January 2009 15:16:20 Juranek, Jenifer wrote:
> So does the info in ?h.sulc contain sulcal depth information wrt the
> mean cortical surface? How does this differ from the positive values
> contained in the ?h.curv file?

The 'sulc' and 'curv' overlays do tend to look similar sometimes, but they in 
fact measure quite different things.

You are correct that the 'sulc' conveys information on how far removed a 
particular vertex point on a surface is from a hypothetical "mid-surface" that 
exists between the gyri and sulci. This surface is chosen so that the "mean" 
of all these displacements is zero. The 'sulc' gives a indication then of 
linear distance and displacements: how "deep" and how "high" are brain folds

In FreeSurfer, gyri have negative 'sulc' values, are colored green, and 
indicate how far "down" a point has to travel to reach this "mid-surface". 
Sulci have positive 'sulc' values, are colored red, and indicate how far "up" 
a point needs to travel to reach the mid-surface.

The 'curv' conveys information on the curvature (not distance) at a specific 
vertex point. The color conveys the sign, and is just an arbitrary choice. The 
sharper the curve, the higher the value (positive or negative). Areas with 
positive curvature, are colored red, and correspond to curvatures in sulci, 
i.e. curving "up". Areas with negative curvature are colored green, and 
correspond to curves pointing "down", i.e. gyri.

So, in a nutshell, the difference is that the 'curv' files contain information 
about curvatures, and the 'sulc' files contain information about displacement.

HTH

-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] getting vertex numbers

2009-02-18 Thread Rudolph Pienaar

Lars M. Rimol wrote:

Hi,
I've done a glm model fit comparing cortical thickness between two 
groups, and have certain areas ("blobs") on the cortical surface that 
are above sig. threshold. I'd like to get a list of the vertex numbers 
for each of these significant areas, which do not correspond to the 
parcellations in FS. In other words, I'm not trying to combine the 
already excisting ROI's. 
 
I've tried drawing labels (on fsaverage) and saving them, but without 
success. I clicked on 'Make path' and tried to mark vertices around the 
area, then I tried 'Custom fill' with various options, and 'Mark label', 
'New label from marked' and 'save label'. But I only manage to save one 
or at most 3-4 vertices.
 
I'm using FS v 4.0.5.


 
Any tip on how to do this would be appreciated!
 
Thank you!



To get a label file containing only vertices above a certain threshold 
 in  and store in  for subject  and 
hemisphere :


$>mris_curvature_stats --highPassFilter  --filterLabel  
  


E.g. for subject 'MySubj' filter the 'lh.thickness' for all vertices 
with "thickness" greater than 1.5, and store in 'lh.filter':


$>mris_curvature_stats --highPassFilter 1.5 --filterLabel lh.filter 
MySubj lh thickness


will create a label file, 'lh.filter' containing a list of all vertices 
whose "thickness" value exceeds 1.5


-=R


--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] aparc-stats wth curv-file as input?

2009-03-02 Thread Rudolph Pienaar

Florian Gerstl wrote:

Thanks for your quick reply!
However, when I cast the  mris_anatomical_stats command with the "-log"
  


You might also try 'mris_curvature_stats'. It gives mostly the same 
stats that 'mris_anatomical_stats' (and some additional ones geared to 
curvature-type files):


   $>mris_curvature_stats   

If you have the ROI in a FS label file:

   $>mris_curvature_stats -l

will limit the stats analysis only to the .

If you just want simple stats (mean, std, etc), you can also try:

   $>mris_calc  stats

Cheers
-=R

--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] A question about cortical foldings

2009-05-29 Thread Rudolph Pienaar

The current version of Freesurfer calculates numerous curvature-based
functions by default in the recon stream. If you look in the "surf"
directory for a reconstructed surface, you'll see several "curvature"
files that end in "*.crv".

By default, these are created for the gray/white junction surface (the
*smoothwm* implies the smoothed white matter surface). The functions
are all derived from the principal 'k1' and 'k2' curvatures that are
calculated at each vertex point on the surface mesh, and are defined as

k1  maximum curvature
k2  minimum curvature   
K   Gaussian= k1*k2
H   Mean= 0.5*(k1+k2)
C   Curvedness  = sqrt(0.5*(k1*k1+k2*k2))
S   Sharpness   = (k1 - k2)^2
BE  Bending Energy  = k1*k1 + k2*k2
SI  Shape Index = atan((k1+k2)/(k2-k1))
FI  Folding Index   = |k1|*(|k1| - |k2|)

The lh.curv and rh.curv files that are somewhat smoothed versions of
the 'H' mean curvature, thus lh.curv is not equal to
lh.smoothwm.H.crv, but close. Also, the lh.curv/rh.curv are calculated
using a different algorithm than the curvature values for the above.

The main curvature calculating process is 'mris_curvature_stats'. If
you want to generate all the curvature functions for the pial surface,
you might try:

 $>mris_curvature_stats --writeCurvatureFiles -G -F pial $SUBJECT $HEMI

where you should replace the "$SUBJET" with your subject, and "$HEMI"
with either 'lh' or 'rh' for the hemisphere. When you run the command,
your terminal will also report the results of several integral
functions taken across the whole curvature function surface, and will
also report the 'Folding Index', and several Intrinsic Curvature
Indices: the positive (ICIp), negative (ICIn) and natural (INIn). The
natural Intrinsic Curvature should be close to 1. by definition.

For more information, I suggest you read the help/man page for
'mris_curvature_stats':

 $>mris_curvature_stats -u | more



Zhangyuanchao wrote:

Dear Mr or Ms
 
 
Is there any way that we can obtain curvature value of the pial surface? 
I am not sure whether lh.curv is the curvature file that I want. How can 
I calculate the mean curvature, Gauss curvature of the pial surface and 
the GM/WM interface?

Is there any built-in function in freesurfer to calculate the above index?
 
Is there any other measures of cortical foldings in freesurfer besides 
lGI and curvature?
 
 
Thanks a lot!
 
yczhang




好玩贺卡等你发,邮箱贺卡全新上线! 
<http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/> 






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



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] one more question about curvature

2009-05-29 Thread Rudolph Pienaar

Zhangyuanchao wrote:
 
By the way, could you recommend me relevant papers that calculates the 
following indices :


Check the Freesurfer wiki... Our papers on "curvature methodologies" as 
well as "wavelet decomposition" have pdfs available.



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] A problem about average curvature value

2009-06-01 Thread Rudolph Pienaar

Zhangyuanchao wrote:
 
By the way, can I get the absolute value of a curv file using build-in 
function rather than load it into matlab and then write it back to 
binary files?
 


$>mris_calc -o lh.abs.curv lh.curv abs

This will calculate the absolute value of the curv file 'lh.curv' and 
save to 'lh.abs.curv'.




--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] cortical thickness value of each pixel

2009-06-01 Thread Rudolph Pienaar
If you simply want some stats on the 'lh.thickness' and 'rh.thickness' 
files, you can also try:


$>mris_calc lh.thickness stats
$>mris_calc rh.thickness stats

Feng-Xian wrote:

Hi,
   I want to calculate the global thickness statistics (mean +/- SD) for all 
my subjects. And, I could calculate the global thickness statistics by some 
information about cortical thickness values of each pixel. But I can’t find 
any files regarding cortical thickness values of each pixel. 
Could you suggest me how to calculate the global thickness statistics or 
tell me where to get the file regarding cortical thickness values of each 
pixel?


Thank you in advance!

Feng-Xian


-
Chang Gung University Mail Server Web Mail system
By Chang-Gung University Information Center
(http://www.cgu.edu.tw/ic/)

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





--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] "smooth sulc on only part of the surface" one more time

2009-06-04 Thread Rudolph Pienaar

Zhangyuanchao wrote:
I would like to mask off the 
negative values (as the lh.sulc file has both positive and negative 
value). 


Another way to filter the sulc is:

$>mris_calc -o lh.sulc.pos lh.sulc gte 0

which filters 'lh.sulc' and only lets values that are greater than or 
equal to 0 through. All other values are set to zero. Results are saved 
to 'lh.sulc.pos'.


Similarly,

$>mris_calc -o lh.sulc.neg lh.sulc lt 0

Will filter through all the values that are less than zero, setting all 
others to zero, and saving to 'lh.sulc.neg'.



Before making group analysis, I have to resample and smooth the 
sulc value. How do I smooth the positive sulc in a way that the negative 
sulc values will not have an effect on the smoothing process? 


If you just want to mitigate against the boundary effects of switching 
from positive to negative for your smoothing, having all the negative 
values set to 0 will probably go a long way to reducing the effect. You 
could replace all the  negative values in the original file with 
whatever arbitrary value you'd like:


$>mris_calc -o lh.sulc.neg.bin lh.sulc.neg div lh.sulc.neg

which divides 'lh.sulc.neg' by itself, resulting in a file that is 
contains '1' for all the negative values, and '0' elsewhere. If you then do


$>mris_calc -o lh.sulc.p1 lh.sulc.pos add lh.sulc.neg.bin

the result should be a file 'lh.sulc.p1' that has all the original 
positive values unchanged, and replaced all the original negative values 
with '1'. Of course, you can set the bin value in 'lh.sulc.neg.bin' to 
whatever you'd like by first multiplying it by the desired value:


$>mris_calc -o lh.sulc.neg.bin.f lh.sulc.neg.bin mul 0.01

would create lh.sulc.neg.bin.f with values of 0 and 0.01...



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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: Fw: [Freesurfer] Anatomical stats for fsaverage

2009-06-06 Thread Rudolph Pienaar



-Original Message-
From: Alex Fornito 

Thanks, 
I did as you suggested, but got a different error telling me that

mris_anatomical_stats cannot be used with fsaverage as it is an average
subject.
  


You can try the following "hack": convert the annotation to a series of 
labels, and then use 'mris_curvature_stats' on these label files. It 
will dump a bunch of curvature-related measures, but you can ignore 
these and just extract the surface area measures that it also generates.


$>mri_annotation2label --subject  --hemi lh --annotation 
lh.test.aparc.annot --labelbase base


This will create a series of label files, base-XXX.label in the 
/label directory. You can use 'mris_curvature_stats' on each of 
these label files. Pass it any curvature file, and just grep for "ROI":


$>mris_curvature_stats -l base-000.label   curv | grep ROI
...
  Raw Mean Vertex Separation (ROI Surface):   0.83274 +- 0.24399 mm
  Raw ROI Surface Area:4349.99756 mm^2
  Raw ROI Number of Vertices:   07370
  Raw ROI Surface Area Percentage:   5.52%
  Raw Average Vertex Area (ROI Surface):  0.59023 mm^2
...



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] FreeSurfer backgrouund color

2009-06-29 Thread Rudolph Pienaar
If you are thinking about capturing screenshots for publication (with a 
white background), you can save a picture of interest to a tiff from 
tksurfer (with a black background), and then use 'convert' (part of 
ImageMagick and standard on most Linux distros) to change the black 
background to white:


$>convert -fill white -opaque black input.tiff output.tiff

where input.tiff is a black-background tiff, and output.tiff is the same 
image but with the background now white.





Krajcsi Attila wrote:

Hi,

Is there any possibility in tksurfer to change the background color from 
black to white?


Thanks,
Attila




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



--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] averaging mgz files

2009-07-15 Thread Rudolph Pienaar

Douglas N Greve wrote:

or mri_concat or fscalc.fsl



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


Re: [Freesurfer] freesurfer in Ubuntu 8.1 or 9.04

2009-08-01 Thread Rudolph Pienaar
I've been running FS for some time now on an x86_64 9.04 ubuntu box 
without any problems. Just download the appropriate CentOS version (i.e. 
the x86_64 version if you're on a 64-bit box).

You might need to add some simlinks (stuff like linking 
/usr/libtiff.so.4 ---> /usr/libtiff.so.3 and the like) -- you'll see 
immediately if any apps complain about lib version numbers.

Gonzalo Rojas wrote:
> Hi:
>
>I want to install FSL under Ubuntu 8.10 or 9.04... There exist any 
> problem, or I must use CentOS ?...
>
>Sincerely,
>
>
>
> Gonzalo Rojas Costa
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>   


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] installing on ubuntu

2009-08-24 Thread Rudolph Pienaar
Ahmed, F, Me  wrote:
>  
> On Ubuntu, you will need to do the following:
> cd /usr/lib
> ln -s libtiff.so.4 libtiff.so.3
>  

Actually, you should probably use:

sudo ln -s /usr/lib/libtiff.so.4 /usr/lib/lib/tiff.so.3

(it amounts to the same thing, but this way is just one line that you 
can simply cut-and-paste. The system will prompt you for your password.

Also the 'ubuntu' way is to use 'sudo' for administrator-type 
operations. If you just use the above, you will probably get 'Permission 
denied errors').

Note that you *might* get other missing dependencies -- especially if 
you are on a freshly installed ubuntu machine. They are relatively easy 
to resolve using 'apt-get'

> When exactly does this need to be done? I know this probably sounds like 
> a really stupid question, but I have had major issues with installing FS 
> and want to make sure I know exactly what needs doing and when it needs 
> to be done. So I’d really appreciate some insight. Thank you.
>  

It doesn't matter when you do it -- either before or after you unpack 
the archive. Just make sure to do it before you actually run any 
FreeSurfer GUI type apps. If you forget to do it, you'll simply get an 
error along the lines of 'libtiff.so.3 not found'



-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] installing on ubuntu

2009-08-24 Thread Rudolph Pienaar
Matt Glasser wrote:
> I assume you meant sudo ln -s /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3

Yes - thanks!

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] installing on ubuntu

2009-08-25 Thread Rudolph Pienaar
Hi Fatima --

Ahmed, F, Me  wrote:
> cd /usr/local
> tar xzvf freesurfer-Linux---full.tar.gz
>
>
> and I got the following error: 
>
> tar: freesurfer-Linux-centos4-stable-pub-v4.3.1-full.tar: Cannot 
>   
>>> open: No such file or directory
That error in fact does make sense. The 'tar' command is trying to 
unpack the archive, but it is saying that it can't find the archive 
file. That most likely is because the archive file is *not* in the 
/usr/local folder (or directory).

I'm guessing that you downloaded the archive to your Desktop -- this is 
usually the case if you use 'firefox' to download. Assuming that to be 
the case, the *full* path to the archive is:

/home/fatima/Desktop/freesurfer-Linux-centos4-stable-pub-v4.3.1-full.tar

(assuming that your user name on your computer is 'fatima').  Sometimes 
'firefox' might download to your 'Downloads' folder:

/home/fatima/Downloads/freesurfer-Linux-centos4-stable-pub-v4.3.1-full.tar

I'm going to assume the archive is on your Desktop since this is the 
most common. Now, in order to install, you need to make sure about two 
things:

1. That you properly specify the archive.
2. That you have permissions to unpack the archive.

When you login, you have permission to read/write files and folders only 
in your "home" folder, i.e. /home/fatima -- anywhere "outside" this, and 
you will probably need administrator permission. This administrator is 
typically called 'root' on Linux/Mac/Unix systems.

On a CentOS box, when you want to install, you should change your user 
to 'root'. This means typing:

$>su

The prompt will ask you for a password. This is the 'root' password and 
was setup by whomever setup your computer. This password is probably not 
the same as your, i.e. 'fatima', password. When you have done that, you 
will notice that the prompt has changed slightly:

#>

i.e., the '$' is now '#', signifying that you are now 'root'.

Now, assuming that the freesurfer archive is still in your (i.e. 
'fatima's) Desktop, you should try:

$>su
Password: 
#>cd /usr/local
#>tar xzvf 
/home/fatima/Desktop/freesurfer-Linux-centos4-stable-pub-v4.3.1-full.tar

and you should hopefully be all set. By the way, you don't need to type 
every single character in the name. Just type the first one or two and 
then press . The shell will fill in the rest as far as it can. So 
when you start typing '/home/fa' press  and it will automatically 
fill out '/home/fatima'. Then continue typing '/Des' and press  -- 
you will see '/home/fatima/Desktop'. Now continue and type '/free' and 
press  then the whole 
'freesurfer-Linux-centos4-stable-pub-v4.3.1-full.tar' will automatically 
be completed.

On Ubuntu, it's pretty much the same as CentOS, but we use 'sudo' 
instead of 'su', and you can use your password and not the 'root' password:

$>sudo bash
Password: 
#>cd /usr/local
#>tar xzvf 
/home/fatima/Desktop/freesurfer-Linux-centos4-stable-pub-v4.3.1-full.tar

in both cases, when you're done unpacking, simply type: 'exit' so that 
you are no longer the 'root' user and return to being 'fatima'.

HTH
-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] Freesurfer installation on Ubuntu desktop or server?

2009-09-09 Thread Rudolph Pienaar
Burcu Ays,en Ürgen wrote:
> Hi all,
>
> If one installs Freesurfer on Ubuntu, should he/she prefer the desktop 
> version of Ubuntu or server edition? Does it matter?
>
 From FreeSurfer's perspective, it doesn't matter all that much if at 
all -- depends more on what other tasks you want the machine to do. The 
Ubuntu kernel shipped with the 'server' edition is optimized towards a 
different set of constraints than the 'desktop' edition (server: better 
support for virtualization, 64GB memory addressing for 32-bit systems, 
etc; desktop: pre-empting turned on for quicker desktop response, 32-bit 
version can only address 4GB of memory, lots of user-space apps like 
openoffice, firefox, etc.).

Other than that, each offers different set of base installed apps. The 
"server" edition comes out-of-the-box with a lot more "servers" than the 
"desktop" edition. In fact, the server edition doesn't even install X11 
by default.

Of course, nothing prevents you from installing all the server apps in 
the desktop edition, or adding all the desktop tools in the server 
edition post-install -- at which point other than different kernel 
optimizations there's little difference.

Personally, I'd install the desktop version and add whatever additional 
servers I might need afterwards -- you'll be up and running FS a lot 
quicker.

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] Surface area of ROI

2009-09-10 Thread Rudolph Pienaar
If you pass 'mris_curvature_stats' a '-l ' it will output, 
amongst other, the surface area of the ROI, e.g.:

$>mris_curvature_stats -l   rh curv

(will calculate a bunch of stats on the rh.curv file of  -- just 
ignore and look for:)

...
...

ROI Surface Area:
...
...

-=R




Barnali Basu wrote:
> Experts,
> 
> I have labels drawn on surfaces of individual subjects. I need to find 
> the surface area of each (one on each surface). Is there a way I could 
> do it?
> 
> Thanks
> 
> -- 
> Barnali Basu
> 
> Cell   : 425 638 2936
> Home: 206 257 0174
> 
> 
> 
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] cortical thickness estimation w/ grey matter segmentation apriori

2009-10-07 Thread Rudolph Pienaar
Hi Elisa (and Joost)

It is definitely (*) possible to feed custom segmentations through the 
FreeSurfer stream and have surfaces be constructed.

I can sketch the general idea here, but will need to check the system we 
actually used for all the detail.

Basically, given a GM segmentation you need to construct synthetic 
'brainmask.mgz', 'filled.mgz', and 'wm.mgz' volumes. For the most part,
you can use monochromatic intensity values in each constituent lh and rh 
segmentation (i.e. for the brainmask.mgz all the rh gray matter voxels 
can be set to something like 81, all the lh voxels to 82; the white 
matter rh voxels to 111 and the lh voxels to 112 -- or something 
thereabouts). Similarly for the 'filled.mgz' and the 'wm.mgz' volumes -- 
although the intensities in these were a bit different. I'll have to check.

Once you've created these, you essentially start the recon-all stream 
quite a bit "downstream". I've forgotten where exactly, but can look. 
Although where we jump started the stream back then probably doesn't 
translate directly to today's FreeSurfer.

Having said all this, note the following:

1. We implemented this several years ago on what was current then for 
FreeSurfer. The recon-all stream has evolved quite a bit since then and 
our specific "hacks" might not be exactly applicable anymore. Especially 
as regards at what "downstream" point to start FreeSurfer. We haven't 
used this system since that work finished.

2. The 'pial' surfaces did not reconstruct correctly. Since our interest 
at the time was limited to the gray/white junction, this was fine. I 
suspect that using a monochromatic intensity for the wm values was 
probably the problem. I remember experimenting with intensity gradients 
applied across the wm volumes, but don't think any results were 
satisfactory for the 'pial' surfaces.

If you'd like more info, feel free to ping me directly.

Regards
-=R

(*) perhaps 'definitely' is too strong. It is mostly possible... :-P


Elisa Dell'Oglio wrote:
> Hi Rudolph,
> 
> I was wondering if you could give me any hint regarding how to use an 
> apriori GM segmentation in freesurfer. I basically already have a good 
> segmentation of GM vs WM and CSF from spm and would like to use this 
> towards the computing cortical thickness.
> 
> Thanks,
> Elisa
> 
> 2009/10/7 Bruce Fischl  <mailto:fis...@nmr.mgh.harvard.edu>>
> 
> Hi Elisa,
> 
> Rudolph Pienaar (ccd) put together something for this I think.
> 
> cheers
> Bruce
> 
> 
> 
> On Wed, 7 Oct 2009, Elisa Dell'Oglio wrote:
> 
> Hi all,
> 
> I have a question regarding cortical thickness estimation in
> freesurfer. I
> was wondering whether it is possible to input in freesurfer the
> gray matter
> segmentation as an a priori.
> Specifically, I run freesurfer on a set of cases on which I
> previously run
> spm and obtained a good discrimination between GM, WM and CSF.
> I would like to use these segmentation instead to proceed with
> manual edits
> on freesurfer segmentation output for gray matter segmentation, that
> sometimes was not segmented correctly. Would this be possible?
> 
> Thanks a lot,
> Elisa
> 
> 


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] dual boot OS

2009-10-28 Thread Rudolph Pienaar
Hi Fatima --

All you need to do is simply configure your VM with more processors.  
Make sure your VMware Linux machine is "Powered Down" (i.e. not  
suspended). Then, in VMware, select your Linux machine (but don't  
power on) and choose "Settings". Goto "Processors and RAM". Under  
"Processors" you should see a drop down -- simply click and select the  
number of "Virtual Processors" to use. Your choices should be "1, 2,  
or 4". The number of virtual processors can only be a power of two. If  
you  choose 2 (your best choice on a quad core machine), then you  
should make sure that your RAM is pushed up to at least 4GB, too.

Next time the VMware Linux machine boots up, it will think it's  
running on dual-core hardware and you should be able to run two  
separate subjects at the same time. This is of course provided that  
you have enough RAM configured for your VM. We recommend a *minimum*  
of 2GB per recon, so for two in parallel your VM should be configured  
for at least 4GB RAM.

Of course, to really get the most possible performance, you should  
probably go the dual boot route and install a native Linux. In such a  
case, even on a quad core machine, I'd only recommend running 3 jobs  
at a time. If you run 4 then you're going to be very little else on  
the machine while all the recons are running. Again, if you were to  
run 4 recons, your machine should have at least 8GB RAM.

HTH
-=R


On Oct 28, 2009, at 04:10 , Ahmed, F, Me  wrote:

> Ok, I do have a quad-core computer, but as I said, my FS is running  
> on an emulator, therefore it is not accessing all of my cores. If  
> what you say is true and I can run 4 jobs simultaneously, then how  
> would I go about in setting that up? Any ideas and help would be  
> greatly appreciated!
>
> Thanks
>
> From: Woo-Suk, Tae [mailto:ws...@kangwon.ac.kr]
> Sent: 28 October 2009 09:56
> To: fah...@sun.ac.za
> Cc: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] dual boot OS
>
> No, you just need multi-core CPU.
> If you have quad core CPU, you can run 4 jobs simultaneously
> (over 4 jobs possible, but the run time will be needed more) in the  
> multiple command terminals.
>
> Best regard!
>
> Woo-Suk, Tae
> Chucheon, Korea
>
> --- Original Message ---
> From : "Ahmed, F, Me "
> To : "Freesurfer Mailing List"
> Date : 2009/10/28 수요일 오후 4:19:02
> Subject : [Freesurfer] dual boot OS
>
> Hello,
>
> A quick question, if I wanted to run simultaneous recon-all jobs,  
> would I have to install Linux as a dual boot operating system as  
> opposed to what I currently have, which is an emulator?
>
> Thanks,
> Fatima
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] Circle around vertex

2009-11-08 Thread Rudolph Pienaar
Hi Martin --

There is an app in the development tree, 'mris_pmake' that can be used 
to generate fixed-radius regions about arbitrary vertices. It's 
scriptable, so you can feed it a list of vertex indices to build 
circular ROIs about.

It should be available in the 5.0 release of FreeSurfer, but if you'd 
like to use it already, send me an email and I can send you a beta version.

Cheers
-=R

Martin Kavec wrote:
> :)
> thanks. In volume images dilation is usually by 1 voxel, but as far as 
> I understand, label is a surface represented by a mesh where a 
> distance between vertices does not need to be the same. So if I want 
> to dilate the label by 10 mm do I click "dilate label" 10x.
>
> Thanks,
>
> Martin

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


Re: [Freesurfer] number of vertices per hemisphere using mri_glmfit

2010-01-19 Thread Rudolph Pienaar
If you do:

$>mris_calc  stats

the first line reported back will be the number of vertices. So, if you 
want to know how many vertices on the left hemisphere:

$>mris_calc lh.thickness stats

and look at the

Size[ XXX ]

where XX will be number of vertices.


Stefan Brauns wrote:
> Hi there,
> 
> I am running surface based analysis of cortical thickness using 
> FreeSurfer. Sometimes I constrain the analysis to certain regions of the 
> brain, e.g. only frontal lobes. I would like to find out how many 
> vertices per hemisphere are analysed with the mri_glmfit I am running. 
> Is there a possibility to get these values from any of the log-files? 
> What is the usual number of vertices per hemisphere?
> 
> Many thanks,
> 
> Stefan
> 
> 
> 
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] FreeSurfer & Matlab

2010-02-01 Thread Rudolph Pienaar

Bruce Fischl wrote:


(2) Import that surface onto Matlab and visualize it there.



There is such a visualizer in the 'dev' tree of FreeSurfer -- called 
'mris_display'. I've appended the relevant m files -- just save to a dir 
on your MatLAB path.


-=R

--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street, Charlestown, MA 02129 USA
function [] = colprintf(aC, astr_LC, varargin)
%
% NAME
%
%  function [] = colprintf(aC, astr_LC, format, ...)
%  $Id: colprintf.m,v 1.2 2010/02/01 20:52:10 rudolph Exp $
%
% ARGUMENTS
% INPUT
%   aC  class/col width if class - queried for col
%   widths, else parsed for 
%   width spec
%   astr_LC string  Left-column 'intro' text
%   format, ... string  C-style format string to print
%   in right column.
%
% OPTIONAL
%
% DESCRIPTION
%
%   Prints two-tuple text inputs in two-columns, with column widths
%   defined in the hosting class  or alternatively if aC is a 
%   string of form ";"
%   
%   A carriage-return is appended to the end of the right string
%   col.
%
% NOTE:
%
% HISTORY
% 18 September 2009
% o Initial design and coding.
%

LC  = 40;
RC  = 40;
verbosity   = 1;

if isobject(aC)
LC  = aC.m_LC;
RC  = aC.m_RC;
verbosity   = aC.m_verbosity;
else
[str_LC, str_RC]= strtok(aC, ';');
LC  = str2num(str_LC);
RC  = str2num(str_RC);
end

sfrmt   = sprintf(varargin{:});

if length(astr_LC) & verbosity
fprintf(1, '%s', sprintf('%*s',   LC, astr_LC));
end
if length(sfrmt)   & verbosity
fprintf(1, '%s', sprintf('%*s\n', RC, sfrmt));
end
end
function [hf, hp, av_filtered] = mris_display(astr_mris, astr_curv, varargin)
%
% NAME
%   [hf, hp, av_filtered]   =   ...
%   mris_display(   astr_mris,  ... 
%   astr_curv   ...
%   <, a_az,... 
%   a_el,   ...
%   af_bandFilter,  ...
%   ab_invMap>
% )
% $Id: mris_display.m,v 1.2 2010/02/01 20:52:10 rudolph Exp $
%
%
% ARGUMENTS
%   
%   INPUT
%   astr_mris   string  filename of surface file to load
%   astr_curv   string  filename of curvature file to load
%
%   OPTIONAL
%   a_azfloat   azimuth of viewpoint
%   a_elfloat   elevation of viewpoint
%   af_bandFilter   float   apply a symmetrical band pass filt
%   between +- 
%   ab_invMap   boolif true, invert the sign of the
%   curvature data -- useful if 'neg'
%   values are on gyri and 'pos' values
%   in sulci.
%
%   OUTPUT
%   hf  handle  handle to generated figure
%   hp  handle  handle to patch
%   av_filtered vector  number of vertices in original curv
%   that have been filtered out by the
%   .
%
% DESCRIPTION
%
%   'mris_display' reads a FreeSurfer surface structure and
%   displays it as seen from an optional .
%
%   The  can be further band pass filtered by passing
%   an  parameter, in which case the curvature
%   vector is hardlimited to [-, ... ].
%
% PRECONDITIONS
%   o  and  should be valid filenamesi.
%   o FreeSurfer environment.
%
% POSTCONDITIONS
%   o Figure is generated.
%   o handle to figure is returned.
%
% HISTORY
% 26 August 2009
% o Initial design and coding.
%

% -

%% 
%%% Nested functions :START
%% 
function error_exit(str_action, str_msg, str_ret)
fprintf(1, '\tFATAL:\n');
fprintf(1, '\tSorry, some error has occurred.\n');
fprintf(1, '\tWhile %s,\n', str_action);
fprintf(1, '\t%s\n', str_msg);
error(str_ret);
end

function vprintf(level, str_msg)
if verbosity >= level
fprintf(1

Re: [Freesurfer] FreeSurfer & Matlab

2010-02-01 Thread Rudolph Pienaar

Sorry -- appended the wrong version of 'mris_display.




--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street, Charlestown, MA 02129 USA
function [hf, hp, av_filtered] = mris_display(astr_mris, astr_curv, varargin)
%
% NAME
%   [hf, hp, av_filtered]   =   ...
%   mris_display(   astr_mris,  ... 
%   astr_curv   ...
%   <, a_az,... 
%   a_el,   ...
%   af_bandFilter,  ...
%   ab_invMap>
% )
% $Id: mris_display.m,v 1.2 2010/02/01 20:52:10 rudolph Exp $
%
%
% ARGUMENTS
%   
%   INPUT
%   astr_mris   string  filename of surface file to load
%   astr_curv   string  filename of curvature file to load
%
%   OPTIONAL
%   a_azfloat   azimuth of viewpoint
%   a_elfloat   elevation of viewpoint
%   af_bandFilter   float   apply a symmetrical band pass filt
%   between +- 
%   ab_invMap   boolif true, invert the sign of the
%   curvature data -- useful if 'neg'
%   values are on gyri and 'pos' values
%   in sulci.
%
%   OUTPUT
%   hf  handle  handle to generated figure
%   hp  handle  handle to patch
%   av_filtered vector  number of vertices in original curv
%   that have been filtered out by the
%   .
%
% DESCRIPTION
%
%   'mris_display' reads a FreeSurfer surface structure and
%   displays it as seen from an optional .
%
%   The  can be further band pass filtered by passing
%   an  parameter, in which case the curvature
%   vector is hardlimited to [-, ... ].
%
% PRECONDITIONS
%   o  and  should be valid filenamesi.
%   o FreeSurfer environment.
%
% POSTCONDITIONS
%   o Figure is generated.
%   o handle to figure is returned.
%
% HISTORY
% 26 August 2009
% o Initial design and coding.
%

% -

%% 
%%% Nested functions :START
%% 
function error_exit(str_action, str_msg, str_ret)
fprintf(1, '\tFATAL:\n');
fprintf(1, '\tSorry, some error has occurred.\n');
fprintf(1, '\tWhile %s,\n', str_action);
fprintf(1, '\t%s\n', str_msg);
error(str_ret);
end

function vprintf(level, str_msg)
if verbosity >= level
fprintf(1, str_msg);
end
end

%% 
%%% Nested functions :END
%% 


sys_printf('mris_display: START\n');
 
az  = 270;
el  = 0;

b_bandFilter= 0;
af_bandFilter   = 1;
b_invCurv   = 0;

% Parse optional arguments
if length(varargin) >= 1, az = varargin{1}; end
if length(varargin) >= 2, el = varargin{2}; end
if length(varargin) >= 3
b_bandFilter= 1;
af_bandFilter   = varargin{3};
end
if length(varargin) >= 4, b_invCurv = varargin{4};  end

% Read curvature file
colprintf('40;40', 'Reading curvature file', astr_curv);
[v_curv, fnum] = read_curv(astr_curv);
colprintf('40;40', 'Number of curv elements', sprintf('%d', numel(v_curv)));
if b_invCurv
colprintf('40;40', 'Invert curvature data sign', sprintf('%d', b_invCurv));
v_curv = v_curv * -1;
end

% Read surface
colprintf('40;40', 'Reading mris file', astr_mris);
[v_vertices, v_faces] = read_surf(astr_mris);
v_vertSize  = size(v_vertices);
v_faceSize  = size(v_faces);
str_vertSize= sprintf('%d x %d', v_vertSize(1), v_vertSize(2));
str_faceSize= sprintf('%d x %d', v_faceSize(1), v_faceSize(2));
colprintf('40;40', 'Size of vert struct', str_vertSize);
colprintf('40;40', 'Size of face struct', str_faceSize);

if numel(v_curv) ~= v_vertSize(1)
error_exit( 'reading inputs',...
'mismatch between curvature size and surf vertices', ...
'1');
end

v_vertices  = single(v_vertices);
v_faces = int32(v_faces+1);  % for matlab compliance

av_filtered = [0 0];
if b_bandFilter
lowerCount  = numel(find(v_curv<-af_bandFilter));
upperCount  = numel(

Re: [Freesurfer] Thickness values for every voxel

2010-05-04 Thread Rudolph Pienaar
If you don't have MatLAB, you can also do:

$>mris_calc -out lh.thickness.asc lh.thickness ascii

which will convert the 'lh.thickness' into an ascii file (in this case, 
'lh.thickness.asc') containing the thickness per vertex per line. 
Incidentally, this will work with any FreeSurfer curvature file, too.

-=R

On 5/4/10 14:50 , Bruce Fischl wrote:
> Hi Ana,
>
> yes, it's stored in the ?h.thickness file, which you can load into matlab
> or tksurfer for visualization/analysis.
>
> cheers
> Bruce
> On Tue, 4 May 2010, Ana Catarino
> wrote:
>
>
>> Hello,
>>
>> Does anyone know if there is a way of getting access to the values of
>> thickness for each voxel / point in the mesh?
>>
>> Thank you,
>> Ana Catarino
>>
>>  
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] ROI Curvature

2006-05-26 Thread Rudolph Pienaar
On Thursday 25 May 2006 17:44, Fornito, Alexander wrote:
> Sorry, got it wrong way around.
> Either way, when I run mris_anatomical_stats on labels that I have created,
> I tend to get positive values for mean curvature for labels of both gyral
> crowns or sulcal fundi. Are the curvature values provided by
> mris_anatomical_stats unsigned?

'mris_curvature_stats' provides signed statistics on Gaussian and Mean 
curvatures. By default it does not calculate the principle curvatures, so it 
has to be explicitly told:

$>mris_curvature_stats -m -h 11 -G -F smoothwm   

where

-m
Show the min and max values of each curvature calculation

-h 11
Show a histogram of curvatures sorted into 11 bins

-G 
Calculate Gaussian statistics

-F smoothwm
Use the 'smoothwm' surface for Gaussian statistics (otherwise default to the 
'orig' surface which is probably what you don't want).


The subject to process


Hemisphere to process


Curvature file to process (does not affect the Gaussian / mean stats).

Cheers
-=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] System requirements

2006-10-18 Thread Rudolph Pienaar

Oddbjørn Sæther wrote:
We plan to install FreeSurfer on a Linux server (probably SuSe 9), 
Unless you have a compelling reason to run an old version of SuSE 
(version 9 was released in October 2003), I would strongly recommend 
using the current version, 10.1. Older versions of mainstream distros 
will require increasing amount of maintenance to simply run current and 
new versions of FreeSurfer.


How much memory will this "server" have? How many processors? These 
specs are probably critical.



and run from Windows PCs via FreeNX/NXclient.
1. Will that work?
It *might* work. I have run FreeSurfer graphical apps with remote 
display to Windows XP running cygwin. Personally, I would not recommend 
doing this - remotely displaying the graphical FreeSurfer tools on any 
platform can be painfully slow, even on a fast local 100MB/s LAN.


I don't know much about the FreeNX X server (Windows or otherwise). In 
general though, of all the platforms to use, Windows is probably the 
most difficult choice to remote display to. Other than display issues, 
Windows machines would require a non-trivial amount of setup and 
maintenance to seamlessly integrate with a Linux box running FreeSurfer.



2. What system requirements is advisable with 3-6 users?
What do you mean? FreeSurfer is quite memory and resource intensive. It 
is not a good idea to run more than one instance of any FreeSurfer tool 
on any single machine. If you are planning to install FreeSurfer on a 
single "server", and have all your users remotely access this single 
server to run tools and graphical apps, you will no doubt very quickly 
bring the server to its knees.


In general, each FreeSurfer stream requires a single dedicated processor 
and about 2GB of memory. So if you want four people to all use the same 
machine, you'd need a machine with four processors and at least 8GB of RAM.


3. Is 3D graphics cards necessary on the Windows PCs (or how does this 
work)?


Whatever the client OS, 3D graphics cards are necessary if you want to 
use the graphical apps.


While the setup you describe might work, you might find yourself quickly 
frustrated with performance issues, both on your single server, and 
quite probably on your Windows clients.


The graphical FreeSurfer apps in particular are not specifically 
designed to run in a client/server model, but should be run locally. 
While a lot of the backend computational tools can easily be dispatched 
to a different machine, you probably won't want to run more than one 
stream on any one box/processor. Certainly three, or even two people 
running a reconstruction stream on a lone server (unless it is a very 
high end machine) would probably not be a good idea.


In fact, the best recommendation would be to install FreeSurfer locally 
on each machine that you want to use. If you cannot replace your Windows 
installations with Linux on the client PCs, you might want to think 
about dual-boot or vmware-type options. If this is not viable, the best 
case would be to get dedicated Linux (or Mac OS X) machines to use 
FreeSurfer.


Cheers
-=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] freesurfer in cygwin

2007-07-17 Thread Rudolph Pienaar
Hi Shen -

On Tuesday 17 July 2007 04:55, 申林 wrote:
> I have downloaded freesurfer in WINDOWSXP and want to run it via
> Cygwin. But it don't work. Is there possibility to run it ?

'cygwin' is unfortunately not the same thing as Linux and it will not allow 
you to run pre-compiled Linux programs on Windows.

Although 'cygwin' allows you to run UNIX-like programs on Windows, these 
programs have to be specifically compiled on Windows for 'cygwin'. 

Your best way to run FreeSurfer is on Linux or on Mac OS X. 

Cheers
-=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] Keyboard Mapping (up arrow)

2007-08-01 Thread Rudolph Pienaar
Hi Troy -

On Wednesday 01 August 2007 12:54, Troy Mcan wrote:
> Hi,Does anyone know how to access the "up arrow" (history) command in the
> tksurfer shell. E.g. backspace maps to ctl-h. Thanks!

Unfortunately the tclsh has very limited interactive capability. The ability 
to act like a "regular" shell (such as 'bash' or 'tclsh') and have history 
functionality, to do  completion of file and directory names, etc, 
simply does not exist in the tclsh.

In fact, this is probably the most common stumbling that most users of the 
tclsh (which include tksurfer and tkmedit) encounter very soon in their 
dealings with tclsh.

There is a solution, however. This "extended" functionality is provided by the 
GNU readline library, and in fact there is such an extension to the tclsh. 
See here:

http://tclreadline.sourceforge.net/

I'd only suggest attempting this if you are reasonable comfortable with 
UNIX-type admin, but the instructions at the above site are staightforward to 
follow. Basically you'll compile an additional libary and allow your local 
tclsh to use this.

Of course, if you install this library, it will only "modify" the behaviour of 
the tclsh that is installed by default on your system, and not the version of 
the tclsh that FreeSurfer uses. 

It's a bit of a hack, but you once you have modified your local tclsh to be 
readline aware, you can try various approaches:

* replace the FreeSurfer versions with your new readline-aware tclsh, 
or 
* change the way FreeSurfer sets the PATH environment variable so that 
it 
picks up your system readline-aware tclsh first, and not the FreeSurfer 
bundled tclsh.

FWIW, I have used the second approach successfully, so it can and does work.

-=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] OpenGL

2007-11-06 Thread Rudolph Pienaar
Hi Dan -

On Tuesday 06 November 2007 12:30, Daniel Wakeman wrote:
> We still do not seem able to get these
> applications to work.

When you say you can't get them to work, what exactly do you mean? Do you get 
any console error messages? Do you get nothing? Are the processes still 
lurking about in the process table...? What command line syntax (including 
arguments do you use)?

At the very least, you should get a "surfer.log" and "error.log" file in the 
directory from which you launch any of the graphical apps... Do these even 
appear?


-=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] Folding Index question

2007-11-19 Thread Rudolph Pienaar
Hi Graham -

First off, your observation that the FI seems correlated with area is 
completely correct. I'm not sure if you have the FS source code? Anyway, 
looking at the relevant code in 'mrisurf.c', the 

MRIScomputeCurvatureIndices(...)

function pretty much computes the folding index (fi) as

fi += area * Kmax * (Kmax - Kmin) ;

and then, once having summed over the surface, simply divides by 

*pfi = fi / (4.0*M_PI) ;

In essence, this is Van Essen's Folding index -- although I personally do have 
some issues with it. First of all, Van Essen normalizes his measure with 
1/4/pi, indicating that the 1/4pi is the "integral for a cylinder the length 
of which equals its diameter). I seem to think this integral should be 
(1/2pi)^2, i.e. 1/4/pi^2. Either way, this is merely a fixed constant and 
doesn't change the behaviour.

And irrespective of the 1/4pi or not, the measure is a strict function 
of "size", or more accurately, the radius of curvature. Since the curvatures 
run as the inverse of radius, the curvature values in small sulci/gyri can 
dominate the 'Folding Index', even if they are 'folded' exactly the same as 
larger sulci/gyri. In fact, there is nothing really related to 'folding' per 
se in the measure, so it is arguably something of a misnomer - but I fear I 
am digressing.

I know Bruce originally wrote the FI into FS, but based on this quick 
re-analysis, I'm kind of thinking that we should normalize the fi (and ici 
for that matter) with the area overwhich each measure measure is computed...

*pfi = fi / (4.0*M_PI) / areaCounted;

This makes potentially more sense and removes the area dependency. What do you 
think, Bruce? 

-=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] Folding Index question (fwd)

2007-11-19 Thread Rudolph Pienaar
On Monday 19 November 2007 09:07, Graham wrote:
> 1. DVE's description of the FI calc, which it looks like FS implements
> (assuming FS's k calcs are faithful -- that code is hard to follow.)

Yep - that the code can be hard to follow. Still, you can assume that FS's k 
calcs are faithful. But on deeper reflection, the FI calculation in FS has a 
core area-dependency in the code that probably should be normalized out.

>
> a) Cylindricallity of gyri and sucli do not contribute equally -- one is
> emphasized and the other suppressed. (KMax,Kmin = (5,0) --> FI of 25, vs
> KMax,Kmin = (0, -5) --> FI of 0; I think these are the gyral and sulcal
> versions of the same shape, right?)
>

Ok - I suspect you need to think of Kmax and Kmin (also known as the principle 
k1 and k2 curves) in absolute terms when comparing. The sign really only 
indicates if the surface is curving "inwards" or "outwards", and doesn't 
convey comparative magnitude. So, in the case where one of the principle 
curves is -5 and the other is 0, k1=-5 and k2=0 (Kmax=-5 and Kmin=0), 
resulting in the same values for gyri and sulci.


> b) Certain moderate saddle shapes contribute *negatively*, though the
> *extreme* saddle shapes contribute *zero*.

This I can't immediately comment on, but even if there is contribution from a 
saddle shape (i.e. k1 should be approximately k2), so the FI should be close 
to zero.

Switching tracks, you might be interested in the 
re-vamped 'mris_curvature_stats', which has kind of morphed into the main 
curvature measure tool in FS.

This tool now computes several principle curvature functions on a given 
surface (optionally saving each as a curvature file), and also determines 
area- and vertex-normalized integrals for the different functions. 
Furthermore, the functions and integrals are also computed for only positive 
and negative curves (or Gaussian curvatures) separately, so sulci and gyri 
are easily distinguishable.

One of the measures is a so-called "sharpness function", which is conceptually 
related to Van Essen's FI:

Sharpness   = (k1-k2)^2
Van Essen FI= abs(k1)*(abs(k1)-abs(k2))

The sharpness function gives an indication of how sharply folded a gyrus or 
sulcus is.

What version of 'mris_curvature_stats' are you running? It has seen some 
active development over the past summer, so you might not have the newest 
version. Give me a shout if you'd like the current dev version.

Cheers
-=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


[Freesurfer] Convert from {png,jpg} --> dicom

2007-12-14 Thread Rudolph Pienaar
Hi -

Does anyone have any advice/experience on converting/creating DICOMS from 
arbitrary image formats like png or jpg? 

Basically I have a set of post-processed png images that were derived from a 
set of DICOMS. I'd like to convert these png images back into DICOM again.

Many thanks
-=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] apple leopard 64 bit

2008-01-17 Thread Rudolph Pienaar
On Thursday 17 January 2008 12:16, Nick Schmansky wrote:>
> Until then, what problems does the Tiger build of freesurfer have when
> run on Leopard?
>
> Nick
>
> On Thu, 2008-01-17 at 11:25 -0500, Kirk, Gregory wrote:
> > Hi all,
> >
> > Are there plans to release binaries for the Mac Leopard 64 bit

I've been running the Tiger binaries on 64 Leopard for a while now. Everything 
works fine.

-=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] version for windows- a simple tool

2008-09-08 Thread Rudolph Pienaar
On Saturday 06 September 2008 16:50:53 asaf achiron wrote:
>
> do you have a version that can run on windows (we have it in the hospital).
>

No, sorry - FreeSurfer is Linux and Mac only. We have looked at Windows 
porting (using 'cygwin') but for now there is no Windows version.

The best solution would be for you to take a "spare" Windows box and either 
reformat and install Linux, or re-partition and install Linux (creating a 
dual-boot machine).

You could, in a pinch, if you have a Windows box with enough free space, 
install VMware player (it's free, search on google) and search for a CentOS 
Linux image. This will allow you to run Linux from within Windows. It's not 
recommended as the hardware requirements on the host (Windows machine) are 
quite high, but it is doable.

> i have mac at home but i don't know how to script- maybe do you have a gui
> version?
>

FreeSurfer isn't "run" from a GUI. You will need to use a terminal (but it's 
quite straightforward -- see the FreeSurfer wiki). You should be able to run 
it on your mac at home, provided:

* it has an intel CPU running Mac OS X 10.4 (tiger) or 10.5 (leopard)
* has at the very least 1GB of RAM, although I'd not recommend this. 2GB is 
really the minimum to be comfortable.

Hope this helps...

Cheers
-=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] Problem to run FreeSurfer for under one year old baby subject

2008-09-08 Thread Rudolph Pienaar
Running children brains that are less than about 3 yrs old through FreeSurfer 
is not currently supported. Other than registration issues, because of 
incomplete white matter myelination at this age, T1 contrast is either all 
wrong from FreeSurfer's perspective, or inconsistent).



On Monday 08 September 2008 15:10:40 Yuan Xu wrote:
> Hello all,
>  
>     I have trouble to run FreeSurfer for under one year old baby subjects,
> the most frequently problems are two: one is stop to run without exit in
> mri_fix_topology, and other one is error exit on talairach_afd: Talairach
> Transform:FAILED Does someone know how to solve the problem?
> Thanks for help,
>  
> Yuan

-- 
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] mris_pmake issue

2019-07-30 Thread Rudolph Pienaar

Apology if this is a repeat email. I used the wrong email address in my
reply. I was one of the original
authors of `mris_pmake` although it's been (quite) a few years now. I
do remember that at some point the CLI changed, and given the FS
release cycle it took a while for this to make it into production. 

Anyway, yes, the flags changed and looks like the documentation didn't.
I looked at the code and sort of (rustily) remembered where things
changed. Try using the flags below instead. You should be able to
figure out the mapping I think. So what used to be '--surface0' is now
'--surfaceFile'. Similary, the old '--surface1' is now '
--secondarySurfaceFile', etc. 

Please try with these new flags where appropriate and let us know if it
works. It would also be useful if you posted your full CLI when you try
and run a command.

Best



startVertex
endVertex
surfaceFile
secondarySurfaceFile
curvatureFile
secondaryCurvature
patchFile
labelFile
labelFileAuxSurface
costFile
b_labelFile_save
b_patchFile_save
b_transitionPenalties
b_useAbsCurvs
controlPort
timeoutSec
b_syslogPrepend
userMessages
sysMessages
resultMessages
stdout
costCurvFile
b_mpmProgUse
b_mpmOverlayUse
mpmProgID
mpmArgs
mpmOverlayArgs
b_exitOnDone
b_costPathSave
mpmOverlayID


On Mon, 2019-07-29 at 21:36 +0200, Sebastian Strauss wrote:
> External Email - Use Caution
> 
> Dear Freesurfers, 
> 
> I am trying to calculate distances using mris_pmake with Freesurfer
> Version 6.0.0. When using the command line the following error
> appears: 
> mris_pmake: unrecognized option '—surface0'
> 
> In January the similar question (
> https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg60835.html
> )  was ask but without any answers. Does anyone have the same problem
> btw any suggestions?
> 
> Thank you!
> 
> Best wishes 
> 
> Sebastian
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

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

Re: [Freesurfer] mri_curvature_stats: -a parameter has no effect and errors (FACES_aroundVertex_reorder: packed / faces mismatch and Segmentation fault)

2019-07-30 Thread Rudolph Pienaar
 order for vertex faces...
> [run_freesurfer_curvature.sh: line 10: 24318 Segmentation
> fault  (core dumped) mris_curvature_stats -f surface -m -o
> ${BASE}.stats -G --signedPrincipals --writeCurvatureFiles $SUBJECT
> $BASE 
> 
> I've searched the list and no similar errors have been reported. Does
> anyone know why the errors happen?
> Can it be because the cylinder surfaces are open and have edges?
> 
> 
> 1) FreeSurfer version: freesurfer-Linux-centos6_x86_64-stable-pub-
> v6.0.0-2beb96c
> 2) Platform: SUSE Linux Enterprise Server 12 SLES 12 SP 1
> 3) uname -a: Linux hpcl5004 3.12.74-60.64.40-default #1 SMP Wed May
> 10 05:07:16 UTC 2017 (4eb35ec) x86_64 x86_64 x86_64 GNU/Linux
> 
> Thanks and best regards
> Maria
> 
> External Email - Use Caution
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- 
Rudolph Pienaar, M.Eng, Dr.Eng / email: rudo...@nmr.mgh.harvard.edu
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] mris_pmake issue

2019-07-30 Thread Rudolph Pienaar
OK -- looked again -- and I need to fix the in-line help obviously.
Anyway, this works:

mris_pmake --subjecttestSubject \
   --hemi   lh  \
   --surfacepial\
   --curv   sulc\
   --mpmOverlay euclidean   \
   --mpmProgpathFind\
   --mpmArgsvertexStart:121981,vertexEnd:132633 

(obviously use your )

Try that and let me know.

Best


On Tue, 2019-07-30 at 17:33 +0200, Sebastian Strauss wrote:
> External Email - Use Caution
> 
> Dear Rudolph, 
> Thank you for following up. 
> I changed flags and tried it again with this command line:
> 
>  mris_pmake --subject cvs_avg35_inMNI152_temp --hemi  lh --
> surfaceFile pial --curvatureFile 
> sulc --mpmOverlayArgs euclidean --mpmProgID pathFind --mpmArgs 
> startVertex:121981,endVertex:132633
> 
> 
> There seems to be a similar problem with the flag since message is
> the same: 
> 
> mris_pmake: unrecognized option `—surfaceFile'
> 
> Any further ideas? 
> 
> Thank you for your help!
> 
> 
> Best 
> 
> 
> > Am 30.07.2019 um 16:53 schrieb Rudolph Pienaar <
> > rudo...@nmr.mgh.harvard.edu>:
> > 
> > 
> > Apology if this is a repeat email. I used the wrong email address
> > in my
> > reply. I was one of the original
> > authors of `mris_pmake` although it's been (quite) a few years now.
> > I
> > do remember that at some point the CLI changed, and given the FS
> > release cycle it took a while for this to make it into production. 
> > 
> > Anyway, yes, the flags changed and looks like the documentation
> > didn't.
> > I looked at the code and sort of (rustily) remembered where things
> > changed. Try using the flags below instead. You should be able to
> > figure out the mapping I think. So what used to be '--surface0' is
> > now
> > '--surfaceFile'. Similary, the old '--surface1' is now '
> > --secondarySurfaceFile', etc. 
> > 
> > Please try with these new flags where appropriate and let us know
> > if it
> > works. It would also be useful if you posted your full CLI when you
> > try
> > and run a command.
> > 
> > Best
> > 
> > 
> > 
> > startVertex
> > endVertex
> > surfaceFile
> > secondarySurfaceFile
> > curvatureFile
> > secondaryCurvature
> > patchFile
> > labelFile
> > labelFileAuxSurface
> > costFile
> > b_labelFile_save
> > b_patchFile_save
> > b_transitionPenalties
> > b_useAbsCurvs
> > controlPort
> > timeoutSec
> > b_syslogPrepend
> > userMessages
> > sysMessages
> > resultMessages
> > stdout
> > costCurvFile
> > b_mpmProgUse
> > b_mpmOverlayUse
> > mpmProgID
> > mpmArgs
> > mpmOverlayArgs
> > b_exitOnDone
> > b_costPathSave
> > mpmOverlayID
> > 
> > 
> > On Mon, 2019-07-29 at 21:36 +0200, Sebastian Strauss wrote:
> > >External Email - Use Caution
> > > 
> > > Dear Freesurfers, 
> > > 
> > > I am trying to calculate distances using mris_pmake with
> > > Freesurfer
> > > Version 6.0.0. When using the command line the following error
> > > appears: 
> > > mris_pmake: unrecognized option '—surface0'
> > > 
> > > In January the similar question (
> > > https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg60835.html
> > > )  was ask but without any answers. Does anyone have the same
> > > problem
> > > btw any suggestions?
> > > 
> > > Thank you!
> > > 
> > > Best wishes 
> > > 
> > > Sebastian
> > > ___
> > > Freesurfer mailing list
> > > Freesurfer@nmr.mgh.harvard.edu
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> > 
> > ___
> > Freesurfer mailing list
> > Freesurfer@nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

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

Re: [Freesurfer] mris_pmake on the inflated surface

2019-08-21 Thread Rudolph Pienaar
The in-line help in version 6.0 of FreeSurfer is incorrect
unfortunately. Please try the following for example:

mris_pmake --subjecttestSubject \
   --hemi   lh  \
   --surfacepial\
   --curv   sulc\
   --mpmOverlay euclidean   \
   --mpmProgpathFind\
   --mpmArgsvertexStart:121981,vertexEnd:132633 

to determine the distance on subject 'testSubject' for the lh.pial
surface. Of course, adjust as necessary.

best



On Wed, 2019-08-21 at 14:35 -0400, Lee, Jeungchan wrote:
> Hi,
> 
>  
> 
> I’m trying to calculate Dijkstra distance between startVertex and
> endVertex on the inflated surface (fsaverage, lh.inflated) using
> mris_pmake.
> 
> I see several options: --surface0, --surface1, --curv0, --curv1
> 
>  
> 
> I think I can use ‘--surface0 inflated’, but not sure about other
> options e.g., --surface1, --curv0, and --curv1.
> 
> I read the instruction (curv0 for curvature, curv1 for height
> parameter…) but was not able to understand what those mean exactly
> and what to use.
> 
>  
> 
> Would you explain what the meaning is and what to use?
> 
>  
> 
> Here is the command line that I have:
> 
> Mris_pmake --subject fsaverage --hemi lh --surface0 inflated --curv0
> sulc --curv1 sulc --mpmOverlay euclidean --mpmProg pathFind --mpmArgs 
> `more ./input_D.txt` (where input_D.txt says
> startVertex:8762,endVertex:1, for example)
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> jeungchan
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- 
Rudolph Pienaar, Dr.Eng  
__

Staff Scientist 
  Boston Children's Hospital
Department of Radiology
   mailstop: BCH3181
  300 Longwood Avenue
   Boston, MA, 02115
__
  Technical Director 
 Fetal-Neonatal Neuroimaging and Developmental Science Center
Landmark Center, 401 Park Drive 
  Office LM7092 (East)
   Boston, MA, 02215
__
mailto:rudolph.pien...@childrens.harvard.edu 
http://fnndsc.babymri.org
-o- +1-857-218-5139
-f- +1-617-730-4671

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

[Freesurfer] Creating annotation file for lobar regions...

2010-05-20 Thread Rudolph Pienaar
Hi all --

Is there a simple way to create an annotation for 
frontal/temporal/occipital/parietal lobes based off the ?h.aparc.annot 
files in a FS 'label' dir? Ideally speaking, I'd like to have a 
?h.lobar.annot with corresponding lobar.annot.ctab.

Apologies if this question has come up before... a quick google didn't 
reveal anything.

Many thanks
-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Creating annotation file for lobar regions...

2010-05-24 Thread Rudolph Pienaar
Great -- many thanks, Doug. What are the newly annotated regions named?

Basically, once I do a MatLAB

[list, label, annot] = read_annotation('lh.lobes.annot');

what are the annot.struct_names?

>
> Try running mri_annotation2label with --lobes lh.lobes.annot
>
> doug
>
>
> On Thu, 20 May 2010, Rudolph Pienaar wrote:
>
>> Hi all --
>>
>> Is there a simple way to create an annotation for
>> frontal/temporal/occipital/parietal lobes based off the ?h.aparc.annot
>> files in a FS 'label' dir? Ideally speaking, I'd like to have a
>> ?h.lobar.annot with corresponding lobar.annot.ctab.
>>
>> Apologies if this question has come up before... a quick google didn't
>> reveal anything.
>>
>> Many thanks
>> -=R
>>
>>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] saving snapshots with white background

2010-06-25 Thread Rudolph Pienaar
You can do this using the 'convert' binary from ImageMagick (installed 
by default in most Linux distros):

# convert black backgrounds to white:
# (and from tiff to jpg)
/bin/ls -1 *.tiff | sed 's|\(.*\)\.tiff|convert -fill white -opaque 
black \1.tiff \1.jpg|' | sh -v


On 6/25/10 14:26 , ythomas wrote:
> Hi,
>
> Is there an option to save snapshots in tksurfer with a white
> background instead of the usual black?
>
> Thanks,
> Thomas
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Annoying mri_convert

2010-10-05 Thread Rudolph Pienaar
FreeSurfer offers 'mris_calc' which is similar to 'fslmaths'. I'm a bit 
confused with your fslmaths line, but you should be able to do a similar 
operation using 'mris_calc':

(assuming you have 'right_vect_mask_inv.nii.gz' and right_vect_mask.nii.gz')

$>mris_calc -o aparc+aseg_masked.mgz aparc+aseg.mgz maskedby 
right_vect_inv.nii.gz

$>mris_calc -o aparc+aseg2.mgz aparc+aseg_masked.mgz add 
right_vect_mask.nii.gz

will result in 'aparc+aseg2.mgz' which is the original aparc+aseg.mgz 
masked by the right_vect_inv.nii.gz added to right_vect_mask.nii.gz

Perhaps worth trying with 'mris_calc'?


On 10/5/10 16:24 , Wayne Su wrote:
> Well, I tried to avoid FSL, and used only Freesurfer tool to do the same
> thing. I found there was the same issue when an image with 32-bit float
> point data type converts to 32-bit integer. No problem for the
> convertion from 32-bit float point to 8-bit unsigned integer.
>
> Wayne
>
>
> On 05/10/10 10:44 AM, "Wayne Su"  wrote:
>
> Hello Freesurfer Users,
>
> I am feeling very bad when I am using mri_convert. There are two
> problems:
>
>1. When I converted a file in mgz format to nii.gz format, and
>   did some volume calculation (mask and addition) by using
>   fslmaths from FSL, then converted back to mgz. If the image
>   type is uchar, it works fine. If the image type is int, the
>   intensities changed. The ‘0’ value is changed to ‘–2.1e+09’,
>   others also in very large number (look like read the data from
>   wrong place). Here is the code I used:
>
>
> ${FREESURFER_HOME}/bin/mri_convert aparc+aseg.mgz aparc+aseg.nii.gz
> -odt int
> ${FSLDIR}/bin/fslmaths aparc+aseg -mas right_vect_mask_inv -add
> right_vect_mask aparc+aseg
> ${FREESURFER_HOME}/bin/mri_convert aparc+aseg.nii.gz aparc+aseg.mgz
> -odt int
>
> If no fslmaths calculation, convert back to mgz right way, no
> problem found.
>
> 2. when the –conform is used, some head were rotated a little bit,
> but not for others. I am wondering how to avoid the rotation?
>
> Regards,
> Wayne
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to
> whom it is
> addressed. If you believe this e-mail was sent to you in error and
> the e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to
> you in error
> but does not contain patient information, please contact the sender
> and properly
> dispose of the e-mail.
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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] 3D view in freeview

2010-11-17 Thread Rudolph Pienaar
Try using 'mris_decimate_gui' -- if you pass it a --decimationLevel of 
1.00, you can view the surface (un-decimated) and add tweak the "Up 
Vector" and "Position" to move the viewpoint.

Look at 'mris_decimate_gui -h' for more options. You can also on startup 
specify a view rotation.

HTH
-=R


On 11/17/10 09:42 , Marco Loggia wrote:
> Dear all,
>
> I am trying to use the 3D view in freeview to prepare some figures, and
> would like to be able to rotate the volume along one axis only (e.g., yaw).
>
> Is there a way to constrain the rotation with the mouse, and/or to enter
> the numerical value of parameters such as azimuth and elevation?
>
> Thanks,
>
> Marco
>
>
> _
>
> Marco L. Loggia, PhD
>
> Postdoctoral Fellow, MassGeneralHospital& Brigham and Women's Hospital
>
> HarvardMedicalSchool
>
> CNYBuilding 120, suite101E
>
> Charlestown, Massachusetts02129
>
> Phone: (617) 643-7267
>
> Fax: (617) 643-7340 ma...@nmr.mgh.harvard.edu
>
>
>
> ___________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] 3D view in freeview

2010-11-17 Thread Rudolph Pienaar
It's in the 'dev' tree. You'll have to source the nmr-dev environment

On 11/17/10 10:24 , Marco Loggia wrote:
> Thanks Rudolph.
>
> I don't seem to have that command in my path... I take it is not in the
> standard FreeSurfer distribution (version 5) available here at MGH.
>
> Where do I find it?
>
> Thanks,
> Marco
>
> -Original Message-
> From: Rudolph Pienaar [mailto:rudo...@nmr.mgh.harvard.edu]
> Sent: Wednesday, November 17, 2010 10:06 AM
> To: Marco Loggia
> Cc: 'freesurfer'
> Subject: Re: [Freesurfer] 3D view in freeview
>
> Try using 'mris_decimate_gui' -- if you pass it a --decimationLevel of
> 1.00, you can view the surface (un-decimated) and add tweak the "Up
> Vector" and "Position" to move the viewpoint.
>
> Look at 'mris_decimate_gui -h' for more options. You can also on startup
> specify a view rotation.
>
> HTH
> -=R
>
>
> On 11/17/10 09:42 , Marco Loggia wrote:
>> Dear all,
>>
>> I am trying to use the 3D view in freeview to prepare some figures, and
>> would like to be able to rotate the volume along one axis only (e.g.,
> yaw).
>>
>> Is there a way to constrain the rotation with the mouse, and/or to enter
>> the numerical value of parameters such as azimuth and elevation?
>>
>> Thanks,
>>
>> Marco
>>
>>
>> _
>>
>> Marco L. Loggia, PhD
>>
>> Postdoctoral Fellow, MassGeneralHospital&  Brigham and Women's Hospital
>>
>> HarvardMedicalSchool
>>
>> CNYBuilding 120, suite101E
>>
>> Charlestown, Massachusetts02129
>>
>> Phone: (617) 643-7267
>>
>> Fax: (617) 643-7340 ma...@nmr.mgh.harvard.edu
>>
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] inter vertex distance

2010-12-28 Thread Rudolph Pienaar
If you run 'mris_curvature_stats' on the surface (see 
'mris_curvature_stats -u' for usage help), one of the summary rows in 
the report is the average inter vertex distance.

You could probably just do:

 $>mris_curvature_stats -F smoothwm   lh curv

given appropriate SUBJECTS_DIR env variable which will give the average 
vertex separation distance on the lh.smoothwm surface (plus some stats 
on the lh.curv curvature file).




On 12/27/2010 10:22 PM, YUMI MAEDA wrote:
> HI,
>
> I am wondering if there is a way to calculate inter vertex distance on
> fsaverage surface with freesurfer. thanks for your help.
>
> YUMI
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] inter vertex distance

2010-12-28 Thread Rudolph Pienaar
On 12/28/2010 12:20 PM, Vitaly Napadow wrote:
> is there a command where i can input the two vertices and the output
> is separation distance?
>

Yes -- sort of. There is an app called 'mris_pmake' that calculates 
paths on FreeSurfer meshes based on Dijkstra's algorithm. Mesh edges can 
be arbitrarily weighed. It can be used in a mode where it is fed two 
vertex indices, and it calculates the shortest path across the mesh 
between then two (the edge cost function is set such that each edge 
weight is equal to the edge length). This is not the same as the 
geodesic distance, since 'mris_pmake' is constrained to run along the 
actual mesh, but can be a reasonable approximation. I can give you more 
info if you'd like. It was written for a different, batch-orientated 
purpose, but can be used in this way. It's been in dev/alpha status for 
more than a year or so, so it does need some handholding to run.

-=R

-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] [New release] - iSurf Brainview 2.1.0

2011-03-17 Thread Rudolph Pienaar
If I had an iOS device, this sounds like a wonderful app, Pedro... Any 
chance of an Android version?? :-P

-=R

On 3/17/11 16:42 , Pedro Paulo de Magalhães Oliveira Junior wrote:
> Today it was released a new major upgrade of iSurf Brainview. (2.1.0)
>
> New features:
> - New Atlas: Chistophe Destrieux 2009 Atlas
>
> - Improved Interface
> - Retina Display
> - iOS 4.3
>
> As usual suggestions are welcome.
>
> Upcoming features will include 3D visualization.
>
> The link for download is:
> http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=381072423&mt=8
> <http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=381072423&mt=8>
>
> Cheers
>
> Pedro Paulo Jr.
>
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



  1   2   >