Hi folks,
Based on some discussion on this forum I have created a module (part of the tools sub-package in gprMax) called convert_png2h5.py which is available if you pull the latest code from the master branch of GitHub.
The module enables a Portable Network Graphics (PNG) image file to be converted into a HDF5 file that can then be used to import geometry into gprMax (see the #geometry_objects_read command for information on how to use the HDF5 file with a materials file to import the geometry). The resulting geometry will be 2D but maybe extended in the z-(invariate) direction if a 3D model was desired. The module will display the PNG image and allow the user to select colours that will be used to define discrete materials in the model. When the user has finished selecting colours the window should be closed, whereupon the HDF5 file will be written.
This is a new tool so it might be a bit rough around the edges. Feedback (and proposed changes) welcome!
I hope it is useful.
Kind regards,
Craig