To compile the program you will have to go to the directory that the TempSim.cpp file is located in.
You the following to make the temperature simulator work in matlab:
1. Run “mex TempSim.cpp” in the matlab command window. You should get an output “MEX completed successfully.”
2. You are now ready to run the calculator using the following command line in matlab:
[T]=TempSim(C,K,R,Q,W,SAR,Tinitial,[dx, dy, dz],steps,dt,airtemp);
where:
• C is the 3d distribution of the heat capacity in units of J/kg/°C.
• K is the 3d distribution of the thermal conductivity in units of W/m/°C.
• R is the 3d distribution of the tissue density in units of kg / m3
• Q is the 3d distribution of the metabolic energy generation term in units of W/m3.
• W is the 3d distribution of the thermal perfusion coefficient in units of mL/100g/minute.
• SAR is the 3d distribution of the specific absorption rate in units of Watts / kg
• Tinitial is the 3d distribution of the initial temperature in units of Kelvin.
• dx, dy, dz are the voxel sizes in the x, y and z directions, respectively, in units of meter.
• steps is the number of steps in which the temperature simulation would run
• dt is the time step of each step
• airtemp is the temperature of air in units of Kelvin.
The fast simulation technique is based on the following reference: “Collins C M LW, Wang J, Gruetter R, Vaughan T V, Ugurbil K, B SM. Temperature and SAR calculations for a human head within volume and surface coils at 64 and 300 MHz. 2004;19(5):650.”