[Insight-developers] Unlike in WarpImageFilter, WarpVectorImageFilter::SetDeformationField takes a non-const deformation field
Bradley Lowekamp
blowekamp at mail.nih.gov
Thu Mar 5 16:00:17 EST 2009
Are both methods needed? Can't any DeformationFieldType* be converted
to const DeformationFieldType* with out a problem?
On Mar 5, 2009, at 3:11 PM, Bill Lorensen wrote:
> You could just add the const call and leave the old one. The Set ends
> up calling ProcessObject::SetNthInput which does not take a const
> input. This would be fully backward compatible.
>
> Bill
>
> On Thu, Mar 5, 2009 at 11:41 AM, Tom Vercauteren
> <tom.vercauteren at m4x.org> wrote:
>> Hi,
>>
>> Sorry for being so noisy recently...
>>
>> I stumbled on the following problem. The signature of
>> WarpVectorImageFilter::SetDeformationField is
>> void SetDeformationField( DeformationFieldType * field );
>> instead of
>> void SetDeformationField( const DeformationFieldType * field );
>> in WarpImageFilter.
>>
>> This requires me to use some const_cast that I would like to avoid.
>> May I just fix this const-correct issue? Or would it also potentially
>> break backwards compatibility?
>>
>> Tom
>>
>> P.S.: The const correctness change to WarpImageFilter was committed
>> some 5 years ago:
>> http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkWarpImageFilter.h?root=Insight&r1=1.17&r2=1.18&sortby=date
>> _______________________________________________
>> 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
>>
> _______________________________________________
> 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/20090305/b01d466f/attachment.htm>
More information about the Insight-developers
mailing list