GHOST (Generator of Health Optimized Simulation Templates) is a plugin for the 3D Slicer platform designed to facilitate the creation of voxelized phantoms for Monte Carlo N-Particle (MCNP) simulations. The plugin allows users to convert segmented 3D images into lattice structures compatible with the MCNP code, automatically handling the conversion and generating the necessary input files (GHOST) for MCNP simulations.
- Voxelized Phantom Creation: Convert segmented 3D images into MCNP-compatible lattice structures.
- Customizable Voxel Size: Specify voxel dimensions to adjust the resolution of the phantom while maintaining the total dimensions of the original image.
- Material Assignment: Automatically assigns materials to different segments based on a user-provided materials database.
- Output to MCNP Format: Generates the complete basic MCNP input file with correctly formatted lattice structures, material definitions, and other essential cards.
To install the GHOST plugin, follow these steps:
-
Download the Plugin: Clone the repository from GitHub.
git clone https://github.com/HarlleyHauradou/SlicerGHOST.git -
Add the Plugin to 3D Slicer:
- Open 3D Slicer.
- Go to
Edit->Application Settings->Modules. - Add the path to the
GHOSTdirectory in theAdditional module pathsfield. - Restart 3D Slicer.
-
Verify Installation:
- After restarting 3D Slicer, the
GHOSTmodule should appear in theModulesdrop-down list under theMonte Carlocategory.
- After restarting 3D Slicer, the
- Load the Image:
- Load your DICOM, NIfTI, MHD or other supported image format into 3D Slicer.
- Segment the Image:
- Use the
Segment Editormodule to create segmentations for different tissues or materials.
- Use the
- Set Voxel Size:
- In the GHOST plugin UI, enter the desired voxel size in the
Spacing for x, y and z in cm for voxelfields.
- In the GHOST plugin UI, enter the desired voxel size in the
- Generate MCNP Input File:
- Click the
Generatebutton to create the MCNP input file (GHOST). - The generated file will be saved in the directory you specify.
- Click the
- Review and Edit:
- Optionally, review the generated
GHOSTfile and make any necessary manual adjustments.
- Optionally, review the generated
The plugin relies on a materials database (materials.txt) to assign proper MCNP material cards to different segments. The database should be located in the Resources/database folder within the plugin directory. Each material entry in the database follows this format:
c Material Name Density (g/cm3) = density_value
mx Element1 Fraction1
Element2 Fraction2
...
The plugin automatically replaces the placeholder x with the appropriate material ID for MCNP.
Contributions are welcome! If you have any suggestions, find a bug, or want to add new features, feel free to fork the repository and submit a pull request.
This project is licensed under the Apache License 2.0
For any inquiries or issues, please contact Harlley Hauradou.