edu.stanford.rsl.konrad.physics.materials.database
Class MaterialsDB

java.lang.Object
  extended by edu.stanford.rsl.konrad.physics.materials.database.MaterialsDB

public class MaterialsDB
extends java.lang.Object

The material database provides access to materials commonly used in medical physics. The database has 154 preloaded materials, consisting of the first 92 elements,17 common compounds, and 45 mixtures.Materials in this database are stored as editable XML files.Mixtures are retrieved using a name and chemical formula. While elements and compounds can be retrieved using a name or chemical formula.

This is a list of preloaded compounds :

Name Fomula Density
Polyethylene H2C 0.96
Water H2O 1.00
Scinti-C9H10 C9H10 1.032
Plastic C5H8 1.18
PVC H3C2Cl 1.65
PTFE CF2 2.18
Quartz SiO2 2.2
NaI NaI 3.67
YAP YAlO3 5.55
CZT Cd9ZnTe10 5.68
GSO Gd2SO5 6.7
LuYAP-70 Lu8Y2Al10O30 7.1
BGO B4Ge3O12 7.13
LSO Lu2SO5 7.4
LuYAP-80 Lu8Y2Al10O30 7.5
PWO PbWO4 8.28
LuAP LuAlO3 8.34

New compounds can be created and added to the database by executing the code below

Material material = MaterialUtils.newMaterial(name,density,formula);
MaterialDB.put(material);

This is a list of preloaded mixtures:

Name Density
Air 0.0129
Lung 0.26
LungMoby 0.30
Adipose 0.92
Fat 0.92
Body 1.00
Urine 1.020
Breast 1.020
Intestine 1.03
Lymph 1.03
Pancreas 1.04
Brain 1.04
Testis 1.04
Muscle 1.05
Heart 1.05
Aorta 1.050
Kidney 1.05
Liver 1.06
Blood 1.06
Spleen 1.06
Cartilage 1.10
BoneMarrow 1.120
Spongiosa 1.180
Plexiglass 1.19
PMMA 1.195
Sternum 1.250
Rips_2nd 1.410
SpineBone 1.42
Femur 1.430
Humerus 1.460
Claviculum 1.460
Skapulum 1.460
Rips_10th 1.510
Skull 1.61
Cranium 1.61
Mandibula 1.680
RibBone 1.92
Bone 1.92
Kortikalis 1.920
CoronaryArtery 2.06
HeartLesion 2.1
Glass 2.5
Teeth 2.5
LYSO 5.37
SS304 7.92

New mixtures can be created and added to the database by executing the code below

WeightedAtomicComposition wac = new WeightedAtomicComposition();
For all elements in mixture do:
wac.add(element,proportion);
Material material = MaterialUtils.newMaterial(name,density,wac);
MaterialDB.put(material);

Where element is the chemical formula an elemental component of the mixture and proportion is its weighted proportion in the mixture.

Author:
Rotimi X Ojo

Constructor Summary
MaterialsDB()
           
 
Method Summary
static java.lang.String getDatabaseLocation()
          Absolute file path of database
static Material getMaterial(java.lang.String identifier)
          Retrieves material associated with given identifier.
static java.lang.String getMaterialsLocation()
          Absolute file path of materials database
static Material getMaterialWithFormula(java.lang.String formula)
          Retrieves material associated with given formula
static Material getMaterialWithName(java.lang.String name)
          Retrieves material associated with name
static boolean put(Material material)
          Adds a new material to database.
static boolean removeMaterial(java.lang.String identifier)
          Removes material with given identifier from database
static boolean removeMaterialWithFormula(java.lang.String formula)
          Removes material defined by given formula from database
static boolean removeMaterialWithName(java.lang.String name)
          Removes material associated with given name from database
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaterialsDB

public MaterialsDB()
Method Detail

getMaterial

public static Material getMaterial(java.lang.String identifier)
Retrieves material associated with given identifier. *

Parameters:
identifier - Name or Formula of material
Returns:
null if material is not defined

getMaterialWithFormula

public static Material getMaterialWithFormula(java.lang.String formula)
Retrieves material associated with given formula

Parameters:
formula - is chemical formula of compound or mixture defining material to be retrieved
Returns:
null if material is undefined

getMaterialWithName

public static Material getMaterialWithName(java.lang.String name)
Retrieves material associated with name

Parameters:
name - is name of material to be retrieved
Returns:
null if material material does not exist and cannot be generated on the fly

put

public static boolean put(Material material)
Adds a new material to database. New Materials are created by MaterialUtils

Parameters:
material -
Returns:
false if material cannot be added to database

removeMaterial

public static boolean removeMaterial(java.lang.String identifier)
Removes material with given identifier from database

Parameters:
identifier - is name or formula of material to be removed
Returns:
false if removal is unsuccessful

removeMaterialWithFormula

public static boolean removeMaterialWithFormula(java.lang.String formula)
Removes material defined by given formula from database

Parameters:
formula - is chemical formula of material of interest
Returns:
false if removal is unsuccessful

removeMaterialWithName

public static boolean removeMaterialWithName(java.lang.String name)
Removes material associated with given name from database

Parameters:
name - is name of material of interest
Returns:
false if removal is unsuccessful

getDatabaseLocation

public static java.lang.String getDatabaseLocation()
Absolute file path of database

Returns:
the location of databases

getMaterialsLocation

public static java.lang.String getMaterialsLocation()
Absolute file path of materials database

Returns:
the location of material database