If you look at itkSetMacro, it always checks the new value against the old
value, in order to decide whether to mark the current object as modified,
which determines whether the current pipeline stage is dirty and needs
re-evaluation.

In a constructor, the old value is garbage, hence the valgrind warning.
The only consequence in practice is that it is checking against a garbage
value.  I'm not sure the constructor is the right place to mark an object
'Modified' though; the base class constructors have already been called,
and I believe an itk::Object always starts life as 'modified.'
--
Kent Williams [email protected]






On 5/30/12 8:03 AM, "Nicholas Tustison" <[email protected]> wrote:

>Hi Bill,
>
>If you take a look at the constructor in
>itkGradientDescentLineSearchOptimizerv4.cxx
>below, the search method is being set using a function.  Could this be
>the possible
>reason for the valgrind error?  I think you were the one who explained to
>me why this
>isn't kosher---something about the class not being instantiated at this
>point to be able
>do this type of thing.
>
>Nick
>
>/**
> * Default constructor
> */
>GradientDescentLineSearchOptimizerv4
>::GradientDescentLineSearchOptimizerv4()
>{
>  this->m_LowerLimit = itk::NumericTraits< InternalComputationValueType
>>::Zero;
>  this->m_UpperLimit = 5.0;
>  this->m_Phi = 1.618034;
>  this->m_Resphi = 2 - this->m_Phi;
>  this->m_Epsilon = 0.01;
>  this->SetSearchMethod( SearchNearBaselineLearningRate );
>}
>
>
>
>
>
>
>
>On May 30, 2012, at 8:26 AM, Bill Lorensen wrote:
>
>> Folks,
>>
>> Recent changes caused this valgrind defect:
>> http://open.cdash.org/viewDynamicAnalysisFile.php?id=2757313
>>
>> Bill
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://kitware.com/products/protraining.php
>
>Please keep messages on-topic and check the ITK FAQ at:
>http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-developers



________________________________
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.
________________________________
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to