Right but Freesurfer has routines where it can represent the 2d vector in several "slices" that will fit in the Nifti dimensions.  It does require that the number of vertices can be factored evenly with the largest factor < 2**15, which tends not to be the case with single-subject surfaces but is the case for fsaverage and I wonder if they build those constraints into the make_average_surface algorithm.<div>

<br></div><div>Try running:</div><div><br></div><div>mri_surf2surf --sval lh.yourimage.mgz --tval lh.newimage.nii.gz --reshape --s subject_id --hemi lh</div><div><br></div><div>And you may or may not get a warning about compatibility with other programs.</div>

<div><br></div><div>Michael</div><div><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 11:51 PM, Gregory Kirk <span dir="ltr"><<a href="mailto:gkirk@wisc.edu">gkirk@wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

no it cannot be fit into a nifti, it is only cortical surface values not volume information ( 2D information).there are n_subjects x n_cortical_thickness_values ,in this case 60 x ~200,000<br>
<br>
<br>
<br>
<br>
it needs to be imported into an object with 60 samples each with 200,000 features.<br>
<div class="im"><br>
<br>
greg<br>
<br>
On 10/05/11, Michael Waskom   wrote:<br>
</div>> Does the make_average_subject routine guarantee that the surface can be reshaped to fit into Nifti?  If so, it&#39;s probably easiest to just stick the timeserieses together in a reshaped nifti and read that in with Nibabel.<br>


><br>
><br>
><br>
><br>
><br>
><br>
> Or feel free to just steal the read_scalar_data function from the PySurfer source.  It&#39;s quite simple :)<br>
><br>
><br>
> <a href="https://github.com/nipy/PySurfer/blob/master/surfer/io.py#L108" target="_blank">https://github.com/nipy/PySurfer/blob/master/surfer/io.py#L108</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
> Best,<br>
> Michael<br>
><br>
> On Wed, Oct 5, 2011 at 6:59 PM, Gregory Kirk <<a href="mailto:gkirk@wisc.edu">gkirk@wisc.edu</a> <<a href="mailto:gkirk@wisc.edu">gkirk@wisc.edu</a>>> wrote:<br>
><br>
><br>
><br>
> ><br>
><br>
> > i use the &#39; old way&#39; in freesurfer, so i made an average surface with make_average_subject, then resampled allmy subjects onto it with mris_preproc and the resulting file is in .mgh format.<br>
<div class="im">> ><br>
><br>
> ><br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> > i know i can load the data into a matlab matrix with a freesurfer matlab script, i am forced to use<br>
> ><br>
><br>
> > the redhat derived scientific linux as that is what is installed by the IT guys for us. so earlier today<br>
> ><br>
><br>
> > i had an e-mail with Yarik about the C++ compile errors i was getting and he was going to get back to me.<br>
> ><br>
><br>
> > so at the moment maybe installing the Pysurfer module may not be as easy for me as i cant just apt-get install<br>
> ><br>
><br>
> > and be sure it will go smooth, so for a first crack<br>
> ><br>
><br>
> > im hoping the load matlab mat  method that i got in an earlier e-mail from the list may be more simple, although<br>
> ><br>
><br>
> > as i get rolling maybethe viewer you suggest sounds interesting.<br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> > thanks, ill be in touch once i get the basic PyMVPA running<br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> > cheers<br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> > Greg<br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> > On 10/05/11, Michael Waskom   wrote:<br>
> ><br>
><br>
> > > As I understand the question, you want to use morphometric data that&#39;s been transformed into some standard space (i.e. you&#39;ve run recon-all -qcache), so actually you wouldn&#39;t use read_morph_data (which only applies to the morphometric data files in the format that gets spit out of recon-all) but rather read_scalar_data, which will read in either Freesurfer .mg{hz} files (which is probably the format your data are in) or anything that&#39;s readable by nibabel.  Note that it will always just return a vector of datapoints matching the vertices in surface the scalar data file, even if the underlying data is a "reshaped" nifiti file which is probably what you want anyway if you&#39;re sticking it together into a dataset sample matrix.<br>


> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > The other upside of installing PySurfer is that you can then display pretty MVPA results with a lot more flexibility than tksurfer offers you :)<br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > Best,<br>
> ><br>
><br>
> > > Michael<br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> ><br>
</div><div class="im">> > > On Tue, Oct 4, 2011 at 7:02 PM, Yaroslav Halchenko <<a href="mailto:debian@onerussian.com">debian@onerussian.com</a> <<a href="mailto:debian@onerussian.com">debian@onerussian.com</a>> <<a href="mailto:debian@onerussian.com">debian@onerussian.com</a> <<a href="mailto:debian@onerussian.com">debian@onerussian.com</a>>>> wrote:<br>


> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > another possible (haven&#39;t tried... unfortunately I am still ignorant in<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > FreeSurfer ;) ) way is<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > >  sudo apt-get install python-surfer<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > and then in python<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> ><br>
</div>> > > >   from <a href="http://surfer.io" target="_blank">surfer.io</a>(<a href="http://surfer.io" target="_blank">http://surfer.io</a>)(<a href="http://surfer.io" target="_blank">http://surfer.io</a>) import read_morph_data<br>


<div class="im">> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > >   x =  read_morph_data(filename)<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > and then combined them into dataset as Per mentioned.<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > On Tue, 04 Oct 2011, Per B. Sederberg wrote:<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > Hi Greg:<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > You can save out that big matrix to a mat file from matlab (say the<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > matrix is named mymat and you save it to mymatrix.mat) and then read<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > it in with:<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> ><br>
</div>> > > > > import <a href="http://scipy.io" target="_blank">scipy.io</a>(<a href="http://scipy.io" target="_blank">http://scipy.io</a>)(<a href="http://scipy.io" target="_blank">http://scipy.io</a>)<br>


<div class="im">> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > x = scipy.io.loadmat(&#39;mymatrix.mat&#39;)[&#39;mymat&#39;]<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > Then in pymvpa (depending on the version you are using) you can get it<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > ready for business with:<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > from mvpa.suite import *<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > dat = dataset_wizard(x, targets=cov_of_interest, chunks=range(len(x)))<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > Then you can can start analyzing away...<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > Best,<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > > Per<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > > --<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > =------------------------------------------------------------------=<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> ><br>
</div>> > > > Keep in touch                                     <a href="http://www.onerussian.com" target="_blank">www.onerussian.com</a>(<a href="http://www.onerussian.com" target="_blank">http://www.onerussian.com</a>)(<a href="http://www.onerussian.com" target="_blank">http://www.onerussian.com</a>)<br>


> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > Yaroslav Halchenko                 <a href="http://www.ohloh.net/accounts/yarikoptic(http://www.ohloh.net/accounts/yarikoptic)(http://www.ohloh.net/accounts/yarikoptic(http://www.ohloh.net/accounts/yarikoptic))" target="_blank">www.ohloh.net/accounts/yarikoptic(http://www.ohloh.net/accounts/yarikoptic)(http://www.ohloh.net/accounts/yarikoptic(http://www.ohloh.net/accounts/yarikoptic))</a><br>


> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > _______________________________________________<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > Pkg-ExpPsy-PyMVPA mailing list<br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a> <<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a>> <<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a> <<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a>>><br>


<div><div></div><div class="h5">> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
> ><br>
><br>
> ><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > ><br>
> ><br>
><br>
> > > _______________________________________________<br>
> ><br>
><br>
> > > Pkg-ExpPsy-PyMVPA mailing list<br>
> ><br>
><br>
> > > <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a> <<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a>><br>


> ><br>
><br>
> > > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> ><br>
> ><br>
><br>
> > _______________________________________________<br>
> ><br>
><br>
> > Pkg-ExpPsy-PyMVPA mailing list<br>
> ><br>
><br>
> > <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a> <<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a>><br>


> ><br>
><br>
> > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
> ><br>
><br>
> ><br>
> ><br>
> ><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Pkg-ExpPsy-PyMVPA mailing list<br>
> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
<br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br></div>