KitwareMedical / ITKUltrasound

ITK module with classes particularly useful for ultrasound.
http://www.insight-journal.org/browse/publication/722
Apache License 2.0
51 stars 22 forks source link

Support build against itk5.3 #198

Closed jcfr closed 2 years ago

jcfr commented 2 years ago

Remaining error reported when building SlicerITKUltrasound (based of https://github.com/KitwareMedical/SlicerITKUltrasound/pull/78) are like the following:

In file included from /home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.h:105,
                 from /home/jcfr/Projects/SlicerITKUltrasound/GenerateDisplacementFromTimeSeries/GenerateDisplacementFromTimeSeries.cxx:38:
/home/jcfr/Projects/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>]’:
/home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.hxx:49:1:   required from here
/home/jcfr/Projects/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 /home/jcfr/Projects/Slicer-Release/ITK/Modules/IO/ImageBase/include/itkImageFileReaderException.h:22,
                 from /home/jcfr/Projects/Slicer-Release/ITK/Modules/IO/ImageBase/include/itkImageFileReader.h:20,
                 from /home/jcfr/Projects/SlicerITKUltrasound/GenerateDisplacementFromTimeSeries/GenerateDisplacementFromTimeSeries.cxx:19:
/home/jcfr/Projects/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)                  \
/home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingBlockAffineTransformMetricImageFilter.h:104:3: note: in expansion of macro ‘itkSetObjectMacro’
  104 |   itkSetObjectMacro(StrainImage, StrainImageType);
      |   ^~~~~~~~~~~~~~~~~
In file included from /home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.h:105,
                 from /home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingDisplacementPipeline.h:42,
                 from /home/jcfr/Projects/SlicerITKUltrasound/GenerateDisplacementFromFrames/GenerateDisplacementFromFrames.cxx:25:
/home/jcfr/Projects/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<float, 2>, itk::Image<float, 2>, itk::Image<float, 2>, float>; TStrainImageFilter = itk::StrainImageFilter<itk::Image<itk::Vector<float, 2>, 2>, float, float>]’:
/home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingStrainWindowBlockAffineTransformCommand.hxx:49:1:   required from here
/home/jcfr/Projects/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<float, 2>, itk::Image<float, 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 /home/jcfr/Projects/Slicer-Release/ITK/Modules/IO/ImageBase/include/itkImageFileReaderException.h:22,
                 from /home/jcfr/Projects/Slicer-Release/ITK/Modules/IO/ImageBase/include/itkImageFileReader.h:20,
                 from /home/jcfr/Projects/SlicerITKUltrasound/GenerateDisplacementFromFrames/GenerateDisplacementFromFrames.cxx:19:
/home/jcfr/Projects/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<float, 2>; TMovingImage = itk::Image<float, 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)                  \
/home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingBlockAffineTransformMetricImageFilter.h:104:3: note: in expansion of macro ‘itkSetObjectMacro’
  104 |   itkSetObjectMacro(StrainImage, StrainImageType);
      |   ^~~~~~~~~~~~~~~~~
In file included from /home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingOptimizingInterpolationDisplacementCalculator.h:202,
                 from /home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingDisplacementPipeline.h:39,
                 from /home/jcfr/Projects/SlicerITKUltrasound/GenerateDisplacementFromFrames/GenerateDisplacementFromFrames.cxx:25:
/home/jcfr/Projects/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>]’:
/home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingOptimizingInterpolationDisplacementCalculator.hxx:41:1:   required from here
/home/jcfr/Projects/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 /home/jcfr/Projects/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkImageFunction.h:229,
                 from /home/jcfr/Projects/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:21,
                 from /home/jcfr/Projects/Slicer-Release/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h:23,
                 from /home/jcfr/Projects/SlicerITKUltrasound-Release/ITKUltrasound/include/itkBlockMatchingDisplacementPipeline.h:26,
                 from /home/jcfr/Projects/SlicerITKUltrasound/GenerateDisplacementFromFrames/GenerateDisplacementFromFrames.cxx:25:
/home/jcfr/Projects/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)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc: @dzenanz @thewtex