This reposity provides a tool to convert .png to Nutils readable topology data structure (i.e. analysis-suitable geometry).
- Name you image as
<image_name>_<pixel_size>.png - Save it in subfolder images/
- Create a .raw and .json wrapper from a png file
bash img2json.sh <image_name>_<pixel_size>(for examplebash img2json.sh walle 35)
- Go to examples subfolder and run example_2d script
python3 example_2d.py fname=<image_name>_<image_size>(for examplepython3 example_2d.py fname=walle_35)
The tool contains a feature called topology preservation -- an alogrithm based on the paper. It can be activated with topopreserve=True. For example python3 example_2d.py fname=walle_35 topopreserve=True. Note that the sharpness of the reconstructed boundariese can be varied with maxrefine argument. For example python3 example_2d.py fname=walle_35 maxrefine=3.






