Re: [Freesurfer] OBJ conversion

2012-05-03 Thread Anderson Winkler

Hi Gabriel,

Once you have the surface in FS binary format (native format), the 
command to convert to surface ASCII I believe is mris_convert. Not sure 
if mri_convert will work as I think that is for volumes.


With the surface ASCII in hands, then run:

/srf2obj surface.asc > surface.obj/

Note that the symbol ">" is needed to redirect the converted result to a 
new file.


Hope this helps!

All the best,

Anderson


On 03/05/12 10:16, Gabriel Gonzalez Escamilla wrote:

Dear Anderson,
I have seen this message and I'm currently trying to use your script 
"srf2obj" to convert to obj format some surfaces created by FS, 
firstly i did convert the aseg into a volume in the native space using 
"mri_convert", after that, i'd transform the aseg volume into a 
surface mgh format (mri_vol2surf), then store the surface as ascii by 
using "mri_convert" then I'm using your script to convert that surface 
to an object file but always renturns the following error:


aplication srf2obj

gawk: /root/trabajo/freesurfer/bin/srf2obj:2:
' inválido en la expresiónrfer/bin/srf2obj:2: ^ caracter '

I'm working under centOS 4.3

Best Regards,
Gabriel




El 22/02/12, *Anderson Winkler *  escribió:


Hi Darshan,

If you'd like to go directly from FreeSurfer .asc to OBJ, the 
attached little script should do the trick...


Hope it helps!

All the best,

Anderson



On 21/02/12 16:59, Pedro Paulo de Magalhães Oliveira Junior wrote:

There's a how-to in the FreeSurfer website: 
http://surfer.nmr.mgh.harvard.edu/fswiki/HowTo/HowTo


Pedro Paulo Jr.

On Mon, Feb 20, 2012 at 23:32, Manfred G Kitzbichler 
> wrote:


Hi Darshan,

as Bruce suggested, you can use mris_convert to get an STL file
which you can import into Blender or MeshLab. Both write
Wavefront OBJ files.

- Manfred



On 02/20/2012 07:24 PM, Darshan P wrote:

Hello all,

I was wondering if I can convert the surface outputs to an OBJ
mesh file format .
Since most of the applications are in windows I was hoping if
there is conversion tool to do this .

Regards
Darshan


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



-- 
Manfred G. Kitzbichler


,
Research Fellow
Harvard Medical School & Mass General Hospital
Martinos Center for Biomedical Imaging
149 Thirteenth Street, Rm 10.018
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 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.




--
--
PhD. student Gabriel González-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggon...@upo.es
http://www.upo.es/neuroaging/es/


___
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


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

Re: [Freesurfer] OBJ conversion

2012-05-03 Thread Gabriel Gonzalez Escamilla
Dear Anderson, I have seen this message and I'm currently trying to use your script "srf2obj" to convert to obj format some surfaces created by FS, firstly i did convert the aseg into a volume in the native space using "mri_convert", after that, i'd transform the aseg volume into a surface mgh format (mri_vol2surf), then store the surface as ascii by using "mri_convert" then I'm using your script to convert that surface to an object file but always renturns the following error:aplication srf2objgawk: /root/trabajo/freesurfer/bin/srf2obj:2:' inválido en la expresiónrfer/bin/srf2obj:2: ^ caracter 'I'm working under centOS 4.3 Best Regards,GabrielEl 22/02/12, Anderson Winkler   escribió:

  


  
  
Hi Darshan,

If you'd like to go directly from FreeSurfer .asc to OBJ, the
attached little script should do the trick...

Hope it helps!

All the best,

Anderson



On 21/02/12 16:59, Pedro Paulo de Magalhães Oliveira Junior wrote:
There's a how-to in the FreeSurfer website: http://surfer.nmr.mgh.harvard.edu/fswiki/HowTo/HowTo
  
  
  Pedro Paulo Jr.


  On Mon, Feb 20, 2012 at 23:32, Manfred G Kitzbichler >
  wrote:
  
 Hi Darshan,
  
  as Bruce suggested, you can use mris_convert to get an STL
  file which you can import into Blender or MeshLab. Both
  write Wavefront OBJ files.
  
      - Manfred
  

  
  
  On 02/20/2012 07:24 PM, Darshan P wrote: 
  
  

  

  Hello all,
  
  
  I was wondering if I can convert the surface
outputs to an OBJ mesh file format . 
  Since most of the applications are in windows
I was hoping if there is conversion tool to do
this .
  
  
  Regards
  Darshan




  

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
   
  
  -- 
Manfred G. Kitzbichler,
Research Fellow
Harvard Medical School & Mass General Hospital
Martinos Center for Biomedical Imaging
149 Thirteenth Street, Rm 10.018
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 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.



  

-- --PhD. student Gabriel González-EscamillaLaboratory of Functional NeuroscienceDepartment of Physiology, Anatomy, and Cell BiologyUniversity Pablo de OlavideCtra. de Utrera, Km.141013 - Seville- Spain -Email: ggon...@upo.eshttp://www.upo.es/neuroaging/es/
___
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-mai

Re: [Freesurfer] OBJ conversion

2012-02-22 Thread Anderson Winkler

Hi Darshan,

If you'd like to go directly from FreeSurfer .asc to OBJ, the attached 
little script should do the trick...


Hope it helps!

All the best,

Anderson



On 21/02/12 16:59, Pedro Paulo de Magalhães Oliveira Junior wrote:
There's a how-to in the FreeSurfer website: 
http://surfer.nmr.mgh.harvard.edu/fswiki/HowTo/HowTo


Pedro Paulo Jr.

On Mon, Feb 20, 2012 at 23:32, Manfred G Kitzbichler 
mailto:manfr...@nmr.mgh.harvard.edu>> 
wrote:


Hi Darshan,

as Bruce suggested, you can use mris_convert to get an STL file
which you can import into Blender or MeshLab. Both write Wavefront
OBJ files.

- Manfred



On 02/20/2012 07:24 PM, Darshan P wrote:

Hello all,

I was wondering if I can convert the surface outputs to an OBJ
mesh file format .
Since most of the applications are in windows I was hoping if
there is conversion tool to do this .

Regards
Darshan


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



-- 
Manfred G. Kitzbichler


,
Research Fellow
Harvard Medical School & Mass General Hospital
Martinos Center for Biomedical Imaging
149 Thirteenth Street, Rm 10.018
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 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.


#!/bin/gawk -f

BEGIN { if (ARGV[1] == "") { 
print "Convert Surface ASCII format to OBJ."
print ""
print "Usage:"
print "srf2obj   >  "
print ""
print "The output goes to stdout. Use > to redirect to"
print "a file, as shown above"
print ""
print "_"
print "Anderson M. Winkler"
print "Yale University / Institute of Living"
print "Jan/2010"
exit } }

# Count number of vertices and faces from the 2nd record
NR == 2 { nV=$1 ; nF=$2 }

# Print vertex coordinates
NR>=3 && NR<=nV+2 { print "v", $1, $2, $3}

# Print faces' vertex indices
NR>=nV+3 && NR<=nV+nF+2 { print "f", $1+1, $2+1, $3+1 }
___
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] OBJ conversion

2012-02-21 Thread Pedro Paulo de Magalhães Oliveira Junior
There's a how-to in the FreeSurfer website:
http://surfer.nmr.mgh.harvard.edu/fswiki/HowTo/HowTo

Pedro Paulo Jr.

On Mon, Feb 20, 2012 at 23:32, Manfred G Kitzbichler <
manfr...@nmr.mgh.harvard.edu> wrote:

>  Hi Darshan,
>
> as Bruce suggested, you can use mris_convert to get an STL file which you
> can import into Blender or MeshLab. Both write Wavefront OBJ files.
>
> - Manfred
>
>
>
> On 02/20/2012 07:24 PM, Darshan P wrote:
>
>  Hello all,
>
>  I was wondering if I can convert the surface outputs to an OBJ mesh file
> format .
> Since most of the applications are in windows I was hoping if there is
> conversion tool to do this .
>
>  Regards
> Darshan
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>
> --
> Manfred G. 
> Kitzbichler,
> Research Fellow
> Harvard Medical School & Mass General Hospital
> Martinos Center for Biomedical Imaging
> 149 Thirteenth Street, Rm 10.018
> 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 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] OBJ conversion

2012-02-20 Thread Manfred G Kitzbichler

Hi Darshan,

as Bruce suggested, you can use mris_convert to get an STL file which 
you can import into Blender or MeshLab. Both write Wavefront OBJ files.


- Manfred


On 02/20/2012 07:24 PM, Darshan P wrote:

Hello all,

I was wondering if I can convert the surface outputs to an OBJ mesh 
file format .
Since most of the applications are in windows I was hoping if there is 
conversion tool to do this .


Regards
Darshan


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



--
Manfred G. Kitzbichler 
, 
Research Fellow

Harvard Medical School & Mass General Hospital
Martinos Center for Biomedical Imaging
149 Thirteenth Street, Rm 10.018
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] OBJ conversion

2012-02-20 Thread Bruce Fischl

Hi Darshan

sorry, I don't think we do. YOu can convert to ascii or vtk or stl and 
see if you can go from there (using mris_convert)


cheers
Bruce
On Mon, 20 Feb 2012, 
Darshan P wrote:



Hello all,

I was wondering if I can convert the surface outputs to an OBJ mesh file format 
. 
Since most of the applications are in windows I was hoping if there is 
conversion
tool to do this .

Regards
Darshan

___
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] OBJ conversion

2012-02-20 Thread Darshan P
Hello all,

I was wondering if I can convert the surface outputs to an OBJ mesh file format 
. 
Since most of the applications are in windows I was hoping if there is 
conversion tool to do this .

Regards
Darshan___
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.