IbisNeuronav / Ibis

Official repository of the Ibis Neuronav platform
Other
41 stars 24 forks source link

Incorrect transformation of registered objects. #315

Open nist-anka opened 4 years ago

nist-anka commented 4 years ago

I have 2 images, children of the same LandmarkRegistrationObject. I create surface for both. Registration is on. I move one of the images along one ax and the surface and the image move different way. Screenshot from 2019-12-04 12-26-53

hgueziri commented 4 years ago

I am not sure this has to do with the transform itself. Rather, I suspect an issue with the way 2D images are displayed in triplecutplane. When you change the reference image (set to miguet.mnc in your example), things look aligned. Also, the 3D scene looks ok.

Also, this seems to happen only when the images are under LandmarkRegistrationObject.

drouin-simon commented 4 years ago

I wonder if this is not another instance of a problem I've had before in surgery. I have a case where the transform is incorrect after landmark registration. The problem has been bugging me for a while. I always suspected it was due to the implicit transform embeded in the image, but didn't check if it was the case. When loading a minc file for example, we put the direction cosines as a rotation in the local transform but leave translation and scale in the vtkImageObject (origin, step), which might cause to multiply matrices in the wrong other to display.

nist-anka commented 4 years ago

Reference object moves correctly. It seems, that crossection also moves the right way. Non reference objects show incorrectly on 2D planes in both cases - when they are moved and when the reference object is moved.

nist-anka commented 4 years ago

I am not able to find the solution. I did the following tests now: Take 2 objects, Fred in color gray and Colin in color Jacobian, to make it kind of transparent. I added 2 points, point "99" in green is a child of Colin, object SpecialPoint, it is set at the tip of the heart. Point "1" in red is a child of Fred, object FredCentral. Fred is a reference object. When I register the scene, FredCentral moves together with Fred 2D image and SpecialPoint, while Colin moves differently. Special Point is not any more at the heart tip. World transformations of all those objects are the same of course. So, it is something with the texture, and I don't find it.

Intraoperative Brain Imaging System_004 Intraoperative Brain Imaging System_005

nist-anka commented 4 years ago

I just compare unregistered and registered scene, without changing local transforms.