I'm trying to understand differences of behavior of the anatomist API between BrainVISA 4.5 and 4.6.
With 4.6, linkCursorLastClickedPosition() seems the return positions in the referential currently selected in the view.
I have two views of the same volume, one with the referential "t1mri native" selected, the other one with the referential "Talairach-ACPC-Anatomist" referential selected. If I click on one view, call linkCursorLastClickedPosition(), click on the same point in the other view, call linkCursorLastClickedPosition(), I get two completely different positions. This is illustrated in the screen capture and console output below.
https://www.dropbox.com/s/yrkxyz44apweg ... n.gif?dl=0
Code: Select all
>>> self.a.linkCursorLastClickedPosition()
<soma.aims.AimsVector_FLOAT_3 object at 0xca12d40>
[b](3.1346323490142822, 2.8059873580932617, 101.33295440673828)[/b]
Position : -94.6721, -147.751, 5.3333, 0
>>> self.a.centralRef.getInfo()
'ObjectInfo'
{ 4 : { 'axes_orientation' : [ 'right-left', 'anterior-posterior', 'top-bottom' ], 'dimension_count' : 3, 'direct_referential' : 0, 'name' : [b]'Talairach-AC/PC-Anatomist'[/b], 'type' : 'Referential', 'uuid' : 'a2a820ac-a686-461e-bcf8-856400740a6c' } }
{'direct_referential': 0, 'uuid': 'a2a820ac-a686-461e-bcf8-856400740a6c', 'axes_orientation': ['right-left', 'anterior-posterior', 'top-bottom'], 'dimension_count': 3, 'type': 'Referential', 'name': 'Talairach-AC/PC-Anatomist'}
>>> self.a.linkCursorLastClickedPosition()
<soma.aims.AimsVector_FLOAT_3 object at 0xca12e60>
[b](-94.67205047607422, -147.7505340576172, 5.3333001136779785)[/b]
>>> self.a.centralRef.getInfo()
'ObjectInfo'
{ 4 : { 'axes_orientation' : [ 'right-left', 'anterior-posterior', 'top-bottom' ], 'dimension_count' : 3, 'direct_referential' : 0, 'name' : [b]'Talairach-AC/PC-Anatomist'[/b], 'type' : 'Referential', 'uuid' : 'a2a820ac-a686-461e-bcf8-856400740a6c' } }
{'direct_referential': 0, 'uuid': 'a2a820ac-a686-461e-bcf8-856400740a6c', 'axes_orientation': ['right-left', 'anterior-posterior', 'top-bottom'], 'dimension_count': 3, 'type': 'Referential', 'name': 'Talairach-AC/PC-Anatomist'}
http://brainvisa.info/pyanatomist/sphin ... edPosition
According to the documentation, linkCursorLastClickedPosition() is supposed to always return the positions relative to the central referential, which is the same in both cases.
This would be OK by itself, but when calling linkCursorLastClickedPosition with a specific referential in argument, eg. linkCursorLastClickedPosition(self.dispObj['T1pre'].getReferential()).items(), it returns coordinates that do not correspond to anything...
Is there an issue at this level? Has this changed in BrainVISA 4.6?
Thanks
Francois