[Insight-developers] Optimized ImageToImageMetric::SetFixedImageRegion signature

Stephen Aylward stephen.aylward at kitware.com
Tue Aug 18 13:50:01 EDT 2009


Hi,

Yup - no backward compatibility issues apply to code in Review.

The change you've suggested seems appropriate to me.

Good catch - thanks!

Stephen

On Tue, Aug 18, 2009 at 1:40 PM, Tom Vercauteren<tom.vercauteren at m4x.org> wrote:
> Hi,
>
> In the non-optimized case, ImageToImageMetric::SetFixedImageRegion is
> defined as follows (through a itkSetMacro):
>
>  void SetFixedImageRegion( const FixedImageRegionType reg );
>
> In the optimized case, it is manually defined as:
>
>  void SetFixedImageRegion( FixedImageRegionType reg );
>
>
> This causes some warning in msvc when a class inherits from
> ImageToImageMetric and needs to override SetFixedImageRegion:
>
>    virtual function overrides
> 'itk::ImageToImageMetric<TFixedImage,TMovingImage>::SetFixedImageRegion',
> previous versions of the compiler did not override when parameters
> only differed by const/volatile qualifiers
>
>
> Just to make sure: Since the optimized registration code is in review,
> there is no backward compatibility problem if I change the signature
> of SetFixedImageRegion to match the one from the non-optimized code,
> right?
>
> Also, I realized that doxygen gets confused by the itkSetMacro.
> Looking at ImageToImageMetric::SetFixedImageRegion it reports a
> non-const argument:
>
>  http://www.itk.org/Doxygen/html/classitk_1_1ImageToImageMetric.html#7d192f58b6309c49ee01e47755faff03
>
> However the doxygen version is based on the non-optimized code:
>
>  http://www.itk.org/Doxygen/html/itkImageToImageMetric_8h-source.html
>
> and correctly shows the const in the itkSetMacro definition:
>
>  http://www.itk.org/Doxygen/html/itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa
>
> Regards,
> Tom
> _______________________________________________
> 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
>



-- 
Stephen R. Aylward, Ph.D.
Director of Medical Imaging
Kitware, Inc. - North Carolina Office
http://www.kitware.com
stephen.aylward (Skype)
(919) 969-6990 x300


More information about the Insight-developers mailing list