<p>Obviously, that is quite some time ago.</p>
<p> Very few of our optimizers in v4 depend on the VNL optimization.</p>
<p> Perhaps we could consider templating the new optimization framework only?</p>
<p> Potentially much less painful ... </p>
<div class="gmail_quote">On Jan 17, 2013 5:34 PM, "Michael Stauffer -v-" <<a href="mailto:mstauff@verizon.net">mstauff@verizon.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Yes, the issue was with the use of vnl optimizers and vnl cost functions,<br>
which are untemplated.<br>
<br>
I haven't looked at my notes fully, but I do see a comment that we might try<br>
having the vnl wrappers make a conversion from float to double when needed,<br>
ala the cast filter Xiaoxiao suggested.<br>
<br>
I can't find a gerrit patch for this, which is strange. The work was done<br>
around June 2011. I'll look some more.<br>
<br>
Most of the work is tedious, i.e. in changing the optimizers to templated<br>
classes and the cascade of changes that requires. But I don't remember it<br>
being too difficult otherwise, until the vnl code of course. Careful casting<br>
to double to maximize efficiency at that point should be pretty<br>
straightforward, it seems.<br>
<br>
-M<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:insight-developers-bounces@itk.org">insight-developers-bounces@itk.org</a> [mailto:<a href="mailto:insight-developers-">insight-developers-</a><br>
> <a href="mailto:bounces@itk.org">bounces@itk.org</a>] On Behalf Of Johnson, Hans J<br>
> Sent: Thursday, January 17, 2013 11:36 AM<br>
> To: brian avants; Nicholas Tustison<br>
> Cc: Insight Developers<br>
> Subject: Re: [Insight-developers] image PixelType when using<br>
> RegistrationMetricv4<br>
><br>
> Brian,<br>
><br>
> I'd like to revisit this again. I think it may be short-sighted to only<br>
> use double precision in the optimizers, many cases can benefit<br>
> significantly by using the less precise and much faster single precision<br>
> floating point.<br>
><br>
> I've seen dramatic speed benefits from using single precision floating<br>
> point rather than double precision.<br>
><br>
> Hans<br>
><br>
> ==========================================================<br>
> =======<br>
> Hans J. Johnson, Ph.D.<br>
> Assistant Professor, Department of Psychiatry<br>
><br>
> Mailing Address:<br>
> W274 GH Email: <a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a><br>
> 200 Hawkins Drive Phone: <a href="tel:%28319%29%20353%208587" value="+13193538587">(319) 353 8587</a><br>
> The University of Iowa<br>
> Iowa City, IA 52242<br>
><br>
><br>
><br>
><br>
><br>
><br>
> -----Original Message-----<br>
> From: Brian Avants <<a href="mailto:stnava@gmail.com">stnava@gmail.com</a>><br>
> Date: Thursday, January 17, 2013 9:59 AM<br>
> To: Nick Tustison <<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>><br>
> Cc: ITK <<a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a>><br>
> Subject: Re: [Insight-developers] image PixelType when<br>
> using RegistrationMetricv4<br>
><br>
> hi nick , xiaoxiao<br>
><br>
> it's the optimization framework that forced this - michael stauffer<br>
> did a pass through rewriting the optimization framework with a<br>
> template parameter but this was nixed in one of the developer<br>
> meetings.<br>
><br>
> agree that it's not ideal --- however, upside is that solutions should<br>
> be more stable/precise, to state the obvious.<br>
><br>
> b<br>
><br>
> brian<br>
><br>
><br>
><br>
><br>
> On Thu, Jan 17, 2013 at 10:55 AM, Nicholas Tustison <<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>><br>
> wrote:<br>
> > Yeah, this is a legacy issue that we need to address but I don't know<br>
how<br>
> > easy it's going to be. It's due to the fact that the transform<br>
framework<br>
> > requires<br>
> > double type which predates our work. Brian, Michael and I will have to<br>
> > discuss this to see if we can fix it or at least minimize the places<br>
> >where<br>
> > double<br>
> > is required.<br>
> ><br>
> > Nick<br>
> ><br>
> ><br>
> > On Jan 17, 2013, at 10:50 AM, Xiaoxiao Liu <<a href="mailto:xiaoxiao.liu@kitware.com">xiaoxiao.liu@kitware.com</a>><br>
> >wrote:<br>
> ><br>
> > Hi Nick,<br>
> > With the recent changes in the RegistrationMetricv4, seems that the<br>
> > PixeType of an image needs to be always set to double?<br>
> > Old registration code that with float type fails to compile, but<br>
runs<br>
> > fine with double :<br>
> ><br>
> ><a href="https://github.com/InsightSoftwareConsortium/ITKv4-" target="_blank">https://github.com/InsightSoftwareConsortium/ITKv4-</a><br>
> TheNextGeneration-Tutor<br>
> >ial/commit/20df5ac66d43061b5d1ca3665dd1712a5986a879<br>
> > The internal parameter measurements are using double, but is there a<br>
> > reason to require the image type to be double as well? Am I missing<br>
> > something?<br>
> > Please give me some pointers. Thanks.<br>
> ><br>
> > -- Xiaoxiao<br>
> ><br>
> ><br>
> > ---------------------------------------------<br>
> > Xiaoxiao Liu, Ph.D.<br>
> > R & D Engineer<br>
> > Kitware Inc.<br>
> > Clifton Park, NY<br>
> > Phone: (518) 881-4924 or (518) 371-3971 x124<br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Powered by <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://kitware.com/products/protraining.php" target="_blank">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" target="_blank">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" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
> ><br>
> _______________________________________________<br>
> Powered by <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://kitware.com/products/protraining.php" target="_blank">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" target="_blank">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" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
><br>
><br>
><br>
> ________________________________<br>
> Notice: This UI Health Care e-mail (including attachments) is covered by<br>
the<br>
> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is<br>
confidential<br>
> and may be legally privileged. If you are not the intended recipient, you<br>
are<br>
> hereby notified that any retention, dissemination, distribution, or<br>
copying of<br>
> this communication is strictly prohibited. Please reply to the sender<br>
that you<br>
> have received the message in error, then delete it. Thank you.<br>
> ________________________________<br>
> _______________________________________________<br>
> Powered by <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://kitware.com/products/protraining.php" target="_blank">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" target="_blank">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" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
<br>
</blockquote></div>