After registering fNIRS optodes with +nirs/+registration/register2polhemus.m using a digpts file acquired with a Polhemus FASTRAK device, I couldn't help but notice the Colin27 brain was rendered in a stretched oval shape instead of what it was supposed to look like.
I looked into the probe object and found out that the head size returned by +nirs/+registration/getheadshape.m differed much from the actual values measured on the participant.
I read the source code and edited line 51 of getheadshape.m from:
IS_distance=norm(pt(3,:)-.5(pt(1,:)-pt(2,:)));
to:
IS_distance=norm(pt(3,:)-.5(pt(1,:)+pt(2,:)));
, and everything went back to normal.
I guess the IS_distance was calculated as the distance between 'cz' and the midpoint of 'lpa' & 'rpa' and then used for Ramanujan's formula, which could have been the reason this fix worked.
I sincerely appreciate your amazing work which has been helping me a lot,
and would be really glad to see the toolbox improving further on.
Hi all,
After registering fNIRS optodes with +nirs/+registration/register2polhemus.m using a digpts file acquired with a Polhemus FASTRAK device, I couldn't help but notice the Colin27 brain was rendered in a stretched oval shape instead of what it was supposed to look like.
I looked into the probe object and found out that the head size returned by +nirs/+registration/getheadshape.m differed much from the actual values measured on the participant.
I read the source code and edited line 51 of getheadshape.m from: IS_distance=norm(pt(3,:)-.5(pt(1,:)-pt(2,:))); to: IS_distance=norm(pt(3,:)-.5(pt(1,:)+pt(2,:))); , and everything went back to normal.
I guess the IS_distance was calculated as the distance between 'cz' and the midpoint of 'lpa' & 'rpa' and then used for Ramanujan's formula, which could have been the reason this fix worked.
I sincerely appreciate your amazing work which has been helping me a lot, and would be really glad to see the toolbox improving further on.