Closed adnanmunawar closed 1 year ago
Great catch! :+1: Looking at the commit history, this used to work, but appears to have fallen out in a previous edit.
I think it boils down to a naming disagreement: In AMBF the "dimension" term is in meters, in Slicer it refers to the array dimension (i.e. number of voxels in each dimension).
We need to do ambf_dimensions = (slicer_spacing .* slicer_dimensions).
I'll assign this to me, but it should be a pretty easy fix if someone needs it before I can get to it.
Could you please take a look at the changes in #9 and see if they address the behavior you were seeing? @adnanmunawar
Hi Henry, just tested this and the new dimensions seem to be correct now. Thanks
Great, I've merged it in now, thanks
For a volume the "dimensions" in 3D Slicer represent voxel count while in AMBF they represent simulator units (which we should consider as SI). Therefore we should take into account the Slicer "spacing" field and multiply it by the "dimensions" to get dimensions in mm and convert the to m before writing to ADF.