[Insight-developers] GlobalReleaseDataFlag and ReleaseData testing

Luis Ibanez luis.ibanez at kitware.com
Thu Feb 19 12:47:20 EST 2009


Hi Brad,

Good idea to check against VTK.

My vote would be to run an Experimental build with the change,
and if it gets out green, just commit the change.

Looking at the code, it doesn't seems that the change should
have any implications, ... but we have said the same many
time before  :-)


   Thanks


     Luis


----------------------------
Bradley Lowekamp wrote:
> I checked VTK as I think DataObject came from there. These methods are 
> also non static there too.
> 
> 
> On Feb 19, 2009, at 10:26 AM, Luis Ibanez wrote:
> 
>>
>> Hi Brad,
>>
>> Thanks for pointing this out.
>>
>> I agree with you in that the methods:
>>
>>
>>  void itk::DataObject::GlobalReleaseDataFlagOn()
>>  void itk::DataObject::GlobalReleaseDataFlagOff()
>>
>>
>> should be static.
>>
>> The only thing they are doing, is calling
>> another static method.
>>
>>
>>     Luis
>>
>>
>> ---------------------
>> Bradley Lowekamp wrote:
>>
>>> Hello,
>>
>>>
>>> I am working on this bug:
>>
>>>
>>> http://www.itk.org/Bug/view.php?id=8490
>>
>>>
>>> I wanted to verify my assertion, that this same bug would be problematic
>>
>>> for the ReleaseData flag. So I searched to see what testing we do of 
>>> that:
>>
>>>
>>> victoria:Insight/Testing blowek1$ grep -R ReleaseData *
>>
>>> Code/BasicFilters/itkThresholdImageFilterTest.cxx:
>>
>>> random->ReleaseDataFlagOn();
>>
>>>
>>> Thats not much testing of this option! So I am writing a test to do a
>>
>>> little more testing of it. I notice that in in itkDataObject we have the
>>
>>> following:
>>
>>>
>>>  static void SetGlobalReleaseDataFlag(const bool val);
>>
>>>  static bool GetGlobalReleaseDataFlag();
>>
>>>  void GlobalReleaseDataFlagOn()
>>
>>>    {this->SetGlobalReleaseDataFlag(true);}
>>
>>>  void GlobalReleaseDataFlagOff()
>>
>>>    {this->SetGlobalReleaseDataFlag(false);}
>>
>>>
>>> I can't think of any reason why the On/Off methods are not static. It
>>
>>> appears to be there since day one. Any objections to changing them to
>>
>>> static?
>>
>>>
>>> Brad
>>
>>>
>>>
>>> ========================================================
>>
>>>
>>> Bradley Lowekamp  
>>
>>>
>>> Lockheed Martin Contractor for
>>
>>>
>>> Office of High Performance Computing and Communications
>>
>>>
>>> National Library of Medicine
>>
>>>
>>> blowekamp at mail.nih.gov <mailto:blowekamp at mail.nih.gov>
>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>
>>>
>>> _______________________________________________
>>
>>> Powered by www.kitware.com <http://www.kitware.com>
>>
>>>
>>> Visit other Kitware open-source projects at 
>>> http://www.kitware.com/opensource/opensource.html
>>
>>>
>>> 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
> 
> 
> ========================================================
> 
> Bradley Lowekamp  
> 
> Lockheed Martin Contractor for
> 
> Office of High Performance Computing and Communications
> 
> National Library of Medicine 
> 
> blowekamp at mail.nih.gov <mailto:blowekamp at mail.nih.gov>
> 
> 
> 


More information about the Insight-developers mailing list