Giter Club home page Giter Club logo

g4-ct-dose's Introduction

G4-CT-Dose

This program calculate the dose inside a CT phantom for a set of beam positions and energies.

scan.ini

Note: No [] in the real input file

CT_file = [.img file]
material = [material file, e.g. mat_99.txt]
Beam_Type = [gamma, proton, electron, etc.]
Fixed_Energy_MeV = [fixed energy steps in MeV]
Random_Energy_MeV(Min,Max,N) = [1.0  1.0  0]
Beam_X = [minX maxX stepX]
Beam_Z = [minZ maxZ stepZ]
Error_Target = [dose_pct sim_err]  # the uncertainty of all doses larger than 'dose_pct' must be less than 'sim_err' 
Primary_per_Batch = [# of particles per batch]
Max_Primary = [# of max total particles]
Output_Full = [0/1]  # 1: output full voxels, 0: only save data in the output rante (the next)
Output_Range_mm = [output +/- ## mm from the beam ceter]
Verbose = [0/1/2, verbose level]

.img file format

  • int32, int32, int32: voxel number on X/Y/Z (nx, ny & nz)
  • float32, float32, float32: voxel size on X/Y/Z
  • int16[nx*ny*nz]: HU number of voxels, in the order of X, Y, and then Z

class img_data in check-img.py demonstrates how to read the .img file.

.dose/.err file format

  • int32, int32, int32: voxel number on X/Y/Z (nx, ny & nz)
  • float32, float32, float32: voxel size on X/Y/Z
  • int32, int32: X/Z voxel index of beam center
  • float32: particle energy in MeV
  • int32, int32: Xmin, Xmax of the voxel index
  • int32, int32: Zmin, Zmax of the voxel index
  • float32[(Xmax-Xmin+1)*ny*(Zmax-Zmin+1)]: Dose/Error in voxels, in the order of X, Y, and then Z

class dose_data in check-img.py demonstrates how to read the .dose file.

Material Definitions

HU2mat.py defines the coversion of CT number (HU) to the densities and elemental weights of materials, based on the paper of Schneider et al., Phys. Med. Biol. 45 (2000) 459-478.

Densities

The densities are linearly interpolated between materials as described in the paper:

HU Range Density Interpolation
-1000 - -98 Between Air and Adipose Tissue 3 (Eq. 17)
-98 - 14 Between Adipose Tissue 3 and Adrenal Gland (Eq. 21)
14 - 23 Constant as 1.03 g/cm3
23 - 100 Between Small Intenstine and Connective Tissue (Eq. 23)
>100 Between Yellow/Red Marrow and Cortical Bone (Eq. 19)

Note: To minimize the fluctration of CT scans on air, the HUs in the range from -1000 to the first HU in the material definition file use the density of air (i.e. no interpolation).

Elemental Weights

However, to have resolutions finer than the 24-bin setting in the paper, some deviations are introduced:

HU Range In Paper In Code
<-950 Air Air
-950 - -120 Lung Mean from interpolation
-120 - 18 Eq. 22 Mean from interpolation
18 - 80 Mean from Eq. 24 Mean from interpolation
20 - 120 Connective Tissue Mean from interpolation
>120 Eq. 20 Mean from interpolation
  • The paper used the interpolation value at the center of each bin except the bin at 18-80 and those explicitly listed above
  • The code interpolate the elemental weights according to Eq. 18.
  • The code uses the mean of the interpolated values of all HUs in a bin.

An ouput with 99 bins is given.

g4-ct-dose's People

Contributors

xiaosj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.