Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COMP: Fix -fpermissive error in OptimizingInterpolationDisplacementCa…
…lculator This commit fixes the following error reported when building SlicerITKUltrasound extension againg Slicer 4.13 and ITK 5.3: In file included from /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingOptimizingInterpolationDisplacementCalculator.h:202, from /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingDisplacementPipeline.h:39, from /path/to/SlicerITKUltrasound/GenerateDisplacementFromFrames/GenerateDisplacementFromFrames.cxx:25: /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingOptimizingInterpolationDisplacementCalculator.hxx: In instantiation of ‘void itk::BlockMatching::OptimizingInterpolationDisplacementCalculator<TMetricImage, TDisplacementImage, TCoordRep>::SetMetricImagePixel(const PointType&, const IndexType&, itk::BlockMatching::OptimizingInterpolationDisplacementCalculator<TMetricImage, TDisplacementImage, TCoordRep>::MetricImageType*) [with TMetricImage = itk::Image<float, 2>; TDisplacementImage = itk::Image<itk::Vector<float, 2>, 2>; TCoordRep = double; itk::BlockMatching::OptimizingInterpolationDisplacementCalculator<TMetricImage, TDisplacementImage, TCoordRep>::PointType = itk::Point<double, 2>; itk::BlockMatching::OptimizingInterpolationDisplacementCalculator<TMetricImage, TDisplacementImage, TCoordRep>::IndexType = itk::Index<2>; itk::BlockMatching::OptimizingInterpolationDisplacementCalculator<TMetricImage, TDisplacementImage, TCoordRep>::MetricImageType = itk::Image<float, 2>]’: /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingOptimizingInterpolationDisplacementCalculator.hxx:41:1: required from here /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingOptimizingInterpolationDisplacementCalculator.hxx:95:5: error: passing ‘const InterpolatorType’ {aka ‘const itk::InterpolateImageFunction<itk::Image<float, 2>, double>’} as ‘this’ argument discards qualifiers [-fpermissive] 95 | m_CostFunction->GetInterpolator()->SetInputImage(metricImage); | ^~~~~~~~~~~~~~ In file included from /path/to/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkImageFunction.h:229, from /path/to/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:21, from /path/to/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h:23, from /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingDisplacementPipeline.h:26, from /path/to/SlicerITKUltrasound/GenerateDisplacementFromFrames/GenerateDisplacementFromFrames.cxx:25: /path/to/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkImageFunction.hxx:57:1: note: in call to ‘void itk::ImageFunction<TInputImage, TOutput, TCoordRep>::SetInputImage(const InputImageType*) [with TInputImage = itk::Image<float, 2>; TOutput = double; TCoordRep = double; itk::ImageFunction<TInputImage, TOutput, TCoordRep>::InputImageType = itk::Image<float, 2>]’ 57 | ImageFunction<TInputImage, TOutput, TCoordRep>::SetInputImage(const InputImageType * ptr) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Loading branch information