[Insight-developers] Unlike in WarpImageFilter, WarpVectorImageFilter::SetDeformationField takes a non-const deformation field

Bill Lorensen bill.lorensen at gmail.com
Thu Mar 5 15:11:38 EST 2009


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
>


More information about the Insight-developers mailing list