<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0);"><span style="font-size: 16px;">Hello all,</span></div>
<div style="color: rgb(0, 0, 0);"><span style="font-size: 16px;"><br>
</span></div>
<div style="color: rgb(0, 0, 0);"><span style="font-size: 16px;">I did a double check on the command line parameters and the code changes in v3 and v4 implementations. Basically same metric and optimizer is used for both implementations, and their parameters
 are set the same.</span></div>
<div style="color: rgb(0, 0, 0);"><span style="font-size: 16px;">Metric —> MattesMutualInformationImageToImageMetric(v4)</span></div>
<div><span style="font-size: 16px;">Optimizer —> LBFGSBOptimizer(v4)</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">Also, in ITKv4 based implementation, one level registration (with shrink factor 1 and smoothing sigma 0) is used that is the closest circumstance to what happens in ITKv3.</span></div>
<div><span style="font-size: 16px;">Only notice that two implementations use different BSpline transform types too.</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">In v3 implementation, a BSplineDeformableTransformType is used that is initialized by a BSplineDeformableTransformInitializer, and its bulk transform is initialized by the input initial transform.</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">However, v4 implementation utilizes a BSplineTransformType that its parameters (origin, physicalDomain, meshSize and direction) are set directly. Also, the input initial transform is set directly to the registration filter
 as the moving initial transform.</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">Moreover, I repeated my experiments on the “BRAINSFitTest_BSplineOnlyRescaleHeadMasks” test that does just one stage BSpline registration. (Previous test was performing two linear stages before the BSpline stage).</span></div>
<div><br>
</div>
<div><span style="font-size: 16px;">This test was passed successfully in ITKv3 in very short times:</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">ITKv3: release type -> passed in 13 seconds</span></div>
<div><span style="font-size: 16px;">ITKv3: debug type -> </span><span style="font-size: 16px;">passed in </span><span style="font-size: 16px;">102 seconds</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">Also, it was passed successfully in ITKv4 when 4 cores were used and was failed by timeout when just 1 core was used:</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">ITKv4: release type -> passed in 17 minutes (when 4 cores are used)</span></div>
<div><span style="font-size: 16px;">ITKv4: release type -> failed by timeout (>30 mins) (when 1</span><span style="font-size: 16px;"> core is used</span><span style="font-size: 16px;">)</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;">Thank you,</span></div>
<div><span style="font-size: 16px;">Ali</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div><span style="font-size: 16px;"><br>
</span></div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Nicholas Tustison <<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, April 17, 2014 at 8:07 AM<br>
<span style="font-weight:bold">To: </span>"Johnson, Hans J" <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>><br>
<span style="font-weight:bold">Cc: </span>Ali Ghayoor <<a href="mailto:ali-ghayoor@uiowa.edu">ali-ghayoor@uiowa.edu</a>>, ITK <<a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [ITK-dev] [ITK] Potential BSpline registration problems with ITKv4<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Very interesting find, Ali.  Thanks.  Please keep us 
<div>informed of what you find.  It would be nice if a fix</div>
<div>could help us improve the general timing issues that </div>
<div>we’ve discussed previously with ITKv4.</div>
<div><br>
</div>
<div><br>
<div>
<div><br>
<div>
<div>On Apr 17, 2014, at 9:00 AM, Johnson, Hans J <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;">
<div>There was not supposed to be.  The intention was to do the minimal number of changes to allow the same results to occur in ITKv4 instead of ITKv3.  No new features or changes were specified.</div>
<div><br>
</div>
<div>Ali did this work, so he will need to double check, but upon quick review it looks like a simple refactoring from one framework to the other.</div>
<div><br>
</div>
<div>Hans</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family: Calibri; font-size: 11pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);">
<span style="font-weight:bold">From: </span>Nick Tustison <<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, April 17, 2014 at 7:54 AM<br>
<span style="font-weight:bold">To: </span>Hans Johnson <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>><br>
<span style="font-weight:bold">Cc: </span>ITK <<a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [ITK-dev] [ITK] Potential BSpline registration problems with ITKv4<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hans,
<div><br>
</div>
<div>Are there any implementation differences between the two testing</div>
<div>programs, e.g. different metric class versions?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Nick</div>
<div><br>
<div>
<div>On Apr 17, 2014, at 8:24 AM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hans,
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I have see a single per-pixel dynamic memory/malloc cause a 10X performance penalty.  Also I have found apple Instruments easy for diagnosing this bottle neck. This is one possibility among many.</div>
<div><br>
</div>
<div>Good luck tracking down the issue.</div>
<div><br>
</div>
<div>Brad</div>
<div><br>
<div>
<div>On Apr 16, 2014, at 9:10 PM, Johnson, Hans J <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;">
<div>FYI</div>
<div><br>
</div>
<div>
<div style="font-family: Consolas; font-size: 12px;">Ali Ghayoor did the following experiments on "BRAINSFitTest_BSplineScaleRotationRescaleHeadMasks" test.</div>
<div style="font-family: Consolas; font-size: 12px;"><br>
</div>
<div style="font-family: Consolas; font-size: 12px;">1) In one of my old build directories, I ran the "BRAINSFitTest_BSplineScaleRotationRescaleHeadMasks" test in BRIANSFitv3 (that uses ITKv3 registration framework). The test was passed successfully in both
 release and debug types, and it took:</div>
<div style="font-family: Consolas; font-size: 12px;"><br>
</div>
<div style="font-family: Consolas; font-size: 12px;">22 second in release</div>
<div style="font-family: Consolas; font-size: 12px;">88 second in debug</div>
<div style="font-family: Consolas; font-size: 12px;"><br>
</div>
<div style="font-family: Consolas; font-size: 12px;">2) I built NAMICExternalProject on my system in release type and ran the above BSpline test in BRAINSTools. The test was passed successfully again, but the run time in ITKv4 is tremendously longer than the
 time that test takes in ITKv3. The test took:</div>
<div style="font-family: Consolas; font-size: 12px;"><br>
</div>
<div style="font-family: Consolas; font-size: 12px;">18 minutes using 4 cores</div>
<div style="font-family: Consolas; font-size: 12px;">22 minutes using 1 core (In this case the environmental variable "NSLOTS" is set to 1).</div>
</div>
<div style="font-family: Consolas; font-size: 12px;"><br>
</div>
<div style="font-family: Consolas; font-size: 12px;">==================================</div>
<div style="font-family: Consolas; font-size: 12px;">Basically trying to replicate in ITKv4 the same registration processes of ITKv3.</div>
<div style="font-family: Consolas; font-size: 12px;"><br>
</div>
<div style="font-family: Consolas; font-size: 12px;">Hans</div>
<br>
<br>
<hr>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any
 retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
<hr>
</div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php">http://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">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php">http://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">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span><br>
<br>
<hr>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any
 retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
<hr>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>