Added a shell script mri2mesh/mri2mesh.sh #96
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The script calls FreeSurfer via
mri2mesh/fs2zef.sh
to construct MRIsegmentation ASCII files, which Zeffiro Interface then reads in to
generate a set of finite element meshes.
Also allowed
.sh
and.zef
files in.gitignore
. A compilation ofall the individual commit messages this commit consisted of before
squashing are listed below (if the Git message field length allows).
.gitignore: allowed shell (.sh) scripts
Added zef_create_head_model.sh
Currently Zeffiro Interface throws an error when smoothing and
refinement are turned on in the variable ZEF_INPUT_SCRIPT.
zef_create_head_model: deactivated mesh smoothing and refinement
Added multicompartment_head_settings.m
This is to be passed to Zeffiro Interface in zef_create_head_model.sh,
in the input script.
zef_create_head_model: updated Zeffiro input script with multicompartment_head_settings.m
Also quoted paths stored in other variables.
script_zef_create_head_model: started preparing for looping over all subjects in a given directory
Still a few error cases to be handled in the for loop, before one should
dare trying to actually run Matlab.
zef_create_head_model: the script now starts ZI
Need to make sure it still works. Might have to terminate processes
manually when run.
Subject output file messages uncommented
Added files {mri2mesh,fs2zef}.sh to project root
The routine
mri2mesh.sh
is a rework of thezef_create_head_model.sh
,which also calls
fs2zef.sh
to create the required text segmentationfiles in target subject folders. Currently only this step is implemented
in one form or another, but the intention is to include the mesh
generation in later, once this part is deemed to work.
mri2mesh: automated import script copying to FreeSurfer target folders
Also prettified output and updated comments.
mri2mesh: added paths required for mesh generation
script_zef_create_head_model: added mesh generation line
import_segmentation.zef: removed line with electrodes
Now the relevant data should start on line 56. Header lenght hardcoded
as 55 in Zeffiro.
.gitignore: allowed .zef files
mri2mesh: moved all related files into folder mri2mesh/
Also changed the import script path in
mri2mesh.sh
to reflect this.Both
fs2zef.sh
andimport_segmentation.zef
are now expected to belocated in the same folder with
mri2mesh.sh
.A README with instructions was also added to the folder.
multicompartment_head_settings also moved to mri2mesh/
Deleted zef_create_head_model as unnecessary
The script
mri2mesh.sh
repaces this.mri2mesh: added a check for the existence of the MRI2ZEF folder...
... and added the variable ZI_DIR, which is assumed to point to the
parent folder of mri2mesh/.
mri2mesh: temporarily add zefiro_interface/ and mri2mesh/ to Matlab path
mri2mesh: added a check for the existence of zeffiro_interface.m in the supposed Zeffiro Interface folder
The script also now automatically changes the working directory to the
ZI folder and then back to the one where the script was called from,
once it is done running.