Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing PatientPosition::operator!= #1558

Open
KrisThielemans opened this issue Jan 19, 2025 · 0 comments
Open

missing PatientPosition::operator!= #1558

KrisThielemans opened this issue Jan 19, 2025 · 0 comments
Assignees

Comments

@KrisThielemans
Copy link
Collaborator

This leads to quite a surprise in Python:

>>> exam_info.patient_position.this
<stir::PatientPosition::HFS>
>>> exam_info.patient_position == stir.PatientPosition(stir.PatientPosition.HFS) 
True
>>> exam_info.patient_position == stir.PatientPosition(stir.PatientPosition.FFS)
False
>>> exam_info.patient_position != stir.PatientPosition(stir.PatientPosition.HFS) 
True
>>> exam_info.patient_position != stir.PatientPosition(stir.PatientPosition.FFS) 
True

The 3rd one is "wrong". It is probably caused by Python's default __ne__ being called, which checks in terms of identity (not equality).

@KrisThielemans KrisThielemans self-assigned this Jan 19, 2025
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

No branches or pull requests

1 participant