<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body style="word-wrap:break-word" fpstyle="1" ocsi="0" class=" hasGoogleVoiceExt">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Thank you for your suggestion. It has been helpful!
<div><br>
</div>
<div>I have implemented the ScaleVersor3DTransform and have received results. However, every time the rotation is much larger causing terrible results. Here is an example of a final transform received.<br>
<div><br>
</div>
<div>
<div>scaleVersorTransform information: </div>
<div> Rotation: [ -0.606402, 0.792956, 0.0591457, 1.41421e-005 ]</div>
<div> Translation: [9.16674, -1.28393, -17.1493]</div>
<div> Scale: [4.08189, 1.52688, 2.35832]</div>
</div>
<div><br>
</div>
<div>I haven't had much experience with versors, but I went through the calculations from a previous mailing list email (<a href="http://public.kitware.com/pipermail/insight-users/2009-March/029584.html" target="_blank" style="font-size: 10pt;">http://public.kitware.com/pipermail/insight-users/2009-March/029584.html</a>) and
got a very very large rotation that is occurring (as is seen in the resulting image). Is there any reason that I may be getting such a large, unrealistic rotation? </div>
<div><br>
</div>
<div>Here is how I've set up my optimizer:</div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>typedef itk::RegularStepGradientDescentOptimizer<span class="Apple-tab-span" style="white-space:pre">
</span>GDOptimizerType;</div>
</div>
<div><span class="Apple-tab-span" style="font-size: 10pt; white-space: pre;"></span><span style="font-size: 10pt;">GDOptimizerType::Pointer gdOptimizer = GDOptimizerType::New();</span></div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// set up optimizer</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>gdOptimizer->SetNumberOfIterations( 200 );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>gdOptimizer->SetRelaxationFactor( 0.9 );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>gdOptimizer->SetMinimumStepLength( 0.001 );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>gdOptimizer->SetMaximumStepLength( 5.0 );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>gdOptimizer->SetGradientMagnitudeTolerance( 0.001 );</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// initialize optimizer scales</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>typedef GDOptimizerType::ScalesType<span class="Apple-tab-span" style="white-space:pre">
</span>OptimizerScalesType;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>OptimizerScalesType optimizerScales( scaleVersorTransform->GetNumberOfParameters() );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// rotation</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>const double rotationScale = 1.0/10000.0;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[0] = rotationScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[1] = rotationScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[2] = rotationScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// translation</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>const double translationScale = 1.0/1000.0;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[3] = translationScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[4] = translationScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[5] = translationScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// scaling</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>const double scalingScale = 1.0/100.0;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[6] = scalingScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[7] = scalingScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>optimizerScales[8] = scalingScale;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// set scales</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>gdOptimizer->SetScales( optimizerScales );</div>
</div>
<div><br>
</div>
<div>Any advice would be great!</div>
<div>Thanks!</div>
<div><br>
</div>
<div>Emily Hammond</div>
<div><br>
<div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF539666" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Bradley Lowekamp [blowekamp@mail.nih.gov]<br>
<b>Sent:</b> Wednesday, November 19, 2014 12:52 PM<br>
<b>To:</b> Hammond, Emily M<br>
<b>Cc:</b> insight users<br>
<b>Subject:</b> Re: [ITK-users] minimize skewing<br>
</font><br>
</div>
<div></div>
<div>Hello,
<div><br>
</div>
<div>For 3D you might want to look into the ScaleVersor3DTransform or the ScaleSkewVersor3DTransform. These may parameterize the transform as you wish.</div>
<div><br>
</div>
<div>Brad</div>
<div><br>
<div>
<div>On Nov 19, 2014, at 11:56 AM, Hammond, Emily M <<a href="mailto:emily-hammond@uiowa.edu" target="_blank">emily-hammond@uiowa.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div class=" hasGoogleVoiceExt" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<div style="direction:ltr; font-family:Tahoma; font-size:10pt">Hello all,
<div><br>
</div>
<div>I am looking perform registration allowing for translation, rotation and anisotropic scaling. Is there a way to use the affine transform but limit the skewing performed? Or is there an alternative method to do this.</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Emily Hammond</div>
</div>
_____________________________________<br>
Powered by<span class="Apple-converted-space"> </span><a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>