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 StrainWindowBlockAffineTransformCommand
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/itkBlockMatchingStrainWindowBlockAffineTransformCommand.h:105, from /path/to/SlicerITKUltrasound/GenerateDisplacementFromTimeSeries/GenerateDisplacementFromTimeSeries.cxx:38: /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.hxx: In instantiation of ‘void itk::BlockMatching::StrainWindowBlockAffineTransformCommand<TStrainWindowDisplacemenCalculator, TBlockAffineTransformMetricImageFilter, TStrainImageFilter>::Execute(const itk::Object*, const itk::EventObject&) [with TStrainWindowDisplacemenCalculator = itk::BlockMatching::StrainWindowDisplacementCalculator<itk::Image<float, 2>, itk::Image<itk::Vector<float, 2>, 2>, float>; TBlockAffineTransformMetricImageFilter = itk::BlockMatching::BlockAffineTransformMetricImageFilter<itk::Image<unsigned char, 2>, itk::Image<unsigned char, 2>, itk::Image<float, 2>, float>; TStrainImageFilter = itk::StrainImageFilter<itk::Image<itk::Vector<float, 2>, 2>, float, float>]’: /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.hxx:49:1: required from here /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.hxx:73:5: error: invalid conversion from ‘const OutputImageType*’ {aka ‘const itk::Image<itk::SymmetricSecondRankTensor<float, 2>, 2>*’} to ‘itk::BlockMatching::BlockAffineTransformMetricImageFilter<itk::Image<unsigned char, 2>, itk::Image<unsigned char, 2>, itk::Image<float, 2>, float>::StrainImageType*’ {aka ‘itk::Image<itk::SymmetricSecondRankTensor<float, 2>, 2>*’} [-fpermissive] 73 | m_BlockAffineTransformMetricImageFilter->SetStrainImage(strainWindower->GetStrainImageFilter()->GetOutput()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | const OutputImageType* {aka const itk::Image<itk::SymmetricSecondRankTensor<float, 2>, 2>*} In file included from /path/to/Slicer-Release/ITK/Modules/IO/ImageBase/include/itkImageFileReaderException.h:22, from /path/to/Slicer-Release/ITK/Modules/IO/ImageBase/include/itkImageFileReader.h:20, from /path/to/SlicerITKUltrasound/GenerateDisplacementFromTimeSeries/GenerateDisplacementFromTimeSeries.cxx:19: /path/to/Slicer-Release/ITK/Modules/Core/Common/include/itkMacro.h:1097:33: note: initializing argument 1 of ‘void itk::BlockMatching::BlockAffineTransformMetricImageFilter<TFixedImage, TMovingImage, TMetricImage, TStrainValueType>::SetStrainImage(itk::BlockMatching::BlockAffineTransformMetricImageFilter<TFixedImage, TMovingImage, TMetricImage, TStrainValueType>::StrainImageType*) [with TFixedImage = itk::Image<unsigned char, 2>; TMovingImage = itk::Image<unsigned char, 2>; TMetricImage = itk::Image<float, 2>; TStrainValueType = float; itk::BlockMatching::BlockAffineTransformMetricImageFilter<TFixedImage, TMovingImage, TMetricImage, TStrainValueType>::StrainImageType = itk::Image<itk::SymmetricSecondRankTensor<float, 2>, 2>]’ 1097 | virtual void Set##name(type * _arg) \ /path/to/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingBlockAffineTransformMetricImageFilter.h:104:3: note: in expansion of macro ‘itkSetObjectMacro’ 104 | itkSetObjectMacro(StrainImage, StrainImageType); | ^~~~~~~~~~~~~~~~~
- Loading branch information