Artisjokke - simulation of 2D and 3D needle insertion

Introduction

Artisjokke is a interactive Finite Element simulation that models the deformation and friction forces as a needle inserted into a objects of elastic material. This material may be 2D (for fast interaction) and 3D for more accurate computations.

The name Artisjokke continues my tradition of choosing nonsensical names for programs. In the unlikely event that you've downloaded this somewhere else: the URL for the tarball is http://www.cs.uu.nl/groups/AA/virtual/surgery/artisjokke/artisjokke-1.0.0.tar.gz.

Here is the obligatory screenshot:

     artisj.png
     

Requirements

This program requires

It has been developed and tested on RedHat 9.0.

Compiling is done with the standard

       configure ; make
     
sequence

Invocation

After compiling, the binaries are left in

       needle2d/out/needle
       needle3d/out/needle
     
Command line options for both programs are equal:
-okey=value
this sets an internal variable. Try -ohelp to see a list of options. See below for some inspiration.
-sscenario
run a particular test scenario. Try -shelp to see a list of options.
-d
Print debugging information.
-h
Print option help.

Usage: mouse:

Keys:

a
show axes
ESC
exit program
o
show undeformed configuration
s
toggle showing solid triangles.
b
toggle showing boundary
=
print statistics
CTRL-L
reset viewpoint to default
e
toggle showing of edges
d
toggle depth cue
l
toggle lighting
w
write deformation state to file
n
toggle showing nodes
?
show -okey=val variable settings
p
(2d version only), print mesh as Postscript.
!
(3d version only) compute edge lengths
N
(3d version only) show needle surface
A
(3d version only) run auto-insert.

The 2D version is more suitable for toying around, due to its better response times. Example:

The computational experiments (described in Chapter 6 of my thesis), can be run as follows. First, create the "bare" build: The bare build is created using

       configure --enable-optimising --disable-opengl --enable-config=bare
       make conf=bare
     
Second, get the R program for statistical analysis, and run the The R source file plot-h-error.r. This is done by executing the following commands in R:
       source ('plot-h-error.r')
       everything (7)
     
This will leave a large number of data-files and EPS graphics in the subdirectory experiments.

For the 3D version, here are the scenarios shown in the MICCAI 2003 paper. Warning: the bottom one takes a long time to compute.

     ./needle3d/out-glutspeed/needle  -oauto-insert-speed=0.1 \
        -oauto-insert-depth=0.12 -oouter-loop-tolerance=0.1 \
        -orefinement-level=12 -oinitial-level=6 -oauto-insert-y=0.07001 \
        -oelasticity=linear -oneedle-radius=0.001 -ocalibration-time=-1.0 \
        -ofriction-density=70 -oyoung=34e3 -Sauto-insert
     
     
     ./needle3d/out-glutspeed/needle  -oauto-insert-speed=0.1 \
       -oauto-insert-depth=0.12 -oouter-loop-tolerance=0.05 \
       -orefinement-level=20 -oinitial-level=6 -oauto-insert-y=0.07001 \
       -oelasticity=neohooke -oneedle-radius=0.001 -ocalibration-time=-1.0 \
        -ofriction-density=70 -oyoung=34e3 -Sauto-insert
     

Design

The design of the simulation is modular: it consists of two executables that use the following three libraries:

meshlib
is the library that maintains the mesh connectivity. It is described in Chapter 7 of my thesis, and also in the JGT article mentioned below.
defolib
is the library that computes elastic deformations. It can compute dynamic and static deformations for a number of compressible elastic models for tetrahedral and triangulated meshes. It is dimension independent in the sense that 2D and 3D versions of the code are generated from the same source code.

It is based on a previous framework used in the Salmon and Bazzoen prototype. It uses objects and types from meshlib, but could (conceivably) be separated into a standalone library.

WARNING: defolib maintains flop-counts. This is a relic from earlier computational experiments, and they are likely to be erroneous, especially for the 2D simulation.

visualize
is the library that handles visualization, the GLUT interface and mouse.

Basically, the two executables glue together these libraries, and includes code to deal with bisection meshing, friction computations and running computational experiments.

License (1)

The formal part of the license is below. Informally: I basically couldn't care less about what you do with this software. However, if you use it in any way to write articles in any form, I would greatly appreciate being cited. Relevant citations are:


@InProceedings{nienhuys03:_miccai,
  author = 	 {Han-Wen Nienhuys and A. Frank van der Stappen},

  title = {Interactive needle insertions in 3D nonlinear material},
  booktitle =	 {Medical Image Computing and Computer Assisted
  Intervention 2003 (MICCAI2003)},
  note = {Submitted for consideration},
  pages =	 {?},
  series ={LNCS},
  year =	 2003,
  organization = {Springer Verlag}
}

@Article{nienhuys03:_jgt,
  author = 	 {Han-Wen Nienhuys and A. Frank van der Stappen},
  title = {Maintaining mesh connectivity using a simplex-based data structure},
  journal  ={Journal of Graphics Tools},
  note = {Submitted for consideration},
  organization = {ACM}
}


@PhdThesis{nienhuys03:_cuttin,
  author = 	 {Han-Wen Nienhuys},
  title = 	 {Cutting in deformable objects},
  school = 	 {Utrecht University},
  year = 	 2003
}

License (2)

Copyright (c) 2002 Han-Wen Nienhuys and Utrecht University

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.