PIPER  1.0.1
Anatomy Database

The anatomyDB library contains knowledge on the human body anatomy. More...

The anatomyDB library contains knowledge on the human body anatomy.

Author
Thomas Lemaire, Christophe Lecomte
Date
2015

How the data is managed

The following picture presents how the data is organized in the library :

  1. The MyCF database is query to get the basis of the database (anatomical entities such as bones, group of bones, joints,...). This process is done by the make_entity_mycf.py script. The obtain data is stored in the entity_mycf_doNotEdit.csv file.
  2. A set of editable .csv files contains information that cannot be retrieved from MyCF. This includes synonyms for entity names, anatomical landmarks, anatomical frames,...
  3. The create.sql script is used at compile time to produce the sqlite database file.
dataflow.png
AnatomyDB dataflow

How to query the database

The core of the anatomyDB library is a set of functions which wrap SQL queries. In addition to the standard C++ library, several wrappers for other target languages are provided.

usage.png
AnatomyDB usage

In Python

In Octave

Octave (http://www.octave.org) is an open source alternative to Matlab, and is compatible with it up to a certain level. AnatomyDB functions can be used in octave as shown below :

% Copyright (C) 2017 INRIA
% This file is part of the PIPER Framework.
% Version: 1.0.0
%
% The PIPER Framework is free software: you can redistribute it and/or
% modify it under the terms of the GNU Lesser General Public License as
% published by
% the Free Software Foundation, either version 2.1 of the License, or (at
% your option) any later version.
%
% The PIPER Framework is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
% General Public License for more details. You should have received a copy
% of the GNU Lesser General Public License along with the PIPER Framework.
% If not, see <http://www.gnu.org/licenses/>.
%
% Contributors include Thomas Lemaire (INRIA)
%
% This work has received funding from the European Union Seventh Framework
% Program ([FP7/2007-2013]) under grant agreement 605544 [PIPER project]).
%
# copy bin/anatomyDB.sqlite and lib/anatomyDB.oct from the build tree
# start with octave octave_demo.m
anatomyDB
anatomyDB.init(".") # anatomyDB install directory
printf "C1 synonyms:\n"
anatomyDB.getSynonymList("C1")
printf "Bony parts of pelvis:\n"
anatomyDB.getSubPartOfList("Pelvic_skeleton","Bone")
printf "Right_anterior_superior_iliac_spine in Kepple1997:\n"
anatomyDB.getSynonymFromBibliography("Right_anterior_superior_iliac_spine", "Kepple1997")
printf "Landmarks defined in Kepple1997:\n"
anatomyDB.getSubClassOfFromBibliographyList("Landmark","Kepple1997")
printf "Bone frames defined in ISB:\n"
anatomyDB.getSubClassOfFromBibliographyList("Frame","ISB_BCS")
printf "Fill landmarks coordinates:\n"
ff = anatomyDB.FrameFactory_instance()
printf "Available frames in factory:\n"
ff.registeredFrameList()
ff.landmark().add("Head_center_of_left_humerus", [1,2,3])
printf "Left_scapula_glenohumeral frame:\n"
ff.computeFrame("Left_scapula_glenohumeral_frame")
printf "Left_femur_hip frame cannot be computed (missing landmarks):\n"
ff.computeFrame("Left_femur_hip_frame")

output :

C1 synonyms:
ans = 
{
  [1,1] = Atlas
  [2,1] = C1
}
Bony parts of pelvis:
ans = 
{
  [1,1] = Coccyx
  [2,1] = Left_hip_bone
  [3,1] = Right_hip_bone
  [4,1] = Sacrum
}
Right_anterior_superior_iliac_spine in Kepple1997:
ans = RASIS
Landmarks defined in Kepple1997:
ans = 
{
  [1,1] = RASIS
  [2,1] = LASIS
  [3,1] = RPSIS
  [4,1] = LPSIS
  [5,1] = RHJCPEL
  [6,1] = LHJCPEL
  [7,1] = RAIIS
  [8,1] = LAIIS
  ...
}
Fill landmarks coordinates:
ff =

{
  FrameFactory, ptr = 0x7f3d62ffbf40
  computeFrame (method)
  instance (static method)
  isFrameRegistered (method)
  landmark (method)
  registeredFrameList (method)
}

Available frames in factory:
ans = 
{
  [1,1] = C1_C2_arch
  [2,1] = C1_Skull
  ...
  [25,1] = Left_calcaneus_ankle
  [26,1] = Left_carpal_radiocarpal
  [27,1] = Left_clavicle_acromioclavicular
  [28,1] = Left_clavicle_sternoclavicular
  ...
  [38,1] = Left_ulna_humeroulnar
  [39,1] = Pelvis_left_hip
  [40,1] = Pelvis_right_hip
  [41,1] = Right_calcaneus_ankle
  [42,1] = Right_carpal_radiocarpal
  [43,1] = Right_clavicle_acromioclavicular
  [44,1] = Right_clavicle_sternoclavicular
  [45,1] = Right_femur_hip
  [46,1] = Right_femur_knee
  [47,1] = Right_humerus_glenohumeral
  [48,1] = Right_humerus_humeroulnar
  [49,1] = Right_radius_radiocarpal
  ...
}
Left_scapula_glenohumeral frame:
ans =

   1
   2
   3
   0
   0
   0
   1

Left_femur_hip frame cannot be computed (missing landmarks):
error: Error while computating frame Left_femur_hip
Unknown landmark: Medial_epicondyle_of_left_femur (Medial_epicondyle_of_left_femur) (SWIG_RuntimeError)