<br>Hi Patrick,<br><br>Thanks for checking on the usage of these methods.<br><br>I agree with both options.<br><br>We should:<br><br>A) Remove the SetRotation()/SetTranslation() methods<br><br>                OR<br><br>B) Rename them to explicitly mention that they clear the
<br>     other component.<br><br><br>I'm slightly incline towards (B).<br><br><br>Ziv: Do you have a preference between these two options ?<br><br><br><br>     Luis<br><br><br><br>------------------------------------------------------------------------------------
<br><div><span class="gmail_quote">On 8/6/07, <b class="gmail_sendername">Patrick Cheng</b> <<a href="mailto:cheng@isis.georgetown.edu">cheng@isis.georgetown.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Luis and Ziv,<br><br>Making good sandwich is important! We need to be careful that we 'NEVER'<br>set rotation and translation separately in our code, which will erase<br>each other in this case if we follow Luis's solution.
<br><br>I just did a quick search, at least in Tracker code, which deals with<br>all the transform composition, we are using SetTranslationAndRotation()<br>all the time.<br><br>I am wondering if we should provide<br>SetRotation() and SetTranslation() at all?
<br><br>These methods can be misleading, and I am afraid not many people will<br>read the documentation.<br><br>A name like:<br>SetRotationAndClearTranslation()<br>or<br>SetTranslationAndClearRotation()<br>Will be more explicit name.
<br><br>Patrick<br><br><br><br>Luis Ibanez wrote:<br>><br>> Hi Ziv,<br>><br>> Again, the problem with setting them separately is that the time stamp<br>> is shared.<br>><br>> The second setting will override the time stamp of the first setting and
<br>> the Transform<br>> will end up with a Translation component that does not match in time to<br>> the Rotation<br>> component.<br>><br>> E.g. the Translation component may even have expired, and by setting
<br>> only the<br>> Rotation we will extend its validity time artificially.  It is like<br>> making a sandwich with<br>> fresh cheese and an expired ham.... the cheese may be good, but the<br>> total sandwich
<br>> has gone bad anyways.<br>><br>> If the pivot calibration is computing both components separately, then<br>> they should only<br>> be stored in an igstkTransform when both Translation and Rotation are<br>
> available, and that<br>> should be done using the SetRotationAndTranslation() method.<br>><br>><br>>    Luis<br>><br>><br>> ----------------------------------------------------------------------------
<br>> On 8/6/07, *Ziv Yaniv* < <a href="mailto:zivy@isis.georgetown.edu">zivy@isis.georgetown.edu</a><br>> <mailto:<a href="mailto:zivy@isis.georgetown.edu">zivy@isis.georgetown.edu</a>>> wrote:<br>><br>
>     Hi Luis,<br>><br>>     Setting rotation and translation separately without resetting the<br>>     transformation is reasonable behavior. Pivot calibration for example<br>>     only sets the translational part of a transformation. The user can
<br>>     set the rotational part after they get the transformation from the<br>>     pivot calibration according to prior knowledge (what Patrick is<br>>     doing right now). Of course there are many ways to do this
<br>>     (composing separate rotation and translation transformations to get<br>>     a single transform, or setting the transformation only when you have<br>>     both rotation and translation in hand).<br>>
<br>>     In any case I view this as an arbitrary choice and my only<br>>     preference is that the documentation and implementation match.<br>><br>><br>>                  Ziv<br>><br>><br>><br>>
<br>>     -----Original Message-----<br>>     From: "Luis Ibanez" < <a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a><br>>     <mailto:<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com
</a>>><br>>     Sent 8/6/2007 12:41:56 PM<br>>     To: "'Ziv Yaniv'" < <a href="mailto:zivy@isis.imac.georgetown.edu">zivy@isis.imac.georgetown.edu</a><br>>     <mailto:<a href="mailto:zivy@isis.imac.georgetown.edu">
zivy@isis.imac.georgetown.edu</a>>>, "IGSTK Developers"<br>>     <<a href="mailto:igstk-developers@public.kitware.com">igstk-developers@public.kitware.com</a><br>>     <mailto:<a href="mailto:igstk-developers@public.kitware.com">
igstk-developers@public.kitware.com</a>>><br>>     Subject: igstkTransfrom documentation update & Style problems<br>><br>>     Hi Ziv,<br>><br>>     Thanks for updating the documentation of the Transform class:
<br>><br>>     <a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/igstkTransform.h?root=IGSTK&sortby=date&r2=1.20&r1=1.19">http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/igstkTransform.h?root=IGSTK&sortby=date&r2=1.20&r1=1.19
</a><br>>      <<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/igstkTransform.h?root=IGSTK&sortby=date&r2=1.20&r1=1.19">http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/igstkTransform.h?root=IGSTK&sortby=date&r2=1.20&r1=1.19
</a>><br>><br>>     Unfortunately they introduced several coding style violations.<br>>     <a href="http://public.kitware.com/IGSTK/Sites/insight.journal.kitware/KWStyle/20070806-0430-Nightly/BuildError.html">
http://public.kitware.com/IGSTK/Sites/insight.journal.kitware/KWStyle/20070806-0430-Nightly/BuildError.html</a><br>>      <<a href="http://public.kitware.com/IGSTK/Sites/insight.journal.kitware/KWStyle/20070806-0430-Nightly/BuildError.html">
http://public.kitware.com/IGSTK/Sites/insight.journal.kitware/KWStyle/20070806-0430-Nightly/BuildError.html</a>><br>><br>>     Also, I'm not sure that the right thing was to modify the documentation.<br>>     It seems that the SetRotation method actually has the bug of not setting
<br>>     the translation to identity, and the SetTranslation() method has the bug<br>>     of not setting the rotation to identity.<br>><br>>     This should be necessary because the transform has a single TimeStamp,
<br>>     and we assume that it is the same for both Translation and Rotation.<br>><br>>     I'll suggest that we put the documentation back, and fix the bug in<br>>     the implementation of the methods.<br>
><br>>     Do you see a reason why not initialized Translation / Rotation may<br>>     bring any advantage ?<br>><br>><br>>         Thanks<br>><br>><br>>            Luis<br>><br>><br>><br>
><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> IGSTK-Developers mailing list<br>> <a href="mailto:IGSTK-Developers@public.kitware.com">
IGSTK-Developers@public.kitware.com</a><br>> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers">http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers</a><br><br><br></blockquote>
</div><br>