Donders-Institute / PRESTUS

PREprocessing & Simulations for Transcranial Ultrasound Stimulation package
GNU General Public License v3.0
12 stars 10 forks source link

Skull indices are used instead of new layer labels #25

Open KTZ228 opened 1 year ago

KTZ228 commented 1 year ago

When the switch to charm was made in the previous major revision, the pipeline was adjusted to accept skull indices instead of the new layer labels to save time. This can lead (and has led) to issues by using the incorrect layer labels. To prevent further confusion in the future, I suggest to adjust all the code to accept the updated layer labels from charm instead of the layer indices.

MaCuinea commented 11 months ago

Fix has been made for this issue. Pull request (#27) is created, so code can be tested first.

jkosciessa commented 3 weeks ago

The current master still has quite a few hardcoded values, see e.g., this block.

I am currently working on a solution. This partially arises from how the specification is designed: parameters.layer_labels specifies the layers that are to-be-modelled, and this specification is sequential. If we would specify an additional csf field in the end, it may interfere with the more global water layer that we would like to model.

Beyond the obvious solution of requiring the standard layer specifiation, my current solution relies on an additional config field "seg_labels":

seg_labels:
  csf: [3]
  bonemask: [1,2,3,4,7,8,9]

If this field is absent, I throw a warning that hardcoded values are being used.

I now also export niftis of density and soundspeed, as those provide critical checks of whether everything has been properly implemented before running acoustics & heating.

Included in commit 3195d93