Skip to content

Fix TypeError in SubjectRegistration.approxHeadCenter - #22

Open
BrennanTM wants to merge 1 commit into
PrecisionNeuroLab:mainfrom
BrennanTM:fix/approx-head-center
Open

Fix TypeError in SubjectRegistration.approxHeadCenter#22
BrennanTM wants to merge 1 commit into
PrecisionNeuroLab:mainfrom
BrennanTM:fix/approx-head-center

Conversation

@BrennanTM

Copy link
Copy Markdown

What brokeSubjectRegistration.approxHeadCenter averaged the LPA/RPA Fiducial objects instead of their plannedCoord arrays → TypeError whenever both were planned.

Fix — average the coordinates. Also guard the sole caller (SubjectRegistrationPanel, camera alignment on fiducial-row selection), which subtracted the property's documented None return from an ndarray when LPA/RPA were unplanned (e.g. plan NAS first, click its row); it now just resets on the focal point.

Teststests/test_Model/test_subjectRegistrationCalcs.py (2).

Averaged the LPA/RPA Fiducial objects instead of their planned
coordinates, raising TypeError whenever both fiducials were planned.

Also guard the property's sole caller (SubjectRegistrationPanel camera
alignment on fiducial row selection), which subtracted the property's
documented None return from an ndarray whenever LPA/RPA were absent or
unplanned, e.g. after planning a NAS fiducial first. The camera now
falls back to just resetting on the focal point in that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant