Skip to content

VTK classes for processing of finite element models derived from micro-CT

License

Notifications You must be signed in to change notification settings

OpenMSKImaging/vtkbone

 
 

Repository files navigation

vtkbone

VTK classes for processing of finite element models derived from micro-CT. vtkbone was formerly vtkn88.

Build Status Anaconda-Server Badge

Documentation

The API documentation for vtkbone can be found on-line at https://bonelab.github.io/n88/documentation/vtkbone/1.0/. Or, you can generate it yourself from the source code using DOxygen.

A manual exists for the Faim FE package that includes a chapter on using vtkbone, and a chapter with tutorials. It can be found at http://numerics88.com/documentation/ .

Installation

vtkbone is open-source and if you want you can download the source code from [https://github.com/Numerics88/] and compile it yourself (see below for compiling and linking). However, this is a hastle and the easiest way to install vtkbone is using Anaconda Python, which is supported on Linux, Windows, and macOS.

You can install Anaconda Python from here. You can also install Miniconda here, a free minimal installer for Conda. It is a small bootstrap version of Anaconda Python that only includes conda, Python, the packages they both depend on, and a small number of other useful packages (like pip, zlib, and a few others). If you want more packages, you can install them of course using the conda install command to install.

Next, you need to create an Anaconda enviroment to run vtkbone. An environment is a folder or directory that contains a specific collection of conda packages and their dependencies. Creating an Anaconda environment is optional. However, creating an Anaconda environment prevents conflicts between packages and ensures that your projects are reproducible. You can read more about Anaconoda environments if you are interested. To create an Anaconda environment and install vtkbone all in one step, run the following command:

conda create --name vtkbone --channel numerics88 --channel conda-forge python=3.7 n88tools numpy scipy

Or use the provided conda environment file

conda env create -f environment.yml

To use vtkbone, you simply activate the Anaconda environment. On Linux and macOS this is done through the following command:

conda activate vtkbone

On Windows the command is

activate vtkbone

You will have to activate the conda environment on each terminal (or Command Prompt) when you want to use vtkbone.

For problems with M1 mac: To run Anaconda using the x86_64 (Intel) architecture on an Apple M1 (ARM64) Mac, you can use Rosetta 2, which is Apple's built-in compatibility layer for running Intel-based applications on ARM-based Macs. Here are the steps to run Anaconda using Rosetta 2:

  1. Install Rosetta 2 (if not already installed). If you haven't already installed Rosetta 2, you can do so by running the following command in your terminal:
softwareupdate --install-rosetta 
  1. Activate Rosetta 2 for terminal: To ensure that the terminal runs in Rosetta 2 mode (Intel mode), you can use the arch command to switch the terminal to use the x86_64 architecture. Open a new terminal window, and run the following command:
arch -x86_64 /bin/zsh 

Replace bin/bash with the shell that you use if it's different.

Cloning this repo

With SSH authentication:

git clone git@github.com:OpenMSKImaging/vtkbone.git

Or directly with HTTPS:

git clone https://github.com/OpenMSKImaging/vtkbone.git

Compiling and linking

vtkbone requires the following:

To build and run the tests with cmake, on linux or macOS, something like the following sequence of commands is required:

mkdir build
cd build
ccmake ..
make
ctest -V

On Windows the procedure is a rather different: refer to CMake documentation.

Class List

Here is a list of some useful classes, structs, unions and interfaces with brief descriptions. For a full list, see here.

Command Description
vtkboneAIMReader Read in a .AIM file
vtkboneAIMWriter Writes a .AIM file
vtkboneApplyBendingTest Generates a finite element mesh that corresponds to a bending test
vtkboneApplyCompressionTest Generates a finite element mesh that corresponds to a compression test
vtkboneApplyDirectionalShearTest Generates a finite element mesh that corresponds to a directional shear test
vtkboneApplySymmetricShearTest Generates a finite element mesh that corresponds to a symmetric shear test
vtkboneN88ModelReader Reads n88 model files
vtkboneN88ModelWriter Writes an n88model file
vtkboneSolverParameters Description of the finite element test
vtkboneFiniteElementModel Data model for finite element meshes
vtkboneFiniteElementModelGenerator Class for generating a finite element mesh
vtkboneMaterialTable Material Table finite element mesh

Authors and Contributors

vtkbone is maintained and supported by Numerics88 Solutions Ltd (http://numerics88.com). It was originally developed at the University of Calgary by Eric Nodwell (eric.nodwell@numerics88.com) and Steven K. Boyd (https://bonelab.ucalgary.ca/).

Licence

vtkbone is licensed under a MIT-style open source license. See the file LICENSE.

About

VTK classes for processing of finite element models derived from micro-CT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 61.8%
  • C++ 25.6%
  • Python 10.4%
  • CMake 1.3%
  • Shell 0.6%
  • C 0.2%
  • Other 0.1%