LCSR-CIIS / ambf_util_slicer_plugin

some utilities for quickly converting volumes, markups from 3DSlicer into format accepted by AMBF simulator
BSD 2-Clause "Simplified" License
3 stars 3 forks source link

address default yaml values #2 #3

Closed htp2 closed 1 year ago

htp2 commented 1 year ago

To address #2

adnanmunawar commented 1 year ago

Thanks for the PR, it fixes the setting of default values and the volume can be directly loaded into AMBF. One minor point, the images path is absolute, as show below. This will affect portability.

# AMBF Version: (0.1)
bodies:
- BODY volume_anatomical_origin
joints: []
volumes: [VOLUME volume]
high resolution path: meshes/high_res/
low resolution path: meshes/low_res/
ignore inter-collision: true
namespace: /ambf/env/
VOLUME volume:
  name: volume
  location:
    position: {x: 0.0 , y: 0.0, z: 0.0}
    orientation: {r: 0.0, p: 0.0, y: 0.0}
  scale: 1.0
  dimensions: {x: 0.512, y: 0.512, z: 0.505}
  images:
    path: /home/adnanmunawar/test_vol/volume/ # <---- Absolute Path
    prefix: plane000
    format: png
    count: 512
BODY volume_anatomical_origin: # This is a dummy body that can be used to represent the anatomical origin for easy reference
  name: volume_anatomical_origin
  mass: 0.0
  location:
      position:
        x: 0.029324594584528726
        y: 0.15771592665049528
        z: 0.17275107928340605
      orientation:
        r: 0.0
        p: 0.0
        y: 0.0

Would be good to save this as relative to the ADF file.

htp2 commented 1 year ago

This commit should make the path be relative. If you could check on your end, that would be awesome