BlueBrain / atlas-placement-hints

Tools to compute placement hints in the context of brain atlases.
Apache License 2.0
1 stars 2 forks source link

Compat with ultraliser 0.4.0 #16

Closed arnaudon closed 7 months ago

arnaudon commented 7 months ago

The command here does not work at all with latest module of ultraliser:

https://github.com/BlueBrain/atlas-placement-hints/blob/main/atlas_placement_hints/distances/create_watertight_mesh.py#L113

@marwan-abdellah , I'm not even sure ( I couldn't find changelog) on how to map the old/new options, could you give me a mapping? thanks!

arnaudon commented 7 months ago

With 0.3.0 it works, but I get a

    Computing Edges 
    * Progress │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ (100.00 %) 
    * Time     | 0.0307088 Seconds 

    Removing Vertices 
    * Progress │▒▒                                                │ (4.62 %)Some polygons are NOT closed: @[9672] 
arnaudon commented 7 months ago

With 0.4.0 and playing with parameters, I get a seg fault straight away

arnaudon commented 7 months ago

Ah this was already noticed here: https://github.com/BlueBrain/atlas-placement-hints/pull/9

marwan-abdellah commented 7 months ago

Just replace tyour code with this please:

if Path(volume_path).suffix:
        raise ValueError(
            "[ultra_volume_2_mesh] "
            f"The provided option 'volume_path' {volume_path} has a non-empty file extension. "
            f"The program ultraVolume2mesh expects a filepath without extension."
        )
    subprocess.check_output(
        [
            ultra_volume_2_mesh_path,
            "--volume-path",
            volume_path,
            "--iso-value",
            str(iso_value),
            "--export-obj-mesh",
            "--optimize-mesh",
            "--smooth-iterations",
            str(smooth_iterations),
            "--output-directory",
            output_directory,
        ]
    )
asoplata commented 7 months ago

@arnaudon If you're trying to update atlas-placement-hints to use ultraliser v0.4.0, the main difficulty might be updating the tests so that they pass. The current tests are hardcoded to use a very old version of ultraliser here: https://github.com/BlueBrain/atlas-placement-hints/blob/main/tests/distances/test_create_watertight_mesh.py#L20-L22