File Exchange

image thumbnail


version 3.5.0 (578 MB) by Kevin Moerman
GIBBON: The Geometry and Image-Based Bioengineering add-ON for MATLAB


Updated 30 Apr 2021

From GitHub

View Version History

View license on GitHub

The Geometry and Image-Based Bioengineering add-On for MATLAB

GIBBON (The Geometry and Image-Based Bioengineering add-ON) is an open-source MATLAB toolbox by Kevin M. Moerman and includes an array of image and geometry visualization and processing tools and is interfaced with free open source software such as TetGen, for robust tetrahedral meshing, and FEBio for finite element analysis. The combination provides a highly flexible image-based modelling environment and enables advanced inverse finite element analysis.

IMPORTANT cite as:
K. M. Moerman, “GIBBON: The Geometry and Image-Based Bioengineering add-On,” J. Open Source Softw., vol. 3, no. 22, p. 506, Feb. 2018, doi: 10.21105/joss.00506

Example sentence to cite this work:
"... the mesh was created using the open source toolbox GIBBON (v3.5.0, Moerman et al. 2018,"

Cite As

Moerman, Kevin M. “GIBBON: The Geometry and Image-Based Bioengineering Add-On.” The Journal of Open Source Software, vol. 3, no. 22, The Open Journal, Feb. 2018, p. 506, doi:10.21105/joss.00506.

View more styles

Comments and Ratings (21)

Sitikantha Roy

Hi Kevin
I ws trying to run the DEMO_abaqus_0001_cube_uniaxial but, getting an error like bellow

Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in cell2txtfile (line 63)
fprintf(fid,'%s\r\n', T{:});

Error in febioStruct2xml>textModeElementAttributeParse (line 351)
cell2txtfile(fileName,totalTextCell,0,0); %Export to text file


CAN you tell why

Nick de Angelis

Hi there, I'm using tetgen to mesh a stl, and I'm trying to export the mesh generated into a mesh file using the -g swtich. However, no mesh file appears in my folder? has anyone else experienced this?

Brian FitzGibbon

Eleni Patelaki

Kaiyue WU

Jing-Rebecca Li

Thanks, Kevin, I'll very likely be in touch!

Sincerely, Jing-Rebecca

Kevin Moerman

Hi Jing. You are on the right track. I've now also updated the file to have installation instructions.
/trunk can be added if you use SVN. But I see what you mean that it is not added for standard .zip download. I'll change that in the instructions in the future.
Thanks, let me know how you get on kevin.moerman [at]


Jing-Rebecca Li

Hi Keven, ok, I figured it out. I was just confused by your installation instruction talking about(..\gibbon\trunk)
when in fact the zip file does not unpack to \gibbon\trunk.
You have one unpacking to GIBBON-master/
and one unpacking to Kevin-Mattheus-Moerman-GIBBON-ac7478e
and I was thinking maybe I'm missing something that creates a \gibbon\trunk directory. But I guess you just mean that it's whatever we want to name the working directory. And of course, addpath to all the subdirectories.

I hope this is the case. Anyway, I can now read the documentation and run some demos so at least that's a start! :)



Jing-Rebecca Li

Hi Kevin, thanks for your reply. I downloaded the .zip folder. As I'm not familiar with Matlab 2016 (I had a 2012 version that I used for years), could you give some details about installation? After unzipping, I enter the main folder. I see the file GIBBON.prj, is this something to be imported into Matlab in some special way? You have config, createHelpDoc, data folders, do I have to addpath in matlab to all these folders?

Usually, I look at the README file in the downloaded folder. But I don't see anything in file that's helpful for installation.

Thank you in advance for your help in answering my questions.

Jing-Rebecca Li

Kevin Moerman

Hi Jing-Rebecca,

I'm no longer providing a MLTBX file. Please follow the installation instructions here: A mltbx file is no longer provided (file changed with each release and so it is not very compatible with GIT/SVN based version control).

Let me know if you have any issues.


Jing-Rebecca Li

Hello, I would like to install and try your package. Could you tell me where is GIBBON.mltbx

I don't see this file in the zipped folder.


Jing-Rebecca Li

Sergei P.

Kevin Moerman

Hey Boyuan,

I know what you are referring to. It seems MATLAB has changed the way it handles a custom toobox. I think for now it requires installation using the "GIBBON.mltbx" file. I've now added this again to GIBBON.

I am not a fan of the .mltbx approach since it does not work well with Git or SVN. The .mltbx file quite large and compiled so updating through Git/SVN can be a bit of a pain if it changes every time.... Anyway for now that will give you the help files integrated.

Let me know if you have any issues.



Hello Kevin:

Sorry for this very late reply and thanks a lot for your help. I added the path to the GIBBON toolbox and my MATLAB can run GIBBON's functions without any issue.

But there is one more problem: I cannot make GIBBON help documentation correctly. I ran the createHelpDemoDocumentation.m and it worked fine. But when I open the help document, it cannot display correctly [I am unable to upload the image to this forum :-( ]. Is that means: the MATLAB 2014a software itself has the same issue (bugs) as 2015a did?

Boyuan LIU

Ligong Han

Kevin Moerman

Boyuan. Did you add the trunk folder with its subdirectories to the path? The function it can't find is simply in the lib directory so I suspect it's a path issue.

Let me know if that works.



Hi all:
It seems that I cannot run the "createHelpDemoDocumentation.m". The MATLAB keep saying:

Undefined function 'cell2txtfile' for input arguments of type 'cell'.

Error in createHelpDemoDocumentation (line 75)

Error in run (line 63)
evalin('caller', [script ';']);

Can you tell me how I can solve this? My MATLAB version is R2014a


Thanks Kevin! That worked. :)

Kevin Moerman

To Laura. Thanks for catching that. I repackaged the toolbox while the entire trunk folder with sub-folders was added to the path. It has been updated on GitHub but may take a day to update here. Let me know if that worked.


This is very cool! However, when I installed the toolbox, I had to add the 'lib' directory to my path to get some of the examples working. If you repackage the mltbx while 'lib' is on your MATLAB path, when users install your toolbox, they too will get 'lib' added to their path automatically.

Anton Semechko

Once in a while something comes along on FEX that is so awesome that I gasp. This toolbox is one one those things. Thanks a lot Kevin for making this toolbox available to the Matlab community!

MATLAB Release Compatibility
Created with R2020a
Compatible with R2016a and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!