[Insight-developers] GlobalReleaseDataFlag and ReleaseData testing
Bradley Lowekamp
blowekamp at mail.nih.gov
Thu Feb 19 11:56:23 EST 2009
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
>>
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090219/2f58101f/attachment.htm>
More information about the Insight-developers
mailing list