[Vv] Landmarks bug in vv

Benoît Presles benoit.presles at u-bourgogne.fr
Wed Jan 25 17:57:02 CET 2017


Hi Thomas,

Thanks a lot, it seems to work smoothly now :-)
So, as far as I understand vv does not take into account the 
transformation matrix of the image header when you display the landmarks 
in the left panel or save them. For the latter, the user needs to push 
the "UpdateCoords" button, isn't it ?

Cheers,
Ben


On 25/01/17 15:40, Thomas BAUDIER wrote:
>
> Hi Benoit,
>
> Thank you for your feedback.
> It's strange you don't see the landmarks because it works on my 
> computer. Do you see at least the coordinates in the left panel ?
> On my computer it doesn't work because, when I load the file the 
> landmarks are not displayed at the right place. But I can see them and 
> the coordinates in the panel are the transformed coordinates (so it's 
> not correct too because after a click on the update button, the 
> transformation is applied again).
> I push a new commit. So now when I load the file, the landmarks are 
> well displayed and the coordinates correspond to the original ones 
> (You have to click on the update button after that).
> But the saved coordinates in the text file are the original 
> coordinates (ie. before the transformation).
> Even with voxel coordinates, I'll loose the transformation informations.
> So, I have to think about a better system.
>
> Thomas
>
> On 2017-01-25 10:52, Benoît Presles wrote:
>> Hello Thomas,
>>
>> Thanks for your help. Indeed, I can now add new landmarks with the
>> space bar and update their coordinates with the new "UpdateCoords"
>> button.
>>
>> Unfortunately, I am still experiencing some issues:
>> 1. I add some landmarks with the space bar;
>> 2. I update their coordinates with the new button;
>> 3. I save the landmarks (in mm) with the save button;
>> 4. I clear the landmarks with the "All" button;
>> 5. I load the landmarks I have just saved and I do not see them :-(
>>
>> Could it be easier to work with landmarks in voxel coordinates?
>>
>> Thanks for your help,
>> Best regards,
>> Ben
>>
>>
>> On 24/01/17 16:38, Thomas BAUDIER wrote:
>>>
>>> Hi Benoit,
>>>
>>> I try to change it today but it's not so easy.
>>> We talk about that with David and Simon but they are not totally 
>>> convinced by the utility to have updated landmarks' coordinates.
>>> For the moment, I added a button "UpdateCoords" inside the 
>>> LandmarkPanel.
>>> When there is a new transformation, a click on it update the 
>>> coordinates (in mm) of the landmarks in the panel according the 
>>> current transformation matrix.
>>> You can have it pulling the master branch.
>>> I'm not totally satisfy because it's not automatically updated. So 
>>> maybe I will change it when I will have a better idea !
>>>
>>> Best Regards,
>>> Thomas
>>>
>>> On 2017-01-24 09:36, Benoît Presles wrote:
>>>> Hi Thomas,
>>>>
>>>> Did you have a chance to look at the landmark issue ?
>>>>
>>>> Thanks for your help,
>>>> Ben
>>>>
>>>>
>>>> On 18/01/17 13:36, Benoît Presles wrote:
>>>>> Dear Thomas,
>>>>>
>>>>> I have just performed some tests with the last commit of the 
>>>>> master branch and unfortunately I am still experiencing some issues.
>>>>> My tests are performed on the same image as before: when you add a 
>>>>> landmark with the space bar I can now see the cross representing 
>>>>> the landmark but its coordinates are wrong in the "landmarks panel".
>>>>> It seems that it does not take into account the TransformMatrix 
>>>>> from the image header.
>>>>>
>>>>> Thanks for your help,
>>>>> Best regards,
>>>>> Ben
>>>>>
>>>>>
>>>>> On 09/01/17 14:56, Thomas BAUDIER wrote:
>>>>>>
>>>>>> Hi Benoit,
>>>>>>
>>>>>> Thanks for your feedback.
>>>>>> I think it's ok with the new commits on the master branch.
>>>>>>
>>>>>> Thomas
>>>>>>
>>>>>> On 2017-01-07 11:59, Benoit Presles wrote:
>>>>>>> Dear all,
>>>>>>>
>>>>>>> I recently wanted to add landmarks to a 3D mhd image with the 
>>>>>>> following header:
>>>>>>> ObjectType = Image
>>>>>>> NDims = 3
>>>>>>> BinaryData = True
>>>>>>> BinaryDataByteOrderMSB = False
>>>>>>> CompressedData = False
>>>>>>> TransformMatrix = 1  0  0  0  1  0  0  0  -1
>>>>>>> CenterOfRotation = 0  0  0
>>>>>>> AnatomicalOrientation = RAI
>>>>>>> Offset = 0  0  0
>>>>>>> ElementSpacing = 0.625  0.625  2.5
>>>>>>> DimSize = 512  512  121
>>>>>>> ElementNumberOfChannels = 1
>>>>>>> ElementType = MET_SHORT
>>>>>>> ElementDataFile = copd1_eBHCT.img
>>>>>>>
>>>>>>> As you can see, the TransformMatrix flips the z axis. With this
>>>>>>> transformation matrix, I cannot add landmarks (pressing the 
>>>>>>> space bar)
>>>>>>> to the image.
>>>>>>> In the file vvSlicerManager.cxx, in the function "void
>>>>>>> vvSlicerManager::AddLandmark(float x,float y,float z,float t)", vv
>>>>>>> never enters in the if.
>>>>>>>
>>>>>>> I tried with some other TransformMatrix like 1  0  0 0 1  0 0  0
>>>>>>> 0.5 and it works fine.
>>>>>>>
>>>>>>>
>>>>>>> Thanks for your help,
>>>>>>> Best regards,
>>>>>>> Ben
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> vv mailing list
>>>>>>> vv at creatis.insa-lyon.fr
>>>>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>>>>> _______________________________________________
>>>>>> vv mailing list
>>>>>> vv at creatis.insa-lyon.fr
>>>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>>>>
>>>>> _______________________________________________
>>>>> vv mailing list
>>>>> vv at creatis.insa-lyon.fr
>>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>>>
>>>>
>>>> _______________________________________________
>>>> vv mailing list
>>>> vv at creatis.insa-lyon.fr
>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>> _______________________________________________
>>> vv mailing list
>>> vv at creatis.insa-lyon.fr
>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>
>>
>> _______________________________________________
>> vv mailing list
>> vv at creatis.insa-lyon.fr
>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> _______________________________________________
> vv mailing list
> vv at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv




More information about the vv mailing list