<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">Good-day,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">I have a couple of questions regarding the minimize/maximize set of functions for the itk::RegularStepGradientDescentOptimizer class.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">This optimizer either minimizes or maximizes a cost-function depending on the metric used by the registration process class, correct? For example, from the ITK Software Guide, page 342, it is stated that the Mattes Mutual Information metric "computes the negative mutual information... " and "need to minimize the cost function...". Other metrics, depending on their nature, might have the need for the optimizer to maximize the metric value.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">With regards to these sets of public member functions for this class,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 15px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; font-size: 14px; ">virtual const bool & <span class="Apple-tab-span" style="white-space:pre">        </span>GetMaximize ()</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; font-size: 14px; ">virtual void <span class="Apple-tab-span" style="white-space: pre; ">        </span>MaximizeOff ()</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; font-size: 14px; ">virtual void <span class="Apple-tab-span" style="white-space: pre; ">        </span>MaximizeOn ()</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font class="Apple-style-span" size="3" style="font-size: 14px; ">virtual void <span class="Apple-tab-span" style="white-space: pre; ">        </span>SetMaximize (bool _arg)</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font class="Apple-style-span" size="3" style="font-size: 14px; "><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font class="Apple-style-span" size="3" style="font-size: 14px; "><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; font-size: 14px; ">bool <span class="Apple-tab-span" style="white-space:pre">        </span>GetMinimize () const</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; font-size: 14px; ">void <span class="Apple-tab-span" style="white-space:pre">        </span>MinimizeOff (void)</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; font-size: 14px; ">void <span class="Apple-tab-span" style="white-space:pre">        </span>MinimizeOn (void)</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><span class="Apple-style-span" style="font-size: 14px; ">void <span class="Apple-tab-span" style="white-space:pre">        </span>SetMinimize (bool v)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><font class="Apple-style-span" size="3" style="font-size: 14px; "><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">Couldn't the "MinimizeOff(void)" and "MinimizeOn(void)" methods be eliminated?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">The "GetMinimize()" and "SetMinimize(bool v)" methods are all that are fundamentally needed, correct? The aforementioned functions are their to allow alternative source-code implementations, yes?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">Thank you,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 17px; ">Michael.</div></div>
</body></html>