Coder Social home page Coder Social logo

haeginh / poly2tet Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 521 KB

POLY2TET: A Computer Program for Conversion of Computational Human Phantoms from Polygonal Mesh to Tetrahedral Mesh

Home Page: http://hurel.hanyang.ac.kr

License: Other

CMake 0.15% C++ 99.56% Shell 0.12% Assembly 0.17%
mesh-phantoms tetrahedral-mesh radiation montecarlo-simulation computational-human-phantoms phantom phits mcnp6 geant4

poly2tet's Introduction

POLY2TET (only for Linux)

Program described in the jounal paper, "POLY2TET: A Computer Program for Conversion of Computational Human Phantoms from Polygonal Mesh to Tetrahedral Mesh", submitted to Journal of Radiological Protection.

Installation

Installation can be done very simply by two lines below.

cmake .
make

Usage

./POLY2TET [options] MRCP_AM.obj
  options:
  -g : generate Geant4 code
  -m : generate MCNP6 input file
  -p : generate PHITS input file
  -c : positive integer number to replace zero-region number (and not defined regions, when used as -rc)
  -mat/m : material file in MCNP6 format

Input PM phantom

Input PM phantom should be prepared as OBJ file format that includes the whole phantom; there is no need to prepare OBJ files for each organ. In the OBJ file, each organ should be defined as a shell group named as the corresponding organ ID. Note that for the user’s convenience, POLY2TET allows to add descriptions to be followed after organ ID, but those two needs to be separated by an underscore (e.g., 9500 or 9500_Liver).

Example of the material file

For the generation of the Monte-Carlo code inputs, please provide material file in MCNP format. Below is the example. Please note that you should keep the format of the comment lines (C name, density g/cm3).

C Liver 1.060 g/cm3
m9500     1000      -0.102
     6000      -0.132
     7000      -0.031
     8000      -0.723
     11000      -0.002
     15000      -0.002
     16000      -0.003
     17000      -0.002
     19000      -0.003
C
C Lung 0.415 g/cm3
m9700     1000      -0.102
     6000      -0.108
     7000      -0.032
     8000      -0.748
     11000      -0.001
     15000      -0.001
     16000      -0.002
     17000      -0.003
     19000      -0.002
     26000      -0.001
C

Monte Carlo dose calculation

For the Monte Carlo dose calculations, the corresponding code should be installed in the computer.

MCNP6 (> version 6 / to use um file: > version 6.2)

Go to the folder where MCNP6 input file is generated, and then execute MCNP6 with the input file named (phantom_name)_MPNP6.i.

MCNP6 n=(phantom_name)_MCNP6.i

PHITS (> version 2.88)

Go to the folder where PHITS input file is generated, and then execute PHITS with the input file named (phantom_name)_PHITS.pin.

phits.sh (phantom_name)_PHITS.pin

Geant4 (> version 10.0)

In the folder where Geant4 source code is generated, compile the source code for Geant4 first, and execute the code with the lines below.

cmake .
make
./(phantom_name) -m (macro_file_name) -o (ouput_file_name)

Reference

Han H et al.,2020, POLY2TET: A Computer Program for Conversion of Computational Human Phantoms from Polygonal Mesh to Tetrahedral Mesh, J. Radiol. Prot.(on process)

poly2tet's People

Contributors

haeginh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

williannakano

poly2tet's Issues

Error "Wrong id number 0 exists"

Hello, I'm trying to run the POLY2TET code using the -mat/m function, but I keep getting this error: "Wrong id number 0 exists
". At the end, the code doesn't generate the MCNP6 files folder it is supposed to. Can someone explain what this error means?

warning *****coincident ****

"I built a model using Rhino 8. When each layer is separate, poly2tet works fine. However, when combined and exported, using poly2tet results in a warning, and the program won't stop."

icrp145 phantom

Hello, I am using this open source program recently. I tested the mcrp of icrp145. It can output normally if I use poly2tet directly. When I use rhino8 to open mcrp and then save it as a file in obj format, poly2tet reports an error. I don’t know. Why. Is it a problem with Rhino? If so, what software should I use?

"segment fault" on Geant4 format

Dear Haegin Han,

Thanks for your share your amazing work.

I'm trying to use the geant4 format on (geant4.10.06.p02), but I'm getting "segment fault" when the physics are loading.
Captura de tela de 2021-08-01 16-15-06

The error seems to be connected with the materials of parameterized volume, maybe I'm creating the ".material" file wrong - I didn't find an example of how to create it. For example, when I changed the "TetParameterisation::ComputeMaterial" to return an simple material without using the "tetData->GetMaterial" the code works fine.

Could you, please, check my input files (it's just an sphere of water)? sphere.zip

I think, would be great if you could share an simple example with 1, 2 or more 3D objects, so we could test if the code is running ok.

Kind regards
Vagner

PS: On "init_vis.mac", the source setting file (source.mac) is missing.

Error "Polygon Defect: a hole/inversed face nearby the edge"

What could be the error "Polygon Defect: a hole/inversed face nearby the edge"? I'm trying to use the boolean tool to cut a part of a phantom in Blender software. When this tool is used on a manually made polygonal mesh, no errors occur. But when used on the phantom, it presents this conversion error.

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.