Hi Federico,
thanks for pointing this out.
1. SetToolAxis was intended to be a convenience function to define the
ToolAxisOrientation when the calibration procedure provides only the main axis
of the tool (e.g. for 5D needle tracking).
2. The ToolAxis does not have to be serialized as it is contained within
the ToolAxisOrientation already. Seems to be some remnants form code
restructuring earlier this year.
My suggestion would be to remove the serialization and deserialization code of
the ToolAxis from the NavigationToolWriter and NavigationToolReader classes as
it stores redundant information already available in the ToolAxisOrientation
transformation. To make sure everything works correctly the
NavigationToolReaderAndWriterTest could be extended with your use case
(TestWrite3() and TestRead3() could be added).
Let me know if you have further questions.
Alexander
Von: Federico Milano [mailto:[email protected]]
Gesendet: Mittwoch, 25. Juli 2018 21:51
An: [email protected]
Betreff: [mitk-users] Issue with NavigationToolReader
Hello. I'm having an issue with the mitk::NavigationToolReader. Maybe this is
because I do not understand completely the interface to the
mitk::NavigationTool class.
The problem is that I define a ToolTipPosition and a ToolAxisOrientation to
calibrate my NavigationTool. I write this to a ToolStorage. When this is
deserialized by mitk::NavigationToolReader it first reads and assigns the
ToolTipPosition and the ToolAxisOrientation (IsToolTipSet() returns true). Then
it tries to read the ToolAxis. Since it does not find one available, it uses
the default one (0, 0, -1). Then it calls (line 204 of
mitk::NavigationToolReader.cpp) SetToolAxis(). This member function overwrites
the previously read ToolAxisOrientation with the default value (0, 0, 0, 1)
losing then part of the tooltip information set a moment before.
I have two questions:
1. Probably I´m using the mitk::NavigationTool in a wrong way, and I always
have to set the ToolAxis and not the ToolAxisOrientation (I do not grasp
completely the the use case of SetToolAxis(), it would be great if anybody
could clarify it to me).
2. If I'm using it correctly, then maybe something should be done when
deserializing a tool that does not have assigned a ToolAxis.
Please let me know. I can make a pull request avoiding the call to SetToolAxis
if it is set to the default value of (0, 0, -1).
Thanks,
Federico
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users