pycortex
pycortex copied to clipboard
cutting surface using Blender
I am using glrework-merged branch.
When I used Blender to cut the cortex, I got the wrong flatten results by using cortex.segment.cut_surface(). The result of the segmentation is shown in the following figure.
The flatten result is shown in the following figure. As you can see, the flatten cortex becomes a combination of many fragments.
In addition, when blender is in the edit mode, the cerebral cortex is shown as below
When some of the faces were deleted, the cerebral cortex was shown as shown below. So I don't know what is the reason for this change.
I'm not familiar with the use of Blender, so can you provide a tutorial on how to use blender for the cut of the cortex
Hi there, You've deleted vertices instead of marking the seams. This will upset the vertex order, and will cause face scrambling as you observed. Using blender for flattening goes along two steps:
- Select the medial wall using the standard selection tools, the delete ONLY FACES AND EDGES.
- Select the cuts by ctrl-clicking along the cut line (to select shortest paths), the marking the line as a seam in blender.
Once you've saved the file, pycortex will understand how to process the surface for flattening. You will likely need to start over with a new blender file, so go inside your filestore and delete the .blend files for this subject to start over.
Wow, it works, thank you very much for your quick response.
Jiancheng Sun
Hi Gao, There's a new problem when the cortex.segment.cut_surface() finished. I use the API as: cortex.segment.cut_surface("subject_test","lh")
The results were shown as:
... optimization complete. unfolding took 2.08 hours MRISunfold() return, current seed -1517898844 writing flattened patch to /home/sunjc/program/freesurfer_DIR/subject_test/surf/lh.flatten.flat.patch.3d created by sunjc on Mon Jan 29 13:24:59 2018
saving to /home/sunjc/program/anaconda2/share/pycortex/db/subject_test/surfaces/flat_lh.gii created by sunjc on Mon Jan 29 13:25:03 2018 saving to /home/sunjc/program/anaconda2/share/pycortex/db/subject_test/surfaces/flat_rh.gii
As you can see, two flatten files were created, i.e. flat_lh.gii and flat_rh.gii. what's meaning with two files? I think this command can only produce flat_lh.gii.
At this point, I run the example plot_dataset_arithmetic.py (rh hemisphere has not been flattened.), and the result was shown as:
In addition, I observed that there are two blend files (The suffix names are .blend and .blend1, respectively) under the directory ./anaconda2/share/pycortex/db/subject_test/anatomicals, cutsurf[hemi=rh,name=flatten].blend and cutsurf[hemi=rh,name=flatten].blend1, respectively. Is this normal?
Jiancheng Sun
- Select the medial wall using the standard selection tools, the delete ONLY FACES AND EDGES.
- Select the cuts by ctrl-clicking along the cut line (to select shortest paths), the marking the line as a seam in blender.
Wow, it works, thank you very much for your quick response.
Jiancheng Sun
Hello, Sun. can I ask you the details about Blender just for a while. Would you please share your e-mail address? Or any available access?