More information, error from tksurfer is as following:

========================
MRISalloc(16711682, 480): could not allocate vertices
Cannot allocate memory
============


---------- Forwarded message ----------

From: peng <prion.w@gmail.com>
Date: Fri, May 9, 2014 at 1:01 PM
Subject: a question on flat surface
To: "Freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>


Hi Freesurfers,

   I have tried to obtain a flat surface as described by the upper part (full cortex) of the following page:

   http://freesurfer.net/fswiki/FreeSurferOccipitalFlattenedPatch

   However, I failed to load the results in freeview (it took forever), nor can I read in matlab with read_surf. The error in matlab is as following 
======
Error using reshape
To RESHAPE the number of elements must not change.

Error in read_surf (line 77)
vertex_coords = reshape(vertex_coords, 3, vnum)' ;
======
   Thus I suspect in the newly generated surface, the number of vertices in the header does not meet that indicated by the data. I did sth wrong.

Questions:
1 Is this webpage still up-to-date or I shall try something new to flatten the surface?
2 Probably there are "frequently made mistakes" during my manual process, would you please give me a hint? I my case afterwards mris_flatten took 2-3 hours.

btw: the inflated surface is OK either checked by freeview or matlab.

best
Peng