From fcdac9bf2d04082d86370733800542545cbd7c02 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Fri, 13 Dec 2019 21:09:46 -0600 Subject: [PATCH 1/5] COMP: Exceptions should be caught by constant reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modules/Core/SpatialObjects/test/itkContourSpatialObjectTest.cxx:244:31: warning: catching polymorphic type ‘class itk::ExceptionObject’ by value [-Wcatch-value=] Catching by value is problematic in the face of inheritance hierarchies. https://clang.llvm.org/extra/clang-tidy/checks/misc-throw-by-value-catch-by-reference.html https://wiki.sei.cmu.edu/confluence/display/cplusplus/ERR61-CPP.+Catch+exceptions+by+lvalue+reference --- Examples/DataRepresentation/Image/Image5.cxx | 2 +- .../Image/ImageAdaptor2.cxx | 2 +- .../Mesh/ImageToPointSet.cxx | 2 +- .../Path/PolyLineParametricPath1.cxx | 2 +- .../Filtering/AntiAliasBinaryImageFilter.cxx | 4 ++-- .../CannyEdgeDetectionImageFilter.cxx | 2 +- Examples/Filtering/CompositeFilterExample.cxx | 2 +- .../DanielssonDistanceMapImageFilter.cxx | 2 +- ...usionTensor3DReconstructionImageFilter.cxx | 2 +- .../DigitallyReconstructedRadiograph1.cxx | 6 +++--- Examples/Filtering/FFTImageFilter.cxx | 8 ++++---- .../FFTImageFilterFourierDomainFiltering.cxx | 4 ++-- .../GrayscaleFunctionDilateImageFilter.cxx | 2 +- Examples/Filtering/LaplacianImageFilter.cxx | 2 +- ...LaplacianRecursiveGaussianImageFilter1.cxx | 2 +- ...LaplacianRecursiveGaussianImageFilter2.cxx | 2 +- .../LaplacianSharpeningImageFilter.cxx | 2 +- .../MorphologicalImageEnhancement.cxx | 4 ++-- .../OtsuMultipleThresholdImageFilter.cxx | 8 ++++---- .../Filtering/OtsuThresholdImageFilter.cxx | 4 ++-- Examples/Filtering/RGBToGrayscale.cxx | 2 +- Examples/Filtering/ResampleImageFilter3.cxx | 2 +- Examples/Filtering/ResampleImageFilter4.cxx | 2 +- Examples/Filtering/ResampleImageFilter5.cxx | 2 +- Examples/Filtering/ResampleImageFilter6.cxx | 2 +- Examples/Filtering/ResampleImageFilter7.cxx | 2 +- Examples/Filtering/ResampleImageFilter8.cxx | 2 +- Examples/Filtering/ResampleImageFilter9.cxx | 4 ++-- .../ResampleVolumesToBeIsotropic.cxx | 4 ++-- ...DerivativeRecursiveGaussianImageFilter.cxx | 2 +- ...SignedDanielssonDistanceMapImageFilter.cxx | 6 +++--- Examples/Filtering/SpatialObjectToImage1.cxx | 2 +- Examples/Filtering/SpatialObjectToImage2.cxx | 2 +- Examples/Filtering/SpatialObjectToImage3.cxx | 2 +- Examples/Filtering/SubsampleVolume.cxx | 4 ++-- Examples/Filtering/SurfaceExtraction.cxx | 4 ++-- Examples/Filtering/VectorIndexSelection.cxx | 2 +- Examples/Filtering/WarpImageFilter1.cxx | 2 +- ...oCrossingBasedEdgeDetectionImageFilter.cxx | 2 +- Examples/IO/ComplexImageReadWrite.cxx | 2 +- .../CovariantVectorImageExtractComponent.cxx | 2 +- Examples/IO/CovariantVectorImageRead.cxx | 2 +- Examples/IO/CovariantVectorImageWrite.cxx | 2 +- .../IO/DicomImageReadChangeHeaderWrite.cxx | 4 ++-- Examples/IO/DicomImageReadPrintTags.cxx | 2 +- Examples/IO/DicomImageReadWrite.cxx | 8 ++++---- Examples/IO/DicomPrintPatientInformation.cxx | 2 +- .../IO/DicomSeriesReadGaussianImageWrite.cxx | 6 +++--- Examples/IO/DicomSeriesReadImageWrite.cxx | 6 +++--- Examples/IO/DicomSeriesReadImageWrite2.cxx | 6 +++--- Examples/IO/DicomSeriesReadPrintTags.cxx | 2 +- Examples/IO/DicomSeriesReadSeriesWrite.cxx | 4 ++-- Examples/IO/IOPlugin.cxx | 4 ++-- Examples/IO/ImageReadCastWrite.cxx | 2 +- Examples/IO/ImageReadDicomSeriesWrite.cxx | 4 ++-- Examples/IO/ImageReadExportVTK.cxx | 2 +- .../IO/ImageReadExtractFilterInsertWrite.cxx | 2 +- Examples/IO/ImageReadExtractWrite.cxx | 2 +- Examples/IO/ImageReadImageSeriesWrite.cxx | 4 ++-- .../IO/ImageReadRegionOfInterestWrite.cxx | 2 +- Examples/IO/ImageReadWrite.cxx | 2 +- Examples/IO/ImageSeriesReadWrite.cxx | 2 +- Examples/IO/ImageSeriesReadWrite2.cxx | 2 +- Examples/IO/RGBImageSeriesReadWrite.cxx | 4 ++-- Examples/IO/TransformReadWrite.cxx | 4 ++-- Examples/IO/VectorImageReadWrite.cxx | 2 +- Examples/IO/VisibleHumanPasteWrite.cxx | 2 +- Examples/IO/VisibleHumanStreamReadWrite.cxx | 2 +- .../ImageLinearIteratorWithIndex.cxx | 4 ++-- .../ImageLinearIteratorWithIndex2.cxx | 4 ++-- .../ImageRandomConstIteratorWithIndex.cxx | 2 +- Examples/Iterators/ImageRegionIterator.cxx | 4 ++-- .../ImageRegionIteratorWithIndex.cxx | 4 ++-- .../Iterators/ImageSliceIteratorWithIndex.cxx | 4 ++-- Examples/Iterators/NeighborhoodIterators1.cxx | 4 ++-- Examples/Iterators/NeighborhoodIterators2.cxx | 4 ++-- Examples/Iterators/NeighborhoodIterators3.cxx | 4 ++-- Examples/Iterators/NeighborhoodIterators4.cxx | 4 ++-- Examples/Iterators/NeighborhoodIterators5.cxx | 4 ++-- Examples/Iterators/NeighborhoodIterators6.cxx | 4 ++-- .../ShapedNeighborhoodIterators1.cxx | 4 ++-- .../ShapedNeighborhoodIterators2.cxx | 4 ++-- .../RegistrationITKv4/BSplineWarping1.cxx | 8 ++++---- .../RegistrationITKv4/BSplineWarping2.cxx | 8 ++++---- .../ChangeInformationImageFilter.cxx | 4 ++-- .../DeformableRegistration1.cxx | 12 +++++------ .../DeformableRegistration10.cxx | 2 +- .../DeformableRegistration11.cxx | 8 ++++---- .../DeformableRegistration12.cxx | 10 +++++----- .../DeformableRegistration13.cxx | 10 +++++----- .../DeformableRegistration14.cxx | 10 +++++----- .../DeformableRegistration15.cxx | 18 ++++++++--------- .../DeformableRegistration16.cxx | 6 +++--- .../DeformableRegistration17.cxx | 6 +++--- .../DeformableRegistration2.cxx | 2 +- .../DeformableRegistration4.cxx | 12 +++++------ .../DeformableRegistration5.cxx | 2 +- .../DeformableRegistration6.cxx | 12 +++++------ .../DeformableRegistration7.cxx | 12 +++++------ .../DeformableRegistration8.cxx | 12 +++++------ .../DeformableRegistration9.cxx | 2 +- .../DisplacementFieldInitialization.cxx | 6 +++--- .../RegistrationITKv4/ImageRegistration1.cxx | 2 +- .../RegistrationITKv4/ImageRegistration10.cxx | 2 +- .../RegistrationITKv4/ImageRegistration11.cxx | 2 +- .../RegistrationITKv4/ImageRegistration12.cxx | 4 ++-- .../RegistrationITKv4/ImageRegistration13.cxx | 2 +- .../RegistrationITKv4/ImageRegistration14.cxx | 2 +- .../RegistrationITKv4/ImageRegistration15.cxx | 2 +- .../RegistrationITKv4/ImageRegistration16.cxx | 2 +- .../RegistrationITKv4/ImageRegistration17.cxx | 2 +- .../RegistrationITKv4/ImageRegistration18.cxx | 2 +- .../RegistrationITKv4/ImageRegistration19.cxx | 2 +- .../RegistrationITKv4/ImageRegistration2.cxx | 2 +- .../RegistrationITKv4/ImageRegistration20.cxx | 2 +- .../RegistrationITKv4/ImageRegistration3.cxx | 2 +- .../RegistrationITKv4/ImageRegistration4.cxx | 2 +- .../RegistrationITKv4/ImageRegistration5.cxx | 6 +++--- .../RegistrationITKv4/ImageRegistration6.cxx | 4 ++-- .../RegistrationITKv4/ImageRegistration7.cxx | 2 +- .../RegistrationITKv4/ImageRegistration8.cxx | 2 +- .../RegistrationITKv4/ImageRegistration9.cxx | 2 +- .../ImageRegistrationHistogramPlotter.cxx | 16 +++++++-------- .../IterativeClosestPoint1.cxx | 2 +- .../IterativeClosestPoint2.cxx | 2 +- .../IterativeClosestPoint3.cxx | 2 +- .../RegistrationITKv4/LandmarkWarping2.cxx | 6 +++--- .../MeanSquaresImageMetric1.cxx | 4 ++-- .../ModelToImageRegistration1.cxx | 2 +- .../ModelToImageRegistration2.cxx | 4 ++-- .../MultiResImageRegistration1.cxx | 2 +- .../MultiResImageRegistration2.cxx | 2 +- .../MultiResImageRegistration3.cxx | 2 +- .../MultiStageImageRegistration1.cxx | 6 +++--- .../MultiStageImageRegistration2.cxx | 4 ++-- .../RegistrationITKv4/ThinPlateSplineWarp.cxx | 6 +++--- .../CannySegmentationLevelSetImageFilter.cxx | 4 ++-- Examples/Segmentation/ConfidenceConnected.cxx | 2 +- .../Segmentation/ConfidenceConnected3D.cxx | 2 +- .../ConnectedThresholdImageFilter.cxx | 2 +- .../CurvesLevelSetImageFilter.cxx | 2 +- .../Segmentation/FastMarchingImageFilter.cxx | 10 +++++----- .../GeodesicActiveContourImageFilter.cxx | 2 +- ...veContourShapePriorLevelSetImageFilter.cxx | 2 +- .../HoughTransform2DCirclesImageFilter.cxx | 4 ++-- .../HoughTransform2DLinesImageFilter.cxx | 4 ++-- .../IsolatedConnectedImageFilter.cxx | 2 +- ...placianSegmentationLevelSetImageFilter.cxx | 2 +- .../NeighborhoodConnectedImageFilter.cxx | 2 +- .../ShapeDetectionLevelSetFilter.cxx | 2 +- ...resholdSegmentationLevelSetImageFilter.cxx | 2 +- .../VectorConfidenceConnected.cxx | 2 +- .../Segmentation/WatershedSegmentation1.cxx | 2 +- .../Segmentation/WatershedSegmentation2.cxx | 2 +- .../BoundingBoxFromImageMaskSpatialObject.cxx | 2 +- Examples/Statistics/BayesianClassifier.cxx | 2 +- .../BayesianClassifierInitializer.cxx | 6 +++--- Examples/Statistics/ImageEntropy1.cxx | 2 +- Examples/Statistics/ImageHistogram1.cxx | 2 +- Examples/Statistics/ImageHistogram2.cxx | 2 +- Examples/Statistics/ImageHistogram3.cxx | 2 +- Examples/Statistics/ImageHistogram4.cxx | 2 +- .../Statistics/ImageMutualInformation1.cxx | 2 +- .../ScalarImageKmeansClassifier.cxx | 2 +- .../ScalarImageKmeansModelEstimator.cxx | 2 +- .../ScalarImageMarkovRandomField1.cxx | 2 +- .../test/itkVTKImageToImageFilterTest.cxx | 2 +- .../Deprecated/test/itkBarrierTest.cxx | 2 +- .../test/itkConditionVariableTest.cxx | 2 +- .../Common/include/itkSmapsFileParser.hxx | 4 ++-- .../Common/test/itkAnnulusOperatorTest.cxx | 2 +- .../test/itkBSplineKernelFunctionTest.cxx | 4 ++-- Modules/Core/Common/test/itkByteSwapTest.cxx | 8 ++++---- .../Common/test/itkExceptionObjectTest.cxx | 2 +- .../test/itkFloatingPointExceptionsTest.cxx | 8 ++++---- .../Common/test/itkImageDuplicatorTest2.cxx | 2 +- .../Common/test/itkImageFillBufferTest.cxx | 2 +- .../test/itkImageRandomIteratorTest2.cxx | 2 +- .../Core/Common/test/itkImageRegionTest.cxx | 8 ++++---- .../test/itkImageToImageToleranceTest.cxx | 8 ++++---- .../Common/test/itkImportContainerTest.cxx | 2 +- .../Core/Common/test/itkImportImageTest.cxx | 2 +- Modules/Core/Common/test/itkMatrixTest.cxx | 6 +++--- .../Common/test/itkMetaDataDictionaryTest.cxx | 8 ++++---- .../test/itkNeighborhoodIteratorTest.cxx | 2 +- Modules/Core/Common/test/itkOctreeTest.cxx | 4 ++-- .../Core/Common/test/itkSliceIteratorTest.cxx | 2 +- ...SymmetricSecondRankTensorImageReadTest.cxx | 4 ++-- ...tricSecondRankTensorImageWriteReadTest.cxx | 4 ++-- Modules/Core/Common/test/itkTimeStampTest.cxx | 2 +- .../Common/test/itkVariableSizeMatrixTest.cxx | 12 +++++------ Modules/Core/Common/test/itkVersorTest.cxx | 4 ++-- .../itkAutomaticTopologyMeshSourceTest.cxx | 2 +- .../test/itkBinaryMask3DMeshSourceTest.cxx | 2 +- .../itkExtractMeshConnectedRegionsTest.cxx | 2 +- ...ametricSpaceToImageSpaceMeshFilterTest.cxx | 4 ++-- .../test/itkRegularSphereMeshSourceTest.cxx | 2 +- ...tkTriangleMeshToBinaryImageFilterTest3.cxx | 2 +- ...tkTriangleMeshToBinaryImageFilterTest4.cxx | 8 ++++---- .../Mesh/test/itkVTKPolyDataReaderTest.cxx | 2 +- .../Mesh/test/itkVTKPolyDataWriterTest02.cxx | 2 +- .../Core/Mesh/test/itkWarpMeshFilterTest.cxx | 2 +- ...geMeshScalarDataVTKPolyDataWriterTest1.cxx | 4 ++-- .../test/itkVTKPolyDataIOQuadEdgeMeshTest.cxx | 4 ++-- .../itkVTKPolyDataReaderQuadEdgeMeshTest.cxx | 2 +- .../test/itkBoxSpatialObjectTest.cxx | 2 +- .../test/itkContourSpatialObjectTest.cxx | 3 ++- .../TestKernel/include/itkTestingMacros.h | 4 ++-- Modules/Core/TestKernel/src/itkTestDriver.cxx | 2 +- .../TestKernel/src/itkTestDriverInclude.cxx | 8 ++++---- ...tkTestDriverIncludeRequiredIOFactories.cxx | 2 +- .../itkTestingExtractSliceImageFilterTest.cxx | 2 +- .../itkBSplineDeformableTransformTest.cxx | 12 +++++------ .../itkBSplineDeformableTransformTest2.cxx | 6 +++--- .../itkBSplineDeformableTransformTest3.cxx | 6 +++--- .../itkBSplineTransformInitializerTest1.cxx | 6 +++--- .../itkBSplineTransformInitializerTest2.cxx | 2 +- .../test/itkBSplineTransformTest.cxx | 10 +++++----- .../test/itkBSplineTransformTest2.cxx | 6 +++--- .../test/itkBSplineTransformTest3.cxx | 6 +++--- .../test/itkCompositeTransformTest.cxx | 2 +- .../test/itkEuler3DTransformTest.cxx | 4 ++-- .../test/itkQuaternionRigidTransformTest.cxx | 4 ++-- .../test/itkRigid3DTransformTest.cxx | 10 +++++----- .../test/itkScaleVersor3DTransformTest.cxx | 4 ++-- .../test/itkSimilarity3DTransformTest.cxx | 4 ++-- .../test/itkTestTransformGetInverse.cxx | 2 +- .../Core/Transform/test/itkTransformTest.cxx | 12 +++++------ .../test/itkVersorRigid3DTransformTest.cxx | 4 ++-- .../Transform/test/itkVersorTransformTest.cxx | 4 ++-- ...ureAnisotropicDiffusionImageFilterTest.cxx | 2 +- ...entAnisotropicDiffusionImageFilterTest.cxx | 2 +- ...ntAnisotropicDiffusionImageFilterTest2.cxx | 4 ++-- .../itkMinMaxCurvatureFlowImageFilterTest.cxx | 2 +- ...torAnisotropicDiffusionImageFilterTest.cxx | 2 +- ...tkN4BiasFieldCorrectionImageFilterTest.cxx | 4 ++-- .../test/itkBinaryDilateImageFilterTest.cxx | 2 +- .../test/itkBinaryDilateImageFilterTest2.cxx | 4 ++-- .../test/itkBinaryDilateImageFilterTest3.cxx | 2 +- .../test/itkBinaryErodeImageFilterTest.cxx | 2 +- .../test/itkBinaryErodeImageFilterTest3.cxx | 2 +- ...aryMorphologicalClosingImageFilterTest.cxx | 2 +- ...aryMorphologicalOpeningImageFilterTest.cxx | 2 +- .../test/itkBinaryThinningImageFilterTest.cxx | 2 +- ...tkErodeObjectMorphologyImageFilterTest.cxx | 2 +- ...onvolutionImageFilterDeltaFunctionTest.cxx | 2 +- .../test/itkConvolutionImageFilterTest.cxx | 8 ++++---- .../test/itkConvolutionImageFilterTestInt.cxx | 2 +- .../test/itkFFTConvolutionImageFilterTest.cxx | 2 +- ...FTNormalizedCorrelationImageFilterTest.cxx | 2 +- ...FTNormalizedCorrelationImageFilterTest.cxx | 2 +- ...tkNormalizedCorrelationImageFilterTest.cxx | 2 +- ...naryMinMaxCurvatureFlowImageFilterTest.cxx | 2 +- .../test/itkCurvatureFlowTest.cxx | 4 ++-- ...itkInverseDeconvolutionImageFilterTest.cxx | 2 +- ...kLandweberDeconvolutionImageFilterTest.cxx | 2 +- ...astSquaresDeconvolutionImageFilterTest.cxx | 4 ++-- ...dLandweberDeconvolutionImageFilterTest.cxx | 2 +- ...ardsonLucyDeconvolutionImageFilterTest.cxx | 4 ++-- ...tkTikhonovDeconvolutionImageFilterTest.cxx | 2 +- .../itkWienerDeconvolutionImageFilterTest.cxx | 2 +- ...mposeDisplacementFieldsImageFilterTest.cxx | 2 +- ...mentFieldJacobianDeterminantFilterTest.cxx | 2 +- ...placementFieldToBSplineImageFilterTest.cxx | 4 ++-- ...nverseDisplacementFieldImageFilterTest.cxx | 4 ++-- ...InvertDisplacementFieldImageFilterTest.cxx | 2 +- ...nverseDisplacementFieldImageFilterTest.cxx | 4 ++-- ...itkLandmarkDisplacementFieldSourceTest.cxx | 4 ++-- ...TransformToDisplacementFieldFilterTest.cxx | 2 +- ...ransformToDisplacementFieldFilterTest1.cxx | 8 ++++---- .../itkFastChamferDistanceImageFilterTest.cxx | 2 +- .../itkIsoContourDistanceImageFilterTest.cxx | 4 ++-- .../itkComplexToComplexFFTImageFilterTest.cxx | 2 +- .../FFT/test/itkFFTShiftImageFilterTest.cxx | 4 ++-- Modules/Filtering/FFT/test/itkFFTTest.h | 6 +++--- ...FFTWComplexToComplexFFTImageFilterTest.cxx | 2 +- Modules/Filtering/FFT/test/itkRealFFTTest.h | 6 +++--- ...kVnlComplexToComplexFFTImageFilterTest.cxx | 2 +- .../test/itkFastMarchingBaseTest.cxx | 4 ++-- ...tkFastMarchingExtensionImageFilterTest.cxx | 10 +++++----- ...mageFilterRealWithNumberOfElementsTest.cxx | 4 ++-- .../itkFastMarchingImageTopologicalTest.cxx | 16 +++++++-------- ...FastMarchingQuadEdgeMeshFilterBaseTest.cxx | 2 +- ...astMarchingQuadEdgeMeshFilterBaseTest2.cxx | 2 +- ...astMarchingQuadEdgeMeshFilterBaseTest3.cxx | 2 +- ...astMarchingQuadEdgeMeshFilterBaseTest4.cxx | 2 +- ...EdgeMeshFilterWithNumberOfElementsTest.cxx | 2 +- ...entAnisotropicDiffusionImageFilterTest.cxx | 4 ++-- .../test/itkSTAPLEImageFilterTest.cxx | 4 ++-- .../itkSimilarityIndexImageFilterTest.cxx | 2 +- ...ompose2DCovariantVectorImageFilterTest.cxx | 2 +- .../itkCompose2DVectorImageFilterTest.cxx | 2 +- ...ompose3DCovariantVectorImageFilterTest.cxx | 2 +- .../itkCompose3DVectorImageFilterTest.cxx | 2 +- .../test/itkComposeRGBAImageFilterTest.cxx | 2 +- .../test/itkComposeRGBImageFilterTest.cxx | 2 +- ...geReadRealAndImaginaryWriteComplexTest.cxx | 2 +- .../test/itkImageToVectorImageFilterTest.cxx | 2 +- .../test/itkJoinSeriesImageFilterTest.cxx | 4 ++-- .../test/itkBilateralImageFilterTest.cxx | 2 +- .../test/itkBilateralImageFilterTest2.cxx | 2 +- .../test/itkBilateralImageFilterTest3.cxx | 2 +- .../test/itkLaplacianImageFilterTest.cxx | 4 ++-- ...lacianRecursiveGaussianImageFilterTest.cxx | 2 +- ...itkMaskFeaturePointSelectionFilterTest.cxx | 2 +- ...caleHessianBasedMeasureImageFilterTest.cxx | 20 +++++++++---------- ...kSimpleContourExtractorImageFilterTest.cxx | 2 +- .../itkSobelEdgeDetectionImageFilterTest.cxx | 2 +- ...ssingBasedEdgeDetectionImageFilterTest.cxx | 2 +- .../test/itkZeroCrossingImageFilterTest.cxx | 2 +- ...askNeighborhoodOperatorImageFilterTest.cxx | 2 +- ...itkNeighborhoodOperatorImageFilterTest.cxx | 2 +- ...torNeighborhoodOperatorImageFilterTest.cxx | 2 +- ...LabelMapContourOverlayImageFilterTest3.cxx | 2 +- .../itkLabelMapOverlayImageFilterTest3.cxx | 2 +- .../test/itkLabelOverlayImageFilterTest.cxx | 2 +- .../test/itkLabelToRGBImageFilterTest.cxx | 2 +- .../test/itkGradientImageFilterTest.cxx | 4 ++-- .../itkGradientMagnitudeImageFilterTest.cxx | 2 +- ...ectorGradientMagnitudeImageFilterTest1.cxx | 2 +- ...ectorGradientMagnitudeImageFilterTest2.cxx | 2 +- ...ectorGradientMagnitudeImageFilterTest3.cxx | 2 +- .../itkBSplineControlPointImageFilterTest.cxx | 4 ++-- .../itkBSplineDownsampleImageFilterTest.cxx | 2 +- .../itkBSplineResampleImageFilterTest.cxx | 8 ++++---- .../itkBSplineUpsampleImageFilterTest.cxx | 2 +- .../test/itkBinShrinkImageFilterTest1.cxx | 14 ++++++------- .../itkChangeInformationImageFilterTest.cxx | 2 +- .../test/itkExpandImageFilterTest.cxx | 4 ++-- .../test/itkInterpolateImageFilterTest.cxx | 4 ++-- .../ImageGrid/test/itkOrientedImage2DTest.cxx | 2 +- .../ImageGrid/test/itkOrientedImage3DTest.cxx | 2 +- .../ImageGrid/test/itkPadImageFilterTest.cxx | 2 +- .../test/itkPasteImageFilterTest.cxx | 2 +- .../test/itkPermuteAxesImageFilterTest.cxx | 4 ++-- .../test/itkPushPopTileImageFilterTest.cxx | 2 +- .../ImageGrid/test/itkResampleImageTest.cxx | 2 +- .../ImageGrid/test/itkResampleImageTest3.cxx | 2 +- .../test/itkSliceBySliceImageFilterTest.cxx | 8 ++++---- .../ImageGrid/test/itkTileImageFilterTest.cxx | 2 +- .../ImageGrid/test/itkWarpImageFilterTest.cxx | 2 +- .../test/itkWarpVectorImageFilterTest.cxx | 2 +- .../test/itkAddImageFilterFrameTest.cxx | 6 +++--- .../test/itkMaskImageFilterTest.cxx | 8 ++++---- .../test/itkPolylineMask2DImageFilterTest.cxx | 6 +++--- .../test/itkPromoteDimensionImageTest.cxx | 2 +- .../test/itkShiftScaleImageFilterTest.cxx | 2 +- .../test/itkVectorExpandImageFilterTest.cxx | 4 ++-- ...ectorIndexSelectionCastImageFilterTest.cxx | 4 ++-- .../test/itkAccumulateImageFilterTest.cxx | 10 +++++----- .../itkBinaryProjectionImageFilterTest.cxx | 2 +- .../itkGetAverageSliceImageFilterTest.cxx | 6 +++--- .../itkHistogramToEntropyImageFilterTest1.cxx | 4 ++-- .../itkHistogramToEntropyImageFilterTest2.cxx | 4 ++-- ...tkHistogramToIntensityImageFilterTest1.cxx | 4 ++-- ...tkHistogramToIntensityImageFilterTest2.cxx | 4 ++-- ...togramToLogProbabilityImageFilterTest1.cxx | 4 ++-- ...togramToLogProbabilityImageFilterTest2.cxx | 4 ++-- ...HistogramToProbabilityImageFilterTest1.cxx | 4 ++-- ...HistogramToProbabilityImageFilterTest2.cxx | 4 ++-- .../itkLabelStatisticsImageFilterTest.cxx | 2 +- .../itkMaximumProjectionImageFilterTest.cxx | 2 +- .../itkMaximumProjectionImageFilterTest2.cxx | 2 +- .../itkMaximumProjectionImageFilterTest3.cxx | 4 ++-- .../test/itkMeanProjectionImageFilterTest.cxx | 2 +- .../itkMedianProjectionImageFilterTest.cxx | 2 +- .../itkMinimumProjectionImageFilterTest.cxx | 2 +- .../test/itkProjectionImageFilterTest.cxx | 2 +- ...dardDeviationProjectionImageFilterTest.cxx | 2 +- .../test/itkSumProjectionImageFilterTest.cxx | 2 +- ...tkShapeKeepNObjectsLabelMapFilterTest1.cxx | 2 +- ...ClosingByReconstructionImageFilterTest.cxx | 4 ++-- .../test/itkFlatStructuringElementTest2.cxx | 4 ++-- .../itkGrayscaleDilateImageFilterTest.cxx | 2 +- .../test/itkGrayscaleErodeImageFilterTest.cxx | 2 +- ...GrayscaleFunctionDilateImageFilterTest.cxx | 2 +- ...kGrayscaleFunctionErodeImageFilterTest.cxx | 2 +- ...caleGeodesicErodeDilateImageFilterTest.cxx | 2 +- ...leMorphologicalClosingImageFilterTest2.cxx | 2 +- ...leMorphologicalOpeningImageFilterTest2.cxx | 2 +- .../itkMapGrayscaleDilateImageFilterTest.cxx | 2 +- .../itkMapGrayscaleErodeImageFilterTest.cxx | 2 +- ...aleMorphologicalClosingImageFilterTest.cxx | 2 +- ...aleMorphologicalOpeningImageFilterTest.cxx | 2 +- .../test/itkMapMaskedRankImageFilterTest.cxx | 2 +- .../test/itkMapRankImageFilterTest.cxx | 2 +- .../test/itkMaskedRankImageFilterTest.cxx | 2 +- ...tkMorphologicalGradientImageFilterTest.cxx | 2 +- ...kMorphologicalGradientImageFilterTest2.cxx | 6 +++--- .../itkObjectMorphologyImageFilterTest.cxx | 8 ++++---- ...OpeningByReconstructionImageFilterTest.cxx | 4 ++-- ...peningByReconstructionImageFilterTest2.cxx | 4 ++-- .../test/itkRankImageFilterTest.cxx | 2 +- ...apedIteratorFromStructuringElementTest.cxx | 2 +- .../test/itkTopHatImageFilterTest.cxx | 2 +- .../itkContourExtractor2DImageFilterTest.cxx | 2 +- ...utomaticTopologyQuadEdgeMeshSourceTest.cxx | 2 +- .../itkBinaryMask3DQuadEdgeMeshSourceTest.cxx | 2 +- .../test/itkBorderQuadEdgeMeshFilterTest.cxx | 2 +- .../test/itkCleanQuadEdgeMeshFilterTest.cxx | 2 +- ...launayConformingQuadEdgeMeshFilterTest.cxx | 2 +- ...aussianCurvatureQuadEdgeMeshFilterTest.cxx | 2 +- ...MaximumCurvatureQuadEdgeMeshFilterTest.cxx | 2 +- ...eteMeanCurvatureQuadEdgeMeshFilterTest.cxx | 2 +- ...MinimumCurvatureQuadEdgeMeshFilterTest.cxx | 2 +- ...dEdgeMeshFilterWithHardConstraintsTest.cxx | 2 +- ...dEdgeMeshFilterWithSoftConstraintsTest.cxx | 2 +- .../test/itkNormalQuadEdgeMeshFilterTest.cxx | 2 +- ...ParameterizationQuadEdgeMeshFilterTest.cxx | 2 +- ...uadricDecimationQuadEdgeMeshFilterTest.cxx | 2 +- ...itkRegularSphereQuadEdgeMeshSourceTest.cxx | 2 +- .../itkSmoothingQuadEdgeMeshFilterTest.cxx | 2 +- ...LengthDecimationQuadEdgeMeshFilterTest.cxx | 2 +- .../test/itkBoxMeanImageFilterTest.cxx | 2 +- .../test/itkBoxSigmaImageFilterTest.cxx | 2 +- .../itkDiscreteGaussianImageFilterTest.cxx | 2 +- ...rsiveGaussianImageFiltersOnTensorsTest.cxx | 2 +- ...eGaussianImageFiltersOnVectorImageTest.cxx | 2 +- ...eGaussianImageFilterOnImageAdaptorTest.cxx | 2 +- ...GaussianImageFilterOnImageOfVectorTest.cxx | 2 +- ...veGaussianImageFilterOnVectorImageTest.cxx | 2 +- .../itkBinaryThresholdImageFilterTest.cxx | 2 +- ...naryThresholdProjectionImageFilterTest.cxx | 2 +- ...KappaSigmaThresholdImageCalculatorTest.cxx | 2 +- ...tkOtsuMultipleThresholdsCalculatorTest.cxx | 2 +- ...kOtsuMultipleThresholdsCalculatorTest2.cxx | 2 +- .../itkThresholdLabelerImageFilterTest.cxx | 2 +- .../IO/BioRad/test/itkBioRadImageIOTest.cxx | 4 ++-- .../include/itkCSVNumericObjectFileWriter.hxx | 2 +- .../CSV/test/itkCSVArray2DFileReaderTest.cxx | 12 +++++------ .../itkCSVArray2DFileReaderWriterTest.cxx | 4 ++-- .../itkCSVNumericObjectFileWriterTest.cxx | 10 +++++----- .../itkDCMTKImageIOMultiFrameImageTest.cxx | 2 +- .../test/itkDCMTKImageIONoPreambleTest.cxx | 2 +- .../test/itkDCMTKImageIOOrthoDirTest.cxx | 4 ++-- .../itkDCMTKImageIOSlopeInterceptTest.cxx | 2 +- Modules/IO/DCMTK/test/itkDCMTKImageIOTest.cxx | 4 ++-- Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx | 2 +- .../DCMTK/test/itkDCMTKMultiFrame4DTest.cxx | 6 +++--- .../IO/DCMTK/test/itkDCMTKRGBImageIOTest.cxx | 4 ++-- .../test/itkDCMTKSeriesReadImageWrite.cxx | 4 ++-- .../itkDCMTKSeriesStreamReadImageWrite.cxx | 4 ++-- .../GDCM/test/itkGDCMImageIONoCrashTest.cxx | 2 +- .../test/itkGDCMImageIONoPreambleTest.cxx | 2 +- .../GDCM/test/itkGDCMImageIOOrthoDirTest.cxx | 4 ++-- Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx | 10 +++++----- Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx | 8 ++++---- .../itkGDCMImageOrientationPatientTest.cxx | 2 +- .../test/itkGDCMImagePositionPatientTest.cxx | 2 +- .../GDCM/test/itkGDCMLegacyMultiFrameTest.cxx | 2 +- .../GDCM/test/itkGDCMLoadImageSpacingTest.cxx | 2 +- .../itkGDCMSeriesStreamReadImageWriteTest.cxx | 4 ++-- Modules/IO/GE/test/itkGEImageIOTest.cxx | 4 ++-- Modules/IO/GIPL/test/itkGiplImageIOTest.cxx | 2 +- .../itkHDF5ImageIOStreamingReadWriteTest.cxx | 4 ++-- Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx | 2 +- .../IO/ImageBase/include/itkIOTestHelper.h | 4 ++-- .../ImageBase/include/itkImageFileReader.hxx | 4 ++-- Modules/IO/ImageBase/test/itk64bitTest.cxx | 2 +- Modules/IO/ImageBase/test/itkIOPluginTest.cxx | 4 ++-- .../test/itkImageFileReaderDimensionsTest.cxx | 14 ++++++------- .../test/itkImageFileReaderStreamingTest.cxx | 2 +- .../test/itkImageFileReaderTest1.cxx | 6 +++--- .../test/itkImageFileWriterPastingTest1.cxx | 2 +- .../test/itkImageFileWriterPastingTest2.cxx | 2 +- .../test/itkImageFileWriterPastingTest3.cxx | 2 +- ...WriterStreamingPastingCompressingTest1.cxx | 2 +- .../test/itkImageFileWriterStreamingTest1.cxx | 2 +- .../test/itkImageFileWriterStreamingTest2.cxx | 18 ++++++++--------- .../ImageBase/test/itkImageFileWriterTest.cxx | 10 +++++----- .../test/itkImageFileWriterTest2.cxx | 2 +- ...eWriterUpdateLargestPossibleRegionTest.cxx | 4 ++-- .../IO/ImageBase/test/itkImageIOBaseTest.cxx | 10 +++++----- .../test/itkImageIODirection2DTest.cxx | 4 ++-- .../test/itkImageIODirection3DTest.cxx | 4 ++-- .../itkImageSeriesReaderDimensionsTest.cxx | 14 ++++++------- .../test/itkImageSeriesReaderSamplingTest.cxx | 2 +- .../test/itkImageSeriesReaderVectorTest.cxx | 4 ++-- .../test/itkImageSeriesWriterTest.cxx | 6 +++--- .../itkLargeImageWriteConvertReadTest.cxx | 4 ++-- .../test/itkLargeImageWriteReadTest.cxx | 4 ++-- .../test/itkMatrixImageWriteReadTest.cxx | 4 ++-- .../test/itkNoiseImageFilterTest.cxx | 2 +- Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx | 2 +- Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx | 4 ++-- .../itkJPEG2000ImageIORegionOfInterest.cxx | 2 +- .../test/itkJPEG2000ImageIOTest01.cxx | 2 +- .../test/itkJPEG2000ImageIOTest02.cxx | 2 +- .../test/itkJPEG2000ImageIOTest03.cxx | 2 +- .../test/itkJPEG2000ImageIOTest04.cxx | 2 +- .../test/itkJPEG2000ImageIOTest05.cxx | 4 ++-- .../test/itkJPEG2000ImageIOTest06.cxx | 2 +- Modules/IO/LSM/test/itkLSMImageIOTest.cxx | 4 ++-- Modules/IO/MINC/test/itkMINCImageIOTest.cxx | 4 ++-- Modules/IO/MINC/test/itkMINCImageIOTest2.cxx | 2 +- Modules/IO/MINC/test/itkMINCImageIOTest4.cxx | 2 +- .../IO/MINC/test/itkMINCImageIOTest_2D.cxx | 2 +- .../IO/MINC/test/itkMINCImageIOTest_4D.cxx | 2 +- .../MINC/test/itkMINCImageIOTest_Labels.cxx | 2 +- Modules/IO/MRC/test/itkMRCImageIOTest.cxx | 4 ++-- .../IO/MeshBase/include/itkMeshFileReader.hxx | 4 ++-- .../MeshBase/include/itkMeshFileTestHelper.h | 6 +++--- .../test/itkMeshFileWriteReadTensorTest.cxx | 4 ++-- .../test/itkLargeMetaImageWriteReadTest.cxx | 4 ++-- Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx | 4 ++-- .../Meta/test/itkMetaImageIOMetaDataTest.cxx | 4 ++-- Modules/IO/Meta/test/itkMetaImageIOTest.cxx | 2 +- .../Meta/test/itkMetaImageStreamingIOTest.cxx | 2 +- .../itkMetaImageStreamingWriterIOTest.cxx | 4 ++-- Modules/IO/Meta/test/testMetaImage.cxx | 6 +++--- Modules/IO/NIFTI/test/itkExtractSlice.cxx | 2 +- Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx | 2 +- Modules/IO/NIFTI/test/itkNiftiImageIOTest.h | 12 +++++------ .../IO/NIFTI/test/itkNiftiImageIOTest11.cxx | 2 +- .../IO/NIFTI/test/itkNiftiImageIOTest3.cxx | 4 ++-- .../IO/NIFTI/test/itkNiftiImageIOTest4.cxx | 4 ++-- .../IO/NIFTI/test/itkNiftiImageIOTest5.cxx | 2 +- .../IO/NIFTI/test/itkNiftiImageIOTest6.cxx | 2 +- .../NIFTI/test/itkNiftiImageIOTestHelper.cxx | 4 ++-- .../IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx | 2 +- .../NRRD/test/itkNrrdComplexImageReadTest.cxx | 2 +- .../test/itkNrrdComplexImageReadWriteTest.cxx | 4 ++-- .../itkNrrdCovariantVectorImageReadTest.cxx | 2 +- ...kNrrdCovariantVectorImageReadWriteTest.cxx | 4 ++-- ...eReadTensorDoubleWriteTensorDoubleTest.cxx | 4 ++-- .../itkNrrdDiffusionTensor3DImageReadTest.cxx | 2 +- ...rrdDiffusionTensor3DImageReadWriteTest.cxx | 4 ++-- Modules/IO/NRRD/test/itkNrrdImageIOTest.h | 6 +++--- .../NRRD/test/itkNrrdImageReadWriteTest.cxx | 4 ++-- Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx | 2 +- .../test/itkNrrdRGBAImageReadWriteTest.cxx | 4 ++-- .../test/itkNrrdRGBImageReadWriteTest.cxx | 4 ++-- .../NRRD/test/itkNrrdVectorImageReadTest.cxx | 2 +- .../test/itkNrrdVectorImageReadWriteTest.cxx | 4 ++-- .../itkPhilipsRECImageIOOrientationTest.cxx | 2 +- .../test/itkPhilipsRECImageIOPrintTest.cxx | 2 +- .../test/itkPhilipsRECImageIOTest.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest.cxx | 6 +++--- Modules/IO/RAW/test/itkRawImageIOTest4.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest5.cxx | 12 +++++------ .../itkReadVesselTubeSpatialObjectTest.cxx | 2 +- .../test/itkReadWriteSpatialObjectTest.cxx | 2 +- .../test/itkStimulateImageIOTest.cxx | 2 +- .../test/itkStimulateImageIOTest2.cxx | 2 +- Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx | 2 +- .../test/itkTransformFileReaderTest.cxx | 4 ++-- .../test/itkTransformFileWriterTest.cxx | 4 ++-- .../test/itkIOTransformHDF5Test.cxx | 12 +++++------ .../src/itkTxtTransformIO.cxx | 2 +- .../test/itkIOTransformTxtTest.cxx | 10 +++++----- .../test/itkIOTransformMINCTest.cxx | 20 +++++++++---------- .../test/itkMINCTransformAdapterTest.cxx | 4 ++-- .../test/itkIOTransformMatlabTest.cxx | 12 +++++------ Modules/IO/VTK/test/itkVTKImageIO2Test.cxx | 4 ++-- .../IO/VTK/test/itkVTKImageIOFileReadTest.cxx | 2 +- Modules/IO/VTK/test/itkVTKImageIOTest2.cxx | 2 +- .../test/itkBioRadImageIOTest.cxx | 4 ++-- .../test/itkImageToHistogramFilterTest4.cxx | 2 +- .../itkMaskedImageToHistogramFilterTest1.cxx | 4 ++-- .../test/itkMaximumRatioDecisionRuleTest.cxx | 6 +++--- ...nkImagePreserveObjectPhysicalLocations.cxx | 2 +- .../test/itkAreaClosingImageFilterTest.cxx | 2 +- .../test/itkAreaOpeningImageFilterTest.cxx | 2 +- .../itkConformalFlatteningMeshFilterTest.cxx | 6 +++--- ...formalFlatteningQuadEdgeMeshFilterTest.cxx | 6 +++--- ...erReconstructionImageToImageFilterTest.cxx | 2 +- .../itkFastApproximateRankImageFilterTest.cxx | 2 +- .../test/itkLabelGeometryImageFilterTest.cxx | 8 ++++---- ...ormationImageToImageMetricThreadsTest1.cxx | 4 ++-- ...anAndVeseDenseLevelSetImageFilterTest2.cxx | 2 +- ...anAndVeseDenseLevelSetImageFilterTest4.cxx | 2 +- ...nAndVeseSparseLevelSetImageFilterTest2.cxx | 2 +- ...eFunctionConditionalConstIteratorTest1.cxx | 2 +- ...eFunctionConditionalConstIteratorTest2.cxx | 2 +- ...eFunctionConditionalConstIteratorTest3.cxx | 2 +- .../Review/test/itkVoxBoCUBImageIOTest.cxx | 2 +- .../Numerics/FEM/test/itkFEMPArrayTest.cxx | 6 +++--- .../FEM/test/itkFEMSolverHyperbolicTest.cxx | 2 +- .../test/itkNarrowBandImageFilterBaseTest.cxx | 2 +- .../test/itkAmoebaOptimizerTest.cxx | 8 ++++---- .../itkConjugateGradientOptimizerTest.cxx | 2 +- .../test/itkExhaustiveOptimizerTest.cxx | 2 +- .../Optimizers/test/itkFRPROptimizerTest.cxx | 4 ++-- .../test/itkGradientDescentOptimizerTest.cxx | 2 +- ...zationBiasedParticleSwarmOptimizerTest.cxx | 6 +++--- .../test/itkLBFGSBOptimizerTest.cxx | 2 +- .../Optimizers/test/itkLBFGSOptimizerTest.cxx | 2 +- .../itkLevenbergMarquardtOptimizerTest.cxx | 4 ++-- ...itkOnePlusOneEvolutionaryOptimizerTest.cxx | 2 +- .../test/itkParticleSwarmOptimizerTest.cxx | 6 +++--- .../test/itkPowellOptimizerTest.cxx | 2 +- ...egularStepGradientDescentOptimizerTest.cxx | 8 ++++---- .../Optimizers/test/itkSPSAOptimizerTest.cxx | 4 ++-- ...itkVersorRigid3DTransformOptimizerTest.cxx | 2 +- .../test/itkVersorTransformOptimizerTest.cxx | 2 +- .../test/itkAmoebaOptimizerv4Test.cxx | 6 +++--- ...radientDescentRegistrationOnVectorTest.cxx | 2 +- ...oScaledGradientDescentRegistrationTest.cxx | 2 +- ...ugateGradientLineSearchOptimizerv4Test.cxx | 4 ++-- .../test/itkExhaustiveOptimizerv4Test.cxx | 2 +- ...adientDescentLineSearchOptimizerv4Test.cxx | 4 ++-- .../itkGradientDescentOptimizerv4Test.cxx | 4 ++-- .../itkGradientDescentOptimizerv4Test2.cxx | 2 +- .../test/itkLBFGS2Optimizerv4Test.cxx | 4 ++-- .../test/itkLBFGSBOptimizerv4Test.cxx | 6 +++--- .../test/itkLBFGSOptimizerv4Test.cxx | 6 +++--- .../test/itkMultiGradientOptimizerv4Test.cxx | 2 +- .../test/itkMultiStartOptimizerv4Test.cxx | 2 +- ...kOnePlusOneEvolutionaryOptimizerv4Test.cxx | 2 +- .../test/itkPowellOptimizerv4Test.cxx | 2 +- .../test/itkQuasiNewtonOptimizerv4Test.cxx | 2 +- ...ularStepGradientDescentOptimizerv4Test.cxx | 2 +- .../test/itkCovarianceSampleFilterTest.cxx | 8 ++++---- .../test/itkCovarianceSampleFilterTest2.cxx | 6 +++--- .../test/itkCovarianceSampleFilterTest3.cxx | 4 ++-- .../Statistics/test/itkDistanceMetricTest.cxx | 6 +++--- .../test/itkDistanceMetricTest2.cxx | 4 ++-- ...stanceToCentroidMembershipFunctionTest.cxx | 2 +- .../test/itkEuclideanDistanceMetricTest.cxx | 2 +- .../itkEuclideanSquareDistanceMetricTest.cxx | 2 +- .../itkGaussianMembershipFunctionTest.cxx | 2 +- ...ianRandomSpatialNeighborSubsamplerTest.cxx | 2 +- .../Statistics/test/itkHistogramTest.cxx | 4 ++-- ...tkHistogramToTextureFeaturesFilterTest.cxx | 4 ++-- .../test/itkImageToHistogramFilterTest2.cxx | 6 +++--- .../test/itkImageToHistogramFilterTest3.cxx | 2 +- .../test/itkImageToListSampleAdaptorTest.cxx | 10 +++++----- .../test/itkImageToListSampleFilterTest.cxx | 4 ++-- .../test/itkImageToListSampleFilterTest2.cxx | 2 +- .../test/itkImageToListSampleFilterTest3.cxx | 2 +- ...ointDomainImageToListSampleAdaptorTest.cxx | 10 +++++----- .../Statistics/test/itkListSampleTest.cxx | 6 +++--- .../test/itkMahalanobisDistanceMetricTest.cxx | 4 ++-- .../test/itkManhattanDistanceMetricTest.cxx | 2 +- .../test/itkMeanSampleFilterTest.cxx | 4 ++-- .../test/itkMeanSampleFilterTest2.cxx | 2 +- .../test/itkMeanSampleFilterTest3.cxx | 2 +- .../test/itkMembershipFunctionBaseTest.cxx | 2 +- .../itkPointSetToListSampleAdaptorTest.cxx | 10 +++++----- .../Statistics/test/itkSampleTest.cxx | 2 +- .../Statistics/test/itkSampleTest2.cxx | 4 ++-- .../Statistics/test/itkSampleTest3.cxx | 4 ++-- .../Statistics/test/itkSampleTest4.cxx | 4 ++-- .../test/itkSampleToHistogramFilterTest.cxx | 4 ++-- .../test/itkSampleToHistogramFilterTest2.cxx | 8 ++++---- .../test/itkSampleToHistogramFilterTest3.cxx | 8 ++++---- .../test/itkSampleToHistogramFilterTest4.cxx | 2 +- .../test/itkSampleToHistogramFilterTest5.cxx | 2 +- .../test/itkSampleToHistogramFilterTest6.cxx | 4 ++-- .../test/itkSampleToHistogramFilterTest7.cxx | 8 ++++---- ...mageToCooccurrenceListSampleFilterTest.cxx | 2 +- ...larImageToCooccurrenceMatrixFilterTest.cxx | 6 +++--- ...arImageToCooccurrenceMatrixFilterTest2.cxx | 2 +- ...alarImageToRunLengthFeaturesFilterTest.cxx | 6 +++--- ...ScalarImageToRunLengthMatrixFilterTest.cxx | 2 +- ...ScalarImageToTextureFeaturesFilterTest.cxx | 6 +++--- ...dDeviationPerComponentSampleFilterTest.cxx | 8 ++++---- .../Statistics/test/itkSubsampleTest.cxx | 16 +++++++-------- .../Statistics/test/itkSubsampleTest3.cxx | 4 ++-- ...ormRandomSpatialNeighborSubsamplerTest.cxx | 2 +- .../itkWeightedCovarianceSampleFilterTest.cxx | 12 +++++------ ...itkWeightedCovarianceSampleFilterTest2.cxx | 12 +++++------ .../test/itkWeightedMeanSampleFilterTest.cxx | 10 +++++----- .../DeformableRegistration10.cxx | 2 +- .../DeformableRegistration12.cxx | 10 +++++----- .../DeformableRegistration4.cxx | 10 +++++----- .../DeformableRegistration6.cxx | 12 +++++------ .../DeformableRegistration7.cxx | 10 +++++----- .../DeformableRegistration8.cxx | 10 +++++----- .../DeformationFieldJacobian.cxx | 2 +- .../RegistrationITKv3/ImageRegistration1.cxx | 2 +- .../RegistrationITKv3/ImageRegistration11.cxx | 2 +- .../RegistrationITKv3/ImageRegistration12.cxx | 4 ++-- .../RegistrationITKv3/ImageRegistration13.cxx | 2 +- .../RegistrationITKv3/ImageRegistration14.cxx | 2 +- .../RegistrationITKv3/ImageRegistration3.cxx | 2 +- .../RegistrationITKv3/ImageRegistration4.cxx | 2 +- .../RegistrationITKv3/ImageRegistration5.cxx | 6 +++--- .../RegistrationITKv3/ImageRegistration6.cxx | 4 ++-- .../RegistrationITKv3/ImageRegistration7.cxx | 2 +- .../RegistrationITKv3/ImageRegistration8.cxx | 2 +- .../RegistrationITKv3/ImageRegistration9.cxx | 2 +- .../MeanSquaresImageMetric1.cxx | 4 ++-- .../MultiResImageRegistration1.cxx | 2 +- .../test/itkBlockMatchingImageFilterTest.cxx | 8 ++++---- ...CompareHistogramImageToImageMetricTest.cxx | 2 +- ...ficientHistogramImageToImageMetricTest.cxx | 2 +- ...adientDifferenceImageToImageMetricTest.cxx | 2 +- .../itkHistogramImageToImageMetricTest.cxx | 6 +++--- .../test/itkImageRegistrationMethodTest.cxx | 2 +- .../test/itkImageRegistrationMethodTest_1.cxx | 2 +- .../itkImageRegistrationMethodTest_10.cxx | 2 +- .../itkImageRegistrationMethodTest_12.cxx | 2 +- .../itkImageRegistrationMethodTest_13.cxx | 6 +++--- .../itkImageRegistrationMethodTest_14.cxx | 6 +++--- .../itkImageRegistrationMethodTest_15.cxx | 2 +- .../itkImageRegistrationMethodTest_16.cxx | 2 +- .../itkImageRegistrationMethodTest_17.cxx | 2 +- .../test/itkImageRegistrationMethodTest_2.cxx | 2 +- .../test/itkImageRegistrationMethodTest_3.cxx | 2 +- .../test/itkImageRegistrationMethodTest_4.cxx | 2 +- .../test/itkImageRegistrationMethodTest_5.cxx | 2 +- .../test/itkImageRegistrationMethodTest_6.cxx | 2 +- .../test/itkImageRegistrationMethodTest_7.cxx | 2 +- .../test/itkImageRegistrationMethodTest_8.cxx | 2 +- .../test/itkImageRegistrationMethodTest_9.cxx | 4 ++-- ...CompareHistogramImageToImageMetricTest.cxx | 2 +- ...MatchCardinalityImageToImageMetricTest.cxx | 4 ++-- ...iprocalSquareDifferenceImageMetricTest.cxx | 6 +++--- ...areDifferencePointSetToImageMetricTest.cxx | 6 +++--- ...SquaresHistogramImageToImageMetricTest.cxx | 2 +- .../test/itkMeanSquaresImageMetricTest.cxx | 8 ++++---- ...tkMeanSquaresPointSetToImageMetricTest.cxx | 6 +++--- ...iResolutionImageRegistrationMethodTest.cxx | 2 +- ...esolutionImageRegistrationMethodTest_1.cxx | 10 +++++----- ...esolutionImageRegistrationMethodTest_2.cxx | 6 +++--- ...rmationHistogramImageToImageMetricTest.cxx | 2 +- .../test/itkMutualInformationMetricTest.cxx | 4 ++-- ...tkNormalizedCorrelationImageMetricTest.cxx | 6 +++--- ...edCorrelationPointSetToImageMetricTest.cxx | 6 +++--- ...rmationHistogramImageToImageMetricTest.cxx | 2 +- ...tToSpatialObjectDemonsRegistrationTest.cxx | 2 +- .../itkGPUDemonsRegistrationFilterTest2.cxx | 6 +++--- ...oodCorrelationImageToImageMetricv4Test.cxx | 12 +++++------ ...orrelationImageToImageRegistrationTest.cxx | 4 ++-- ...itkCorrelationImageToImageMetricv4Test.cxx | 8 ++++---- ...nsImageToImageMetricv4RegistrationTest.cxx | 2 +- .../itkDemonsImageToImageMetricv4Test.cxx | 16 +++++++-------- .../test/itkImageToImageMetricv4Test.cxx | 8 ++++---- ...ualInformationImageToImageMetricv4Test.cxx | 4 ++-- ...nformationImageToImageRegistrationTest.cxx | 2 +- ...onImageToImageMetricv4RegistrationTest.cxx | 2 +- ...quaresImageToImageMetricv4OnVectorTest.cxx | 8 ++++---- ...uaresImageToImageMetricv4OnVectorTest2.cxx | 4 ++-- ...esImageToImageMetricv4RegistrationTest.cxx | 2 +- ...sImageToImageMetricv4RegistrationTest2.cxx | 2 +- ...itkMeanSquaresImageToImageMetricv4Test.cxx | 8 ++++---- ...eToImageMetricv4VectorRegistrationTest.cxx | 2 +- .../itkObjectToObjectMultiMetricv4Test.cxx | 4 ++-- .../itkCurvatureRegistrationFilterTest.cxx | 6 +++--- .../test/itkDemonsRegistrationFilterTest.cxx | 6 +++--- ...feomorphicDemonsRegistrationFilterTest.cxx | 6 +++--- ...eomorphicDemonsRegistrationFilterTest2.cxx | 4 ++-- ...tricForcesDemonsRegistrationFilterTest.cxx | 6 +++--- ...tkLevelSetMotionRegistrationFilterTest.cxx | 6 +++--- ...esolutionPDEDeformableRegistrationTest.cxx | 8 ++++---- ...tricForcesDemonsRegistrationFilterTest.cxx | 6 +++--- ...SplineExponentialImageRegistrationTest.cxx | 4 ++-- .../test/itkBSplineImageRegistrationTest.cxx | 4 ++-- .../itkBSplineSyNImageRegistrationTest.cxx | 4 ++-- .../itkBSplineSyNPointSetRegistrationTest.cxx | 2 +- .../itkExponentialImageRegistrationTest.cxx | 4 ++-- .../test/itkImageRegistrationSamplingTest.cxx | 2 +- ...QuasiNewtonOptimizerv4RegistrationTest.cxx | 4 ++-- .../test/itkSimpleImageRegistrationTest.cxx | 2 +- .../test/itkSimpleImageRegistrationTest2.cxx | 2 +- .../test/itkSimpleImageRegistrationTest3.cxx | 4 ++-- .../test/itkSimpleImageRegistrationTest4.cxx | 2 +- ...ageRegistrationTestWithMaskAndSampling.cxx | 2 +- .../itkSimplePointSetRegistrationTest.cxx | 2 +- .../test/itkSyNImageRegistrationTest.cxx | 4 ++-- .../test/itkSyNPointSetRegistrationTest.cxx | 2 +- ...lineVelocityFieldImageRegistrationTest.cxx | 4 ++-- ...eVelocityFieldPointSetRegistrationTest.cxx | 2 +- ...yingVelocityFieldImageRegistrationTest.cxx | 4 ++-- .../test/itkImageClassifierFilterTest.cxx | 4 ++-- .../test/itkSampleClassifierFilterTest1.cxx | 8 ++++---- .../test/itkSampleClassifierFilterTest2.cxx | 2 +- .../test/itkSampleClassifierFilterTest3.cxx | 4 ++-- .../test/itkSampleClassifierFilterTest4.cxx | 2 +- .../test/itkSampleClassifierFilterTest5.cxx | 2 +- .../test/itkSampleClassifierFilterTest6.cxx | 2 +- .../test/itkSampleClassifierFilterTest7.cxx | 2 +- .../itkScalarImageKmeansImageFilter3DTest.cxx | 4 ++-- .../itkScalarImageKmeansImageFilterTest.cxx | 6 +++--- ...ctedComponentImageFilterBackgroundTest.cxx | 2 +- .../itkConnectedComponentImageFilterTest.cxx | 4 ++-- ...tkConnectedComponentImageFilterTestRGB.cxx | 4 ++-- ...ComponentImageFilterTooManyObjectsTest.cxx | 2 +- ...kHardConnectedComponentImageFilterTest.cxx | 2 +- ...kMaskConnectedComponentImageFilterTest.cxx | 4 ++-- .../itkRelabelComponentImageFilterTest.cxx | 4 ++-- ...calarConnectedComponentImageFilterTest.cxx | 4 ++-- ...imumConnectedComponentsImageFilterTest.cxx | 6 +++--- ...ectorConnectedComponentImageFilterTest.cxx | 2 +- .../test/itkRegionGrow2DTest.cxx | 4 ++-- ...naryMaskToNarrowBandPointSetFilterTest.cxx | 2 +- ...nnySegmentationLevelSetImageFilterTest.cxx | 2 +- .../itkCollidingFrontsImageFilterTest.cxx | 4 ++-- ...ntourShapePriorLevelSetImageFilterTest.cxx | 4 ++-- ...ourShapePriorLevelSetImageFilterTest_2.cxx | 2 +- ...ImplicitManifoldNormalVectorFilterTest.cxx | 2 +- ...ianSegmentationLevelSetImageFilterTest.cxx | 2 +- .../itkLevelSetNeighborhoodExtractorTest.cxx | 4 ++-- ...oldSegmentationLevelSetImageFilterTest.cxx | 2 +- ...llelSparseFieldLevelSetImageFilterTest.cxx | 2 +- ...kShapeDetectionLevelSetImageFilterTest.cxx | 2 +- .../test/itkShapePriorMAPCostFunctionTest.cxx | 6 +++--- ...ePriorSegmentationLevelSetFunctionTest.cxx | 2 +- ...oldSegmentationLevelSetImageFilterTest.cxx | 2 +- ...oldSegmentationLevelSetImageFilterTest.cxx | 2 +- ...mageToMalcolmSparseLevelSetAdaptorTest.cxx | 4 ++-- ...aryImageToShiSparseLevelSetAdaptorTest.cxx | 4 ++-- ...ageToWhitakerSparseLevelSetAdaptorTest.cxx | 6 +++--- ...itkMultiLevelSetDenseImageSubset2DTest.cxx | 2 +- .../test/itkMultiLevelSetEvolutionTest.cxx | 2 +- ...kMultiLevelSetMalcolmImageSubset2DTest.cxx | 2 +- .../itkMultiLevelSetShiImageSubset2DTest.cxx | 2 +- ...MultiLevelSetWhitakerImageSubset2DTest.cxx | 2 +- ...ingleLevelSetDenseAdvectionImage2DTest.cxx | 4 ++-- .../itkSingleLevelSetDenseImage2DTest.cxx | 4 ++-- .../itkSingleLevelSetMalcolmImage2DTest.cxx | 4 ++-- .../test/itkSingleLevelSetShiImage2DTest.cxx | 4 ++-- .../itkSingleLevelSetWhitakerImage2DTest.cxx | 4 ++-- ...velSetWhitakerImage2DWithCurvatureTest.cxx | 2 +- ...velSetWhitakerImage2DWithLaplacianTest.cxx | 2 +- ...lSetWhitakerImage2DWithPropagationTest.cxx | 2 +- .../test/itkTwoLevelSetDenseImage2DTest.cxx | 2 +- .../test/itkTwoLevelSetMalcolmImage2DTest.cxx | 4 ++-- .../test/itkTwoLevelSetShiImage2DTest.cxx | 4 ++-- .../itkTwoLevelSetWhitakerImage2DTest.cxx | 4 ++-- .../itkConfidenceConnectedImageFilterTest.cxx | 2 +- .../itkIsolatedConnectedImageFilterTest.cxx | 4 ++-- ...tkNeighborhoodConnectedImageFilterTest.cxx | 2 +- ...ctorConfidenceConnectedImageFilterTest.cxx | 2 +- .../itkPCAShapeSignedDistanceFunctionTest.cxx | 2 +- .../Voronoi/test/itkVoronoiDiagram2DTest.cxx | 2 +- .../itkVoronoiPartitioningImageFilterTest.cxx | 2 +- .../test/itkOpenCVImageBridgeRGBTest.cxx | 2 +- .../test/itkOpenCVVideoIOTest.cxx | 4 ++-- .../BridgeVXL/test/itkVXLVideoIOTest.cxx | 4 ++-- 831 files changed, 1537 insertions(+), 1536 deletions(-) diff --git a/Examples/DataRepresentation/Image/Image5.cxx b/Examples/DataRepresentation/Image/Image5.cxx index 41d36fd238e..7f32e81001c 100644 --- a/Examples/DataRepresentation/Image/Image5.cxx +++ b/Examples/DataRepresentation/Image/Image5.cxx @@ -246,7 +246,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught !" << std::endl; std::cerr << exp << std::endl; diff --git a/Examples/DataRepresentation/Image/ImageAdaptor2.cxx b/Examples/DataRepresentation/Image/ImageAdaptor2.cxx index f9bea56706d..9e22e5a02bf 100644 --- a/Examples/DataRepresentation/Image/ImageAdaptor2.cxx +++ b/Examples/DataRepresentation/Image/ImageAdaptor2.cxx @@ -188,7 +188,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught " << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx b/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx index 167ea4de560..192eab3c075 100644 --- a/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx +++ b/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx @@ -60,7 +60,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx b/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx index f4f27870937..90dd0b799e1 100644 --- a/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx +++ b/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx @@ -73,7 +73,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Problem reading the input image " << std::endl; std::cout << excp << std::endl; diff --git a/Examples/Filtering/AntiAliasBinaryImageFilter.cxx b/Examples/Filtering/AntiAliasBinaryImageFilter.cxx index 064a23d225a..12cef7db340 100644 --- a/Examples/Filtering/AntiAliasBinaryImageFilter.cxx +++ b/Examples/Filtering/AntiAliasBinaryImageFilter.cxx @@ -153,7 +153,7 @@ main(int argc, char * argv[]) { realWriter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -169,7 +169,7 @@ main(int argc, char * argv[]) { rescaledWriter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx b/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx index bc226be7ca3..f6b6e54755b 100644 --- a/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx +++ b/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx @@ -175,7 +175,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/CompositeFilterExample.cxx b/Examples/Filtering/CompositeFilterExample.cxx index 09cad0ce4af..005497db4db 100644 --- a/Examples/Filtering/CompositeFilterExample.cxx +++ b/Examples/Filtering/CompositeFilterExample.cxx @@ -286,7 +286,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Error: " << e << std::endl; } diff --git a/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx b/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx index 831d9f5b624..62981dd8846 100644 --- a/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx +++ b/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx @@ -256,7 +256,7 @@ main(int argc, char * argv[]) { offsetWriter->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught !" << std::endl; std::cerr << exp << std::endl; diff --git a/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx b/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx index 40120018656..b1af6c4c3c2 100644 --- a/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx +++ b/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx @@ -97,7 +97,7 @@ main(int argc, char * argv[]) reader->Update(); img = reader->GetOutput(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx index ced9d6f85ff..4d7e2b1f3d1 100644 --- a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx +++ b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx @@ -331,7 +331,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -439,7 +439,7 @@ main(int argc, char * argv[]) std::cout << "Writing image: " << filename << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; @@ -724,7 +724,7 @@ main(int argc, char * argv[]) std::cout << "Writing image: " << output_name << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Filtering/FFTImageFilter.cxx b/Examples/Filtering/FFTImageFilter.cxx index 6a8ff08b646..ba7beb187fc 100644 --- a/Examples/Filtering/FFTImageFilter.cxx +++ b/Examples/Filtering/FFTImageFilter.cxx @@ -132,7 +132,7 @@ main(int argc, char * argv[]) { fftFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error: " << std::endl; std::cerr << excp << std::endl; @@ -173,7 +173,7 @@ main(int argc, char * argv[]) { complexWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error: " << std::endl; std::cerr << excp << std::endl; @@ -247,7 +247,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the real image: " << std::endl; std::cerr << excp << std::endl; @@ -291,7 +291,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the imaginary image: " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx b/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx index 247fd4c4982..a216aedae9a 100644 --- a/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx +++ b/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx @@ -210,7 +210,7 @@ main(int argc, char * argv[]) { fftInverseFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error: " << std::endl; std::cerr << excp << std::endl; @@ -239,7 +239,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the real image: " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx b/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx index 9f1625d59c2..b4eadff57de 100644 --- a/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx +++ b/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx @@ -70,7 +70,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/Filtering/LaplacianImageFilter.cxx b/Examples/Filtering/LaplacianImageFilter.cxx index 6dd039781cd..e1b3389791b 100644 --- a/Examples/Filtering/LaplacianImageFilter.cxx +++ b/Examples/Filtering/LaplacianImageFilter.cxx @@ -91,7 +91,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx index 263acaee2e2..4728a1fbeab 100644 --- a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx +++ b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx @@ -303,7 +303,7 @@ main(int argc, char * argv[]) { addFilter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx index 03e24e917f4..2f0a8a4ea9a 100644 --- a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx +++ b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx @@ -181,7 +181,7 @@ main(int argc, char * argv[]) { laplacian->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/LaplacianSharpeningImageFilter.cxx b/Examples/Filtering/LaplacianSharpeningImageFilter.cxx index 5ccfc4c2e15..434813f024e 100644 --- a/Examples/Filtering/LaplacianSharpeningImageFilter.cxx +++ b/Examples/Filtering/LaplacianSharpeningImageFilter.cxx @@ -74,7 +74,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/MorphologicalImageEnhancement.cxx b/Examples/Filtering/MorphologicalImageEnhancement.cxx index 34ce06dffad..472a9435adc 100644 --- a/Examples/Filtering/MorphologicalImageEnhancement.cxx +++ b/Examples/Filtering/MorphologicalImageEnhancement.cxx @@ -108,7 +108,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Problems reading input image" << std::endl; std::cerr << "ExceptionObject caught !" << std::endl; @@ -149,7 +149,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx b/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx index d438260bd7e..43adf5dc8c9 100644 --- a/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx +++ b/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx @@ -154,7 +154,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading image" << excp << std::endl; } @@ -164,7 +164,7 @@ main(int argc, char * argv[]) { calculator->Compute(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } @@ -223,7 +223,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } @@ -251,7 +251,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } diff --git a/Examples/Filtering/OtsuThresholdImageFilter.cxx b/Examples/Filtering/OtsuThresholdImageFilter.cxx index 978f6ac2940..568e9cf164c 100644 --- a/Examples/Filtering/OtsuThresholdImageFilter.cxx +++ b/Examples/Filtering/OtsuThresholdImageFilter.cxx @@ -184,7 +184,7 @@ main(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } @@ -235,7 +235,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } diff --git a/Examples/Filtering/RGBToGrayscale.cxx b/Examples/Filtering/RGBToGrayscale.cxx index 51b6f1794f6..233fc98be08 100644 --- a/Examples/Filtering/RGBToGrayscale.cxx +++ b/Examples/Filtering/RGBToGrayscale.cxx @@ -89,7 +89,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception Thrown" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter3.cxx b/Examples/Filtering/ResampleImageFilter3.cxx index 63e63dc00de..901237ff3d3 100644 --- a/Examples/Filtering/ResampleImageFilter3.cxx +++ b/Examples/Filtering/ResampleImageFilter3.cxx @@ -279,7 +279,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter4.cxx b/Examples/Filtering/ResampleImageFilter4.cxx index 80c0150ab7e..3a33f1dfdec 100644 --- a/Examples/Filtering/ResampleImageFilter4.cxx +++ b/Examples/Filtering/ResampleImageFilter4.cxx @@ -222,7 +222,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter5.cxx b/Examples/Filtering/ResampleImageFilter5.cxx index 6b84bdd47f3..2877b33d671 100644 --- a/Examples/Filtering/ResampleImageFilter5.cxx +++ b/Examples/Filtering/ResampleImageFilter5.cxx @@ -224,7 +224,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter6.cxx b/Examples/Filtering/ResampleImageFilter6.cxx index 0af7d271bfb..e1b6d5a40b4 100644 --- a/Examples/Filtering/ResampleImageFilter6.cxx +++ b/Examples/Filtering/ResampleImageFilter6.cxx @@ -114,7 +114,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter7.cxx b/Examples/Filtering/ResampleImageFilter7.cxx index 83a1af59bd8..1bb80514722 100644 --- a/Examples/Filtering/ResampleImageFilter7.cxx +++ b/Examples/Filtering/ResampleImageFilter7.cxx @@ -172,7 +172,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter8.cxx b/Examples/Filtering/ResampleImageFilter8.cxx index 75bed64d671..8eee5ee51eb 100644 --- a/Examples/Filtering/ResampleImageFilter8.cxx +++ b/Examples/Filtering/ResampleImageFilter8.cxx @@ -208,7 +208,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/ResampleImageFilter9.cxx b/Examples/Filtering/ResampleImageFilter9.cxx index 2947c9aa8f3..bd4d9594de5 100644 --- a/Examples/Filtering/ResampleImageFilter9.cxx +++ b/Examples/Filtering/ResampleImageFilter9.cxx @@ -145,7 +145,7 @@ main(int argc, char * argv[]) { writerNearest->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -155,7 +155,7 @@ main(int argc, char * argv[]) { writerLinear->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx b/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx index 31135bb1e4a..30f373c8fde 100644 --- a/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx +++ b/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx @@ -201,7 +201,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught!" << std::endl; std::cerr << excep << std::endl; @@ -482,7 +482,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx b/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx index 0d196e45c89..20f0e9ccbf5 100644 --- a/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx +++ b/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx @@ -111,7 +111,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem reading the input file" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx b/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx index ebaf6a2b5ea..c0f71021bf1 100644 --- a/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx +++ b/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx @@ -133,7 +133,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught !" << std::endl; std::cerr << exp << std::endl; @@ -156,7 +156,7 @@ main(int argc, char * argv[]) { voronoiWriter->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught !" << std::endl; std::cerr << exp << std::endl; @@ -182,7 +182,7 @@ main(int argc, char * argv[]) { offsetWriter->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught !" << std::endl; std::cerr << exp << std::endl; diff --git a/Examples/Filtering/SpatialObjectToImage1.cxx b/Examples/Filtering/SpatialObjectToImage1.cxx index ad94f210a64..5f0c3fb37f0 100644 --- a/Examples/Filtering/SpatialObjectToImage1.cxx +++ b/Examples/Filtering/SpatialObjectToImage1.cxx @@ -347,7 +347,7 @@ main(int argc, char * argv[]) imageFilter->Update(); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/Filtering/SpatialObjectToImage2.cxx b/Examples/Filtering/SpatialObjectToImage2.cxx index dff6755aa20..17aed4093d9 100644 --- a/Examples/Filtering/SpatialObjectToImage2.cxx +++ b/Examples/Filtering/SpatialObjectToImage2.cxx @@ -302,7 +302,7 @@ main(int argc, char * argv[]) imageFilter->Update(); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/Filtering/SpatialObjectToImage3.cxx b/Examples/Filtering/SpatialObjectToImage3.cxx index bc641283aba..4fdb7bcdac5 100644 --- a/Examples/Filtering/SpatialObjectToImage3.cxx +++ b/Examples/Filtering/SpatialObjectToImage3.cxx @@ -208,7 +208,7 @@ main(int argc, char * argv[]) imageFilter->Update(); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/Filtering/SubsampleVolume.cxx b/Examples/Filtering/SubsampleVolume.cxx index 37e73bf19a9..1bbab916fb8 100644 --- a/Examples/Filtering/SubsampleVolume.cxx +++ b/Examples/Filtering/SubsampleVolume.cxx @@ -110,7 +110,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; @@ -346,7 +346,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Filtering/SurfaceExtraction.cxx b/Examples/Filtering/SurfaceExtraction.cxx index 33559a2f5e2..060e091c149 100644 --- a/Examples/Filtering/SurfaceExtraction.cxx +++ b/Examples/Filtering/SurfaceExtraction.cxx @@ -107,7 +107,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << exp << std::endl; @@ -194,7 +194,7 @@ main(int argc, char * argv[]) { meshSource->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception thrown during Update() " << std::endl; std::cerr << exp << std::endl; diff --git a/Examples/Filtering/VectorIndexSelection.cxx b/Examples/Filtering/VectorIndexSelection.cxx index 20943a9bd02..a035fc8b66a 100644 --- a/Examples/Filtering/VectorIndexSelection.cxx +++ b/Examples/Filtering/VectorIndexSelection.cxx @@ -111,7 +111,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/Filtering/WarpImageFilter1.cxx b/Examples/Filtering/WarpImageFilter1.cxx index ce9dd6e1483..65e313c94ee 100644 --- a/Examples/Filtering/WarpImageFilter1.cxx +++ b/Examples/Filtering/WarpImageFilter1.cxx @@ -153,7 +153,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx b/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx index 95091526990..b7f5e7721f8 100644 --- a/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx +++ b/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx @@ -138,7 +138,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Examples/IO/ComplexImageReadWrite.cxx b/Examples/IO/ComplexImageReadWrite.cxx index 7ed226f6c21..4c0226a85ad 100644 --- a/Examples/IO/ComplexImageReadWrite.cxx +++ b/Examples/IO/ComplexImageReadWrite.cxx @@ -126,7 +126,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/CovariantVectorImageExtractComponent.cxx b/Examples/IO/CovariantVectorImageExtractComponent.cxx index 55226d543a4..efb7442da37 100644 --- a/Examples/IO/CovariantVectorImageExtractComponent.cxx +++ b/Examples/IO/CovariantVectorImageExtractComponent.cxx @@ -249,7 +249,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/CovariantVectorImageRead.cxx b/Examples/IO/CovariantVectorImageRead.cxx index ef4e48d9520..6498a0fba58 100644 --- a/Examples/IO/CovariantVectorImageRead.cxx +++ b/Examples/IO/CovariantVectorImageRead.cxx @@ -229,7 +229,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/CovariantVectorImageWrite.cxx b/Examples/IO/CovariantVectorImageWrite.cxx index 72294fa7833..49fc1ca45cc 100644 --- a/Examples/IO/CovariantVectorImageWrite.cxx +++ b/Examples/IO/CovariantVectorImageWrite.cxx @@ -203,7 +203,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/DicomImageReadChangeHeaderWrite.cxx b/Examples/IO/DicomImageReadChangeHeaderWrite.cxx index 4c3c99ded05..ddf4a283455 100644 --- a/Examples/IO/DicomImageReadChangeHeaderWrite.cxx +++ b/Examples/IO/DicomImageReadChangeHeaderWrite.cxx @@ -123,7 +123,7 @@ main(int argc, char * argv[]) reader->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e.GetDescription() << std::endl; @@ -201,7 +201,7 @@ main(int argc, char * argv[]) writer1->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e.GetDescription() << std::endl; diff --git a/Examples/IO/DicomImageReadPrintTags.cxx b/Examples/IO/DicomImageReadPrintTags.cxx index b02b070f87a..24c4b349617 100644 --- a/Examples/IO/DicomImageReadPrintTags.cxx +++ b/Examples/IO/DicomImageReadPrintTags.cxx @@ -140,7 +140,7 @@ main(int argc, char * argv[]) reader->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Examples/IO/DicomImageReadWrite.cxx b/Examples/IO/DicomImageReadWrite.cxx index 5aa0b7c4f0d..e99905b51fc 100644 --- a/Examples/IO/DicomImageReadWrite.cxx +++ b/Examples/IO/DicomImageReadWrite.cxx @@ -112,7 +112,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -175,7 +175,7 @@ main(int argc, char * argv[]) { writer1->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; @@ -239,7 +239,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; @@ -294,7 +294,7 @@ main(int argc, char * argv[]) { writer3->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Examples/IO/DicomPrintPatientInformation.cxx b/Examples/IO/DicomPrintPatientInformation.cxx index 702d553bd93..664ab2ce2b3 100644 --- a/Examples/IO/DicomPrintPatientInformation.cxx +++ b/Examples/IO/DicomPrintPatientInformation.cxx @@ -66,7 +66,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx b/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx index d05f39f58e6..2eeb813a351 100644 --- a/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx +++ b/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx @@ -111,7 +111,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -142,13 +142,13 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Examples/IO/DicomSeriesReadImageWrite.cxx b/Examples/IO/DicomSeriesReadImageWrite.cxx index 55649a8faca..c770e1129fc 100644 --- a/Examples/IO/DicomSeriesReadImageWrite.cxx +++ b/Examples/IO/DicomSeriesReadImageWrite.cxx @@ -126,7 +126,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -146,13 +146,13 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; diff --git a/Examples/IO/DicomSeriesReadImageWrite2.cxx b/Examples/IO/DicomSeriesReadImageWrite2.cxx index bb383edf24c..ef613d38221 100644 --- a/Examples/IO/DicomSeriesReadImageWrite2.cxx +++ b/Examples/IO/DicomSeriesReadImageWrite2.cxx @@ -267,7 +267,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -317,13 +317,13 @@ main(int argc, char * argv[]) writer->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Examples/IO/DicomSeriesReadPrintTags.cxx b/Examples/IO/DicomSeriesReadPrintTags.cxx index 4b61c39d412..4d3b0dad6fc 100644 --- a/Examples/IO/DicomSeriesReadPrintTags.cxx +++ b/Examples/IO/DicomSeriesReadPrintTags.cxx @@ -137,7 +137,7 @@ main(int argc, char * argv[]) reader->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Examples/IO/DicomSeriesReadSeriesWrite.cxx b/Examples/IO/DicomSeriesReadSeriesWrite.cxx index 7fa515dbe0a..baf43e36823 100644 --- a/Examples/IO/DicomSeriesReadSeriesWrite.cxx +++ b/Examples/IO/DicomSeriesReadSeriesWrite.cxx @@ -179,7 +179,7 @@ main(int argc, char * argv[]) reader->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; @@ -302,7 +302,7 @@ main(int argc, char * argv[]) { seriesWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the series " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/IO/IOPlugin.cxx b/Examples/IO/IOPlugin.cxx index 51c62e96495..8d195c0da9f 100644 --- a/Examples/IO/IOPlugin.cxx +++ b/Examples/IO/IOPlugin.cxx @@ -111,7 +111,7 @@ main(int argc, char * argv[]) writer->Update(); reader->GetOutput()->Print(std::cout); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught unexpected exception!" << std::endl; std::cout << ex; @@ -123,7 +123,7 @@ main(int argc, char * argv[]) reader->SetFileName("foo"); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; diff --git a/Examples/IO/ImageReadCastWrite.cxx b/Examples/IO/ImageReadCastWrite.cxx index 6f66abc596e..36f0484b146 100644 --- a/Examples/IO/ImageReadCastWrite.cxx +++ b/Examples/IO/ImageReadCastWrite.cxx @@ -188,7 +188,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageReadDicomSeriesWrite.cxx b/Examples/IO/ImageReadDicomSeriesWrite.cxx index 618efeda196..a4dd34bd857 100644 --- a/Examples/IO/ImageReadDicomSeriesWrite.cxx +++ b/Examples/IO/ImageReadDicomSeriesWrite.cxx @@ -69,7 +69,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; @@ -138,7 +138,7 @@ main(int argc, char * argv[]) { seriesWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the series " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/IO/ImageReadExportVTK.cxx b/Examples/IO/ImageReadExportVTK.cxx index 56a7f9aeda6..7a7febd7542 100644 --- a/Examples/IO/ImageReadExportVTK.cxx +++ b/Examples/IO/ImageReadExportVTK.cxx @@ -202,7 +202,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageReadExtractFilterInsertWrite.cxx b/Examples/IO/ImageReadExtractFilterInsertWrite.cxx index dae93bdaa17..b435908f373 100644 --- a/Examples/IO/ImageReadExtractFilterInsertWrite.cxx +++ b/Examples/IO/ImageReadExtractFilterInsertWrite.cxx @@ -267,7 +267,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageReadExtractWrite.cxx b/Examples/IO/ImageReadExtractWrite.cxx index ab4b22c4dae..795a431f470 100644 --- a/Examples/IO/ImageReadExtractWrite.cxx +++ b/Examples/IO/ImageReadExtractWrite.cxx @@ -275,7 +275,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageReadImageSeriesWrite.cxx b/Examples/IO/ImageReadImageSeriesWrite.cxx index 4d882b0f0d4..827c25e17e9 100644 --- a/Examples/IO/ImageReadImageSeriesWrite.cxx +++ b/Examples/IO/ImageReadImageSeriesWrite.cxx @@ -136,7 +136,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the image" << std::endl; std::cerr << excp << std::endl; @@ -200,7 +200,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the image" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/IO/ImageReadRegionOfInterestWrite.cxx b/Examples/IO/ImageReadRegionOfInterestWrite.cxx index 9a1fa038537..3a6a2c7b79a 100644 --- a/Examples/IO/ImageReadRegionOfInterestWrite.cxx +++ b/Examples/IO/ImageReadRegionOfInterestWrite.cxx @@ -232,7 +232,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageReadWrite.cxx b/Examples/IO/ImageReadWrite.cxx index 60de0e76ccb..d00d32493f0 100644 --- a/Examples/IO/ImageReadWrite.cxx +++ b/Examples/IO/ImageReadWrite.cxx @@ -186,7 +186,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageSeriesReadWrite.cxx b/Examples/IO/ImageSeriesReadWrite.cxx index df861ee08a6..bb532c3e5e5 100644 --- a/Examples/IO/ImageSeriesReadWrite.cxx +++ b/Examples/IO/ImageSeriesReadWrite.cxx @@ -178,7 +178,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/ImageSeriesReadWrite2.cxx b/Examples/IO/ImageSeriesReadWrite2.cxx index 81ef3de6bec..2febc6ac218 100644 --- a/Examples/IO/ImageSeriesReadWrite2.cxx +++ b/Examples/IO/ImageSeriesReadWrite2.cxx @@ -211,7 +211,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/RGBImageSeriesReadWrite.cxx b/Examples/IO/RGBImageSeriesReadWrite.cxx index 489a9a71d93..b83dde7ea9b 100644 --- a/Examples/IO/RGBImageSeriesReadWrite.cxx +++ b/Examples/IO/RGBImageSeriesReadWrite.cxx @@ -164,7 +164,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error reading the series " << std::endl; std::cerr << excp << std::endl; @@ -219,7 +219,7 @@ main(int argc, char ** argv) { seriesWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error reading the series " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/IO/TransformReadWrite.cxx b/Examples/IO/TransformReadWrite.cxx index 5d862b1cd3a..1d0f6ebac3f 100644 --- a/Examples/IO/TransformReadWrite.cxx +++ b/Examples/IO/TransformReadWrite.cxx @@ -126,7 +126,7 @@ main(int argc, char * argv[]) writer->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -164,7 +164,7 @@ main(int argc, char * argv[]) reader->Update(); // Software Guide : EndCodeSnippet } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transform file" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/IO/VectorImageReadWrite.cxx b/Examples/IO/VectorImageReadWrite.cxx index f725b7fcdac..6fcddbd8ce9 100644 --- a/Examples/IO/VectorImageReadWrite.cxx +++ b/Examples/IO/VectorImageReadWrite.cxx @@ -133,7 +133,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/VisibleHumanPasteWrite.cxx b/Examples/IO/VisibleHumanPasteWrite.cxx index b44d5b6f7b3..91296506d11 100644 --- a/Examples/IO/VisibleHumanPasteWrite.cxx +++ b/Examples/IO/VisibleHumanPasteWrite.cxx @@ -122,7 +122,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/IO/VisibleHumanStreamReadWrite.cxx b/Examples/IO/VisibleHumanStreamReadWrite.cxx index 6a7e9f89d8b..75dad6a4708 100644 --- a/Examples/IO/VisibleHumanStreamReadWrite.cxx +++ b/Examples/IO/VisibleHumanStreamReadWrite.cxx @@ -168,7 +168,7 @@ main(int argc, char * argv[]) // update by streaming writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex.cxx index 66fcdf4b07b..7b8eb5b9240 100644 --- a/Examples/Iterators/ImageLinearIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageLinearIteratorWithIndex.cxx @@ -146,7 +146,7 @@ main(int argc, char * argv[]) reader->Update(); inputImage = reader->GetOutput(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught a !" << std::endl; std::cerr << err << std::endl; @@ -213,7 +213,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx index f730b208a97..413a9c67a88 100644 --- a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx +++ b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx @@ -71,7 +71,7 @@ main(int argc, char * argv[]) { reader4D->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error reading the image" << std::endl; std::cerr << excp << std::endl; @@ -205,7 +205,7 @@ main(int argc, char * argv[]) { writer3D->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the image" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx b/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx index 8e2e2686f7c..4324d96e03b 100644 --- a/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx @@ -80,7 +80,7 @@ main(int argc, char * argv[]) reader->Update(); inputImage = reader->GetOutput(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ImageRegionIterator.cxx b/Examples/Iterators/ImageRegionIterator.cxx index 38de4556eb1..9b5a48adb59 100644 --- a/Examples/Iterators/ImageRegionIterator.cxx +++ b/Examples/Iterators/ImageRegionIterator.cxx @@ -136,7 +136,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -232,7 +232,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ImageRegionIteratorWithIndex.cxx b/Examples/Iterators/ImageRegionIteratorWithIndex.cxx index 6194d655fbc..cf5e445c702 100644 --- a/Examples/Iterators/ImageRegionIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageRegionIteratorWithIndex.cxx @@ -93,7 +93,7 @@ main(int argc, char * argv[]) reader->Update(); inputImage = reader->GetOutput(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -154,7 +154,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ImageSliceIteratorWithIndex.cxx b/Examples/Iterators/ImageSliceIteratorWithIndex.cxx index e12e2ff3e38..86faf1d0081 100644 --- a/Examples/Iterators/ImageSliceIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageSliceIteratorWithIndex.cxx @@ -154,7 +154,7 @@ main(int argc, char * argv[]) reader->Update(); inputImage = reader->GetOutput(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -290,7 +290,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/NeighborhoodIterators1.cxx b/Examples/Iterators/NeighborhoodIterators1.cxx index 41e07dfd2b4..9bd9555741a 100644 --- a/Examples/Iterators/NeighborhoodIterators1.cxx +++ b/Examples/Iterators/NeighborhoodIterators1.cxx @@ -100,7 +100,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -219,7 +219,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/NeighborhoodIterators2.cxx b/Examples/Iterators/NeighborhoodIterators2.cxx index b6dd94cf47d..ff25a8d8e57 100644 --- a/Examples/Iterators/NeighborhoodIterators2.cxx +++ b/Examples/Iterators/NeighborhoodIterators2.cxx @@ -78,7 +78,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -174,7 +174,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/NeighborhoodIterators3.cxx b/Examples/Iterators/NeighborhoodIterators3.cxx index 19eb096a677..a0ded410006 100644 --- a/Examples/Iterators/NeighborhoodIterators3.cxx +++ b/Examples/Iterators/NeighborhoodIterators3.cxx @@ -82,7 +82,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -212,7 +212,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/NeighborhoodIterators4.cxx b/Examples/Iterators/NeighborhoodIterators4.cxx index 13755d2a922..3ba3757620f 100644 --- a/Examples/Iterators/NeighborhoodIterators4.cxx +++ b/Examples/Iterators/NeighborhoodIterators4.cxx @@ -88,7 +88,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -218,7 +218,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/NeighborhoodIterators5.cxx b/Examples/Iterators/NeighborhoodIterators5.cxx index 772b1c2f772..1f5ce45dea4 100644 --- a/Examples/Iterators/NeighborhoodIterators5.cxx +++ b/Examples/Iterators/NeighborhoodIterators5.cxx @@ -80,7 +80,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -202,7 +202,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/NeighborhoodIterators6.cxx b/Examples/Iterators/NeighborhoodIterators6.cxx index 45f1114659d..70a80201703 100644 --- a/Examples/Iterators/NeighborhoodIterators6.cxx +++ b/Examples/Iterators/NeighborhoodIterators6.cxx @@ -111,7 +111,7 @@ main(int argc, char ** argv) adder->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -224,7 +224,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ShapedNeighborhoodIterators1.cxx b/Examples/Iterators/ShapedNeighborhoodIterators1.cxx index 6ccd558e07b..4845a52aa42 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators1.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators1.cxx @@ -83,7 +83,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -237,7 +237,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx index b8ce3e7b7f5..6b82c382830 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx @@ -58,7 +58,7 @@ main(int argc, char ** argv) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -178,7 +178,7 @@ main(int argc, char ** argv) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/BSplineWarping1.cxx b/Examples/RegistrationITKv4/BSplineWarping1.cxx index dabf2f6edc9..595291a4f0c 100644 --- a/Examples/RegistrationITKv4/BSplineWarping1.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping1.cxx @@ -114,7 +114,7 @@ main(int argc, char * argv[]) { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -294,7 +294,7 @@ main(int argc, char * argv[]) { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -345,7 +345,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -364,7 +364,7 @@ main(int argc, char * argv[]) transformWriter->SetFileName(argv[6]); transformWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/BSplineWarping2.cxx b/Examples/RegistrationITKv4/BSplineWarping2.cxx index df66af1ea80..3af80650cce 100644 --- a/Examples/RegistrationITKv4/BSplineWarping2.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping2.cxx @@ -112,7 +112,7 @@ main(int argc, char * argv[]) { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -294,7 +294,7 @@ main(int argc, char * argv[]) { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -345,7 +345,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -364,7 +364,7 @@ main(int argc, char * argv[]) transformWriter->SetFileName(argv[6]); transformWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx b/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx index d6bd4eac1c8..2a36fdd2547 100644 --- a/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx +++ b/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx @@ -111,7 +111,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -184,7 +184,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration1.cxx b/Examples/RegistrationITKv4/DeformableRegistration1.cxx index c93968674d0..59eb4430fe3 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration1.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration1.cxx @@ -157,7 +157,7 @@ main(int argc, char * argv[]) { movingfilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during reference file reading " << std::endl; std::cerr << e << std::endl; @@ -167,7 +167,7 @@ main(int argc, char * argv[]) { fixedfilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during target file reading " << std::endl; std::cerr << e << std::endl; @@ -220,7 +220,7 @@ main(int argc, char * argv[]) { writer->Write(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -236,7 +236,7 @@ main(int argc, char * argv[]) { writer2->Write(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -304,7 +304,7 @@ main(int argc, char * argv[]) { warpedImageWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -328,7 +328,7 @@ main(int argc, char * argv[]) { dispWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration10.cxx b/Examples/RegistrationITKv4/DeformableRegistration10.cxx index 715e082d27a..5bfa09bfd06 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration10.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration10.cxx @@ -212,7 +212,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); } diff --git a/Examples/RegistrationITKv4/DeformableRegistration11.cxx b/Examples/RegistrationITKv4/DeformableRegistration11.cxx index 920f5e1110c..853f0aa7c49 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration11.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration11.cxx @@ -96,7 +96,7 @@ main(int argc, char * argv[]) { movingfilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during reference file reading "; std::cerr << std::endl << e << std::endl; @@ -106,7 +106,7 @@ main(int argc, char * argv[]) { fixedfilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during target file reading "; std::cerr << std::endl << e << std::endl; @@ -191,7 +191,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -206,7 +206,7 @@ main(int argc, char * argv[]) { dispWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration12.cxx b/Examples/RegistrationITKv4/DeformableRegistration12.cxx index cf0280b503f..427c85170d9 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration12.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration12.cxx @@ -308,7 +308,7 @@ main(int argc, char * argv[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -365,7 +365,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -392,7 +392,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -412,7 +412,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -466,7 +466,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration13.cxx b/Examples/RegistrationITKv4/DeformableRegistration13.cxx index 32246c46094..49d1549d953 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration13.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration13.cxx @@ -297,7 +297,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -357,7 +357,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -384,7 +384,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -404,7 +404,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -458,7 +458,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration14.cxx b/Examples/RegistrationITKv4/DeformableRegistration14.cxx index c415fa2fbe8..8602a4d0382 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration14.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration14.cxx @@ -289,7 +289,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -343,7 +343,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -369,7 +369,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -388,7 +388,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -442,7 +442,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration15.cxx b/Examples/RegistrationITKv4/DeformableRegistration15.cxx index c141d5670e2..2c836dcd8b9 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration15.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration15.cxx @@ -193,7 +193,7 @@ main(int argc, char * argv[]) fixedImageReader->Update(); movingImageReader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -330,7 +330,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -400,7 +400,7 @@ main(int argc, char * argv[]) chronometer.Stop("Affine Registration"); memorymeter.Stop("Affine Registration"); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -512,7 +512,7 @@ main(int argc, char * argv[]) chronometer.Stop("Deformable Registration Coarse"); memorymeter.Stop("Deformable Registration Coarse"); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -651,7 +651,7 @@ main(int argc, char * argv[]) chronometer.Stop("Deformable Registration Fine"); memorymeter.Stop("Deformable Registration Fine"); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -715,7 +715,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -753,7 +753,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -778,7 +778,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -837,7 +837,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration16.cxx b/Examples/RegistrationITKv4/DeformableRegistration16.cxx index b09a0197ef4..d4389a3bd90 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration16.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration16.cxx @@ -289,7 +289,7 @@ main(int argc, char * argv[]) { multires->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -330,7 +330,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -346,7 +346,7 @@ main(int argc, char * argv[]) { defwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration17.cxx b/Examples/RegistrationITKv4/DeformableRegistration17.cxx index acd65a7b6a7..a7a4b49c91e 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration17.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration17.cxx @@ -291,7 +291,7 @@ main(int argc, char * argv[]) { multires->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -332,7 +332,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -349,7 +349,7 @@ main(int argc, char * argv[]) { defwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration2.cxx b/Examples/RegistrationITKv4/DeformableRegistration2.cxx index c90224eef5e..92ef2f99c90 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration2.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration2.cxx @@ -485,7 +485,7 @@ main(int argc, char * argv[]) { writer3D->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration4.cxx b/Examples/RegistrationITKv4/DeformableRegistration4.cxx index 5ad8f211e06..b1ce76f2496 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration4.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration4.cxx @@ -294,7 +294,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -364,7 +364,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -391,7 +391,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -411,7 +411,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -438,7 +438,7 @@ main(int argc, char * argv[]) { dispfieldGenerator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while generating deformation field"; std::cerr << " : " << err << std::endl; @@ -457,7 +457,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration5.cxx b/Examples/RegistrationITKv4/DeformableRegistration5.cxx index bf10bc73c74..1497f78770c 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration5.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration5.cxx @@ -493,7 +493,7 @@ main(int argc, char * argv[]) { writer3D->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/DeformableRegistration6.cxx b/Examples/RegistrationITKv4/DeformableRegistration6.cxx index a7d935cf485..99290bf9c84 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration6.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration6.cxx @@ -353,7 +353,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -399,7 +399,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -426,7 +426,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -446,7 +446,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -473,7 +473,7 @@ main(int argc, char * argv[]) { dispfieldGenerator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while generating deformation field"; std::cerr << " : " << err << std::endl; @@ -492,7 +492,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration7.cxx b/Examples/RegistrationITKv4/DeformableRegistration7.cxx index 325d8183e3e..9060038780f 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration7.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration7.cxx @@ -298,7 +298,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -350,7 +350,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -377,7 +377,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -397,7 +397,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -424,7 +424,7 @@ main(int argc, char * argv[]) { dispfieldGenerator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while generating deformation field"; std::cerr << " : " << err << std::endl; @@ -443,7 +443,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration8.cxx b/Examples/RegistrationITKv4/DeformableRegistration8.cxx index be4939b1618..77bdabe759e 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration8.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration8.cxx @@ -302,7 +302,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -362,7 +362,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -389,7 +389,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -409,7 +409,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -438,7 +438,7 @@ main(int argc, char * argv[]) { dispfieldGenerator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while generating deformation field"; std::cerr << " : " << err << std::endl; @@ -455,7 +455,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration9.cxx b/Examples/RegistrationITKv4/DeformableRegistration9.cxx index b55724a361b..02593c60695 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration9.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration9.cxx @@ -206,7 +206,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); } diff --git a/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx b/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx index 76f9fb1a746..6e44ad29c69 100644 --- a/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx +++ b/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx @@ -79,7 +79,7 @@ main(int argc, char * argv[]) { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -131,7 +131,7 @@ main(int argc, char * argv[]) { filter->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -149,7 +149,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown by writer" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration1.cxx b/Examples/RegistrationITKv4/ImageRegistration1.cxx index fb1627c8d28..92581b34e2b 100644 --- a/Examples/RegistrationITKv4/ImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration1.cxx @@ -517,7 +517,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration10.cxx b/Examples/RegistrationITKv4/ImageRegistration10.cxx index 7504cf5b16b..bb32ede20bd 100644 --- a/Examples/RegistrationITKv4/ImageRegistration10.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration10.cxx @@ -386,7 +386,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration11.cxx b/Examples/RegistrationITKv4/ImageRegistration11.cxx index 59c3518d85d..bad5a86732a 100644 --- a/Examples/RegistrationITKv4/ImageRegistration11.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration11.cxx @@ -284,7 +284,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration12.cxx b/Examples/RegistrationITKv4/ImageRegistration12.cxx index d200ce34fb2..a6e71bce5fa 100644 --- a/Examples/RegistrationITKv4/ImageRegistration12.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration12.cxx @@ -244,7 +244,7 @@ main(int argc, char * argv[]) { maskReader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -301,7 +301,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration13.cxx b/Examples/RegistrationITKv4/ImageRegistration13.cxx index e929e5b04e4..56f78486615 100644 --- a/Examples/RegistrationITKv4/ImageRegistration13.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration13.cxx @@ -253,7 +253,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration14.cxx b/Examples/RegistrationITKv4/ImageRegistration14.cxx index e06e4f923ac..f585c07d552 100644 --- a/Examples/RegistrationITKv4/ImageRegistration14.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration14.cxx @@ -252,7 +252,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration15.cxx b/Examples/RegistrationITKv4/ImageRegistration15.cxx index 04b8e1fab05..8c10d6c1865 100644 --- a/Examples/RegistrationITKv4/ImageRegistration15.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration15.cxx @@ -234,7 +234,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration16.cxx b/Examples/RegistrationITKv4/ImageRegistration16.cxx index 503d4b1a1a6..8d0ff23759a 100644 --- a/Examples/RegistrationITKv4/ImageRegistration16.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration16.cxx @@ -270,7 +270,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration17.cxx b/Examples/RegistrationITKv4/ImageRegistration17.cxx index 15178f738d9..b01f8b1d6b1 100644 --- a/Examples/RegistrationITKv4/ImageRegistration17.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration17.cxx @@ -262,7 +262,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration18.cxx b/Examples/RegistrationITKv4/ImageRegistration18.cxx index 6c2df95cd5f..9c44d256163 100644 --- a/Examples/RegistrationITKv4/ImageRegistration18.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration18.cxx @@ -177,7 +177,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration19.cxx b/Examples/RegistrationITKv4/ImageRegistration19.cxx index 4761fc0362a..cedb360d361 100644 --- a/Examples/RegistrationITKv4/ImageRegistration19.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration19.cxx @@ -299,7 +299,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration2.cxx b/Examples/RegistrationITKv4/ImageRegistration2.cxx index 5c33d6e6ddf..c8b760aa122 100644 --- a/Examples/RegistrationITKv4/ImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration2.cxx @@ -433,7 +433,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration20.cxx b/Examples/RegistrationITKv4/ImageRegistration20.cxx index c373762e405..45028c0529c 100644 --- a/Examples/RegistrationITKv4/ImageRegistration20.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration20.cxx @@ -322,7 +322,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration3.cxx b/Examples/RegistrationITKv4/ImageRegistration3.cxx index 993fa4fc805..75d2d55b7cf 100644 --- a/Examples/RegistrationITKv4/ImageRegistration3.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration3.cxx @@ -403,7 +403,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration4.cxx b/Examples/RegistrationITKv4/ImageRegistration4.cxx index 9090d4a77de..2d6f517fea3 100644 --- a/Examples/RegistrationITKv4/ImageRegistration4.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration4.cxx @@ -374,7 +374,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration5.cxx b/Examples/RegistrationITKv4/ImageRegistration5.cxx index 10ad0dbbff4..232d240a1e4 100644 --- a/Examples/RegistrationITKv4/ImageRegistration5.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration5.cxx @@ -458,7 +458,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -611,7 +611,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "ExceptionObject while writing the resampled image !" << std::endl; std::cerr << excp << std::endl; @@ -666,7 +666,7 @@ main(int argc, char * argv[]) writer2->Update(); } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing difference images" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration6.cxx b/Examples/RegistrationITKv4/ImageRegistration6.cxx index 87efc08e224..762b9a17d52 100644 --- a/Examples/RegistrationITKv4/ImageRegistration6.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration6.cxx @@ -353,7 +353,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -655,7 +655,7 @@ main(int argc, char * argv[]) writer2->Update(); } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing difference images" << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration7.cxx b/Examples/RegistrationITKv4/ImageRegistration7.cxx index 777ecc776c8..881d9a67906 100644 --- a/Examples/RegistrationITKv4/ImageRegistration7.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration7.cxx @@ -356,7 +356,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration8.cxx b/Examples/RegistrationITKv4/ImageRegistration8.cxx index 7cc5a29c05a..51e387c9336 100644 --- a/Examples/RegistrationITKv4/ImageRegistration8.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration8.cxx @@ -351,7 +351,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration9.cxx b/Examples/RegistrationITKv4/ImageRegistration9.cxx index 209e648a582..cdc17555a6f 100644 --- a/Examples/RegistrationITKv4/ImageRegistration9.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration9.cxx @@ -352,7 +352,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx b/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx index 14fc4a9c284..de442846a75 100644 --- a/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx +++ b/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx @@ -261,7 +261,7 @@ class HistogramWriter { m_Filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -271,7 +271,7 @@ class HistogramWriter { m_HistogramFileWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } @@ -344,7 +344,7 @@ class HistogramWriter { m_Filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -354,7 +354,7 @@ class HistogramWriter { rescaledWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << excp << std::endl; } @@ -591,7 +591,7 @@ main(int argc, char * argv[]) { fixedNormalizer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -633,7 +633,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -662,7 +662,7 @@ main(int argc, char * argv[]) { observer->m_JointHistogramWriter.WriteHistogramFile(histogramAfter); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -712,7 +712,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ERROR: ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx index 5a05f4da32b..c28d3730bb8 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx @@ -263,7 +263,7 @@ main(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx index 8eb949acf6a..91cdd7fe4e7 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx @@ -278,7 +278,7 @@ main(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx index 6042692bf62..b99195394a7 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx @@ -249,7 +249,7 @@ main(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/LandmarkWarping2.cxx b/Examples/RegistrationITKv4/LandmarkWarping2.cxx index 5aef931b43c..828acf81f21 100644 --- a/Examples/RegistrationITKv4/LandmarkWarping2.cxx +++ b/Examples/RegistrationITKv4/LandmarkWarping2.cxx @@ -77,7 +77,7 @@ main(int argc, char * argv[]) { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -180,7 +180,7 @@ main(int argc, char * argv[]) { deformer->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -224,7 +224,7 @@ main(int argc, char * argv[]) { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/RegistrationITKv4/MeanSquaresImageMetric1.cxx b/Examples/RegistrationITKv4/MeanSquaresImageMetric1.cxx index 20a3c770b2a..696d1359850 100644 --- a/Examples/RegistrationITKv4/MeanSquaresImageMetric1.cxx +++ b/Examples/RegistrationITKv4/MeanSquaresImageMetric1.cxx @@ -88,7 +88,7 @@ main(int argc, char * argv[]) fixedReader->Update(); movingReader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; @@ -168,7 +168,7 @@ main(int argc, char * argv[]) { metric->Initialize(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx b/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx index 92771f62510..8acb114352b 100644 --- a/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx @@ -889,7 +889,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught ! " << std::endl; std::cerr << exp << std::endl; diff --git a/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx b/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx index f11e182b63b..a8dd03d1921 100644 --- a/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx @@ -229,7 +229,7 @@ main(int argc, char * argv[]) { movingImageReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem reading Moving image from = " << std::endl; std::cerr << argv[1] << std::endl; @@ -345,7 +345,7 @@ main(int argc, char * argv[]) << registrationMethod->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem found during the registration" << std::endl; std::cerr << argv[1] << std::endl; diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx index e69b4199b2c..3e388c4c754 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx @@ -488,7 +488,7 @@ main(int argc, const char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx index 02482a9d46c..ef87e2619d0 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx @@ -442,7 +442,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx index 6a1cb720eb8..bcd7dfe5b2d 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx @@ -281,7 +281,7 @@ main(int argc, char * argv[]) << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx b/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx index 6ccb01238c1..f59a0233b3f 100644 --- a/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx @@ -396,7 +396,7 @@ main(int argc, char * argv[]) << transRegistration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -740,7 +740,7 @@ main(int argc, char * argv[]) << affineRegistration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -930,7 +930,7 @@ main(int argc, char * argv[]) { identityTransform = TransformType::New(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { err.Print(std::cerr); return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx b/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx index b25a5b5cf1c..3420e1d7f74 100644 --- a/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx @@ -488,7 +488,7 @@ main(int argc, char * argv[]) << affineRegistration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -650,7 +650,7 @@ main(int argc, char * argv[]) { identityTransform = TransformType::New(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { err.Print(std::cerr); return EXIT_FAILURE; diff --git a/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx b/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx index 2ff428fbd87..45f2f69e7af 100644 --- a/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx +++ b/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx @@ -78,7 +78,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -167,7 +167,7 @@ main(int argc, char * argv[]) { deformedImageWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -219,7 +219,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx b/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx index d7b2c8a649b..6f775accfb8 100644 --- a/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx +++ b/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx @@ -269,7 +269,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -367,7 +367,7 @@ main(int argc, char * argv[]) { speedWriter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught ! while writing the speed image" << std::endl; std::cerr << "Filename : " << speedImageFileName << std::endl; diff --git a/Examples/Segmentation/ConfidenceConnected.cxx b/Examples/Segmentation/ConfidenceConnected.cxx index c7bc53fe1bf..311e454bf70 100644 --- a/Examples/Segmentation/ConfidenceConnected.cxx +++ b/Examples/Segmentation/ConfidenceConnected.cxx @@ -340,7 +340,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/ConfidenceConnected3D.cxx b/Examples/Segmentation/ConfidenceConnected3D.cxx index dcac429dd5e..912c53f0a57 100644 --- a/Examples/Segmentation/ConfidenceConnected3D.cxx +++ b/Examples/Segmentation/ConfidenceConnected3D.cxx @@ -124,7 +124,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/ConnectedThresholdImageFilter.cxx b/Examples/Segmentation/ConnectedThresholdImageFilter.cxx index 49104f6454c..f7128f311e1 100644 --- a/Examples/Segmentation/ConnectedThresholdImageFilter.cxx +++ b/Examples/Segmentation/ConnectedThresholdImageFilter.cxx @@ -294,7 +294,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/CurvesLevelSetImageFilter.cxx b/Examples/Segmentation/CurvesLevelSetImageFilter.cxx index 316294f5dba..1981f48d086 100644 --- a/Examples/Segmentation/CurvesLevelSetImageFilter.cxx +++ b/Examples/Segmentation/CurvesLevelSetImageFilter.cxx @@ -453,7 +453,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/FastMarchingImageFilter.cxx b/Examples/Segmentation/FastMarchingImageFilter.cxx index 18b20dd5cc2..55c764237c7 100644 --- a/Examples/Segmentation/FastMarchingImageFilter.cxx +++ b/Examples/Segmentation/FastMarchingImageFilter.cxx @@ -587,7 +587,7 @@ main(int argc, char * argv[]) caster1->SetOutputMaximum(255); writer1->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -605,7 +605,7 @@ main(int argc, char * argv[]) caster2->SetOutputMaximum(255); writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -623,7 +623,7 @@ main(int argc, char * argv[]) caster3->SetOutputMaximum(255); writer3->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -680,7 +680,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -699,7 +699,7 @@ main(int argc, char * argv[]) caster4->SetOutputMaximum(255); writer4->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx index 6b9c5cdcd31..8095de3c387 100644 --- a/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx @@ -478,7 +478,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx index 0b55c16877a..cd75db62836 100644 --- a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx @@ -897,7 +897,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx b/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx index e4bd1c14262..2fb3f735c06 100644 --- a/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx +++ b/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx @@ -93,7 +93,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -268,7 +268,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx b/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx index 0fd876b031f..fcd76e3b117 100644 --- a/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx +++ b/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx @@ -88,7 +88,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -304,7 +304,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/IsolatedConnectedImageFilter.cxx b/Examples/Segmentation/IsolatedConnectedImageFilter.cxx index e9304337e11..13cc52980bb 100644 --- a/Examples/Segmentation/IsolatedConnectedImageFilter.cxx +++ b/Examples/Segmentation/IsolatedConnectedImageFilter.cxx @@ -211,7 +211,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx b/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx index facf2183bed..99baebec487 100644 --- a/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx +++ b/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx @@ -240,7 +240,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx b/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx index df3bf1df0df..95a118d3fa6 100644 --- a/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx +++ b/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx @@ -270,7 +270,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx b/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx index 3ab12f98fdb..feba385ac1a 100644 --- a/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx +++ b/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx @@ -688,7 +688,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx b/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx index b0f9a583035..038b088cc6f 100644 --- a/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx +++ b/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx @@ -345,7 +345,7 @@ main(int argc, char * argv[]) fastMarching->SetOutputDirection(inputImage->GetDirection()); writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/VectorConfidenceConnected.cxx b/Examples/Segmentation/VectorConfidenceConnected.cxx index 0df2aa7f5e8..ed5cc4faf68 100644 --- a/Examples/Segmentation/VectorConfidenceConnected.cxx +++ b/Examples/Segmentation/VectorConfidenceConnected.cxx @@ -254,7 +254,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/Segmentation/WatershedSegmentation1.cxx b/Examples/Segmentation/WatershedSegmentation1.cxx index 76f6b5889f4..9a39be1eb42 100644 --- a/Examples/Segmentation/WatershedSegmentation1.cxx +++ b/Examples/Segmentation/WatershedSegmentation1.cxx @@ -218,7 +218,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Examples/Segmentation/WatershedSegmentation2.cxx b/Examples/Segmentation/WatershedSegmentation2.cxx index 0f9c66449c8..31343dd4044 100644 --- a/Examples/Segmentation/WatershedSegmentation2.cxx +++ b/Examples/Segmentation/WatershedSegmentation2.cxx @@ -118,7 +118,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx b/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx index ad812f9bcf8..bc87d0fc040 100644 --- a/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx +++ b/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx @@ -61,7 +61,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/Statistics/BayesianClassifier.cxx b/Examples/Statistics/BayesianClassifier.cxx index 006c9c9b536..0f5b7e5a979 100644 --- a/Examples/Statistics/BayesianClassifier.cxx +++ b/Examples/Statistics/BayesianClassifier.cxx @@ -138,7 +138,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Statistics/BayesianClassifierInitializer.cxx b/Examples/Statistics/BayesianClassifierInitializer.cxx index 3ba1fd09ec6..a9f2db33fa5 100644 --- a/Examples/Statistics/BayesianClassifierInitializer.cxx +++ b/Examples/Statistics/BayesianClassifierInitializer.cxx @@ -87,7 +87,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -108,7 +108,7 @@ main(int argc, char * argv[]) { bayesianInitializer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -119,7 +119,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Statistics/ImageEntropy1.cxx b/Examples/Statistics/ImageEntropy1.cxx index 3fcd1158f1a..2ecb76f0659 100644 --- a/Examples/Statistics/ImageEntropy1.cxx +++ b/Examples/Statistics/ImageEntropy1.cxx @@ -94,7 +94,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; diff --git a/Examples/Statistics/ImageHistogram1.cxx b/Examples/Statistics/ImageHistogram1.cxx index 67504c8ae8f..b8aee84e9bb 100644 --- a/Examples/Statistics/ImageHistogram1.cxx +++ b/Examples/Statistics/ImageHistogram1.cxx @@ -133,7 +133,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Statistics/ImageHistogram2.cxx b/Examples/Statistics/ImageHistogram2.cxx index a75882c8101..89b2443f9b8 100644 --- a/Examples/Statistics/ImageHistogram2.cxx +++ b/Examples/Statistics/ImageHistogram2.cxx @@ -84,7 +84,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Statistics/ImageHistogram3.cxx b/Examples/Statistics/ImageHistogram3.cxx index 9a42849e9e8..cb013ec916c 100644 --- a/Examples/Statistics/ImageHistogram3.cxx +++ b/Examples/Statistics/ImageHistogram3.cxx @@ -89,7 +89,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; diff --git a/Examples/Statistics/ImageHistogram4.cxx b/Examples/Statistics/ImageHistogram4.cxx index aa39faeb370..bdcb6903ee6 100644 --- a/Examples/Statistics/ImageHistogram4.cxx +++ b/Examples/Statistics/ImageHistogram4.cxx @@ -99,7 +99,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; diff --git a/Examples/Statistics/ImageMutualInformation1.cxx b/Examples/Statistics/ImageMutualInformation1.cxx index b0789076938..f6eb4c2fb01 100644 --- a/Examples/Statistics/ImageMutualInformation1.cxx +++ b/Examples/Statistics/ImageMutualInformation1.cxx @@ -161,7 +161,7 @@ main(int argc, char * argv[]) { joinFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Examples/Statistics/ScalarImageKmeansClassifier.cxx b/Examples/Statistics/ScalarImageKmeansClassifier.cxx index df3e19d2ddb..287ad2dba3b 100644 --- a/Examples/Statistics/ScalarImageKmeansClassifier.cxx +++ b/Examples/Statistics/ScalarImageKmeansClassifier.cxx @@ -194,7 +194,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encountered while writing "; std::cerr << " image file : " << argv[2] << std::endl; diff --git a/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx b/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx index d596e52c47c..50219242470 100644 --- a/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx +++ b/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx @@ -71,7 +71,7 @@ main(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; diff --git a/Examples/Statistics/ScalarImageMarkovRandomField1.cxx b/Examples/Statistics/ScalarImageMarkovRandomField1.cxx index 972ce6fd020..33c16154568 100644 --- a/Examples/Statistics/ScalarImageMarkovRandomField1.cxx +++ b/Examples/Statistics/ScalarImageMarkovRandomField1.cxx @@ -443,7 +443,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encountered while writing "; std::cerr << " image file : " << argv[2] << std::endl; diff --git a/Modules/Bridge/VtkGlue/test/itkVTKImageToImageFilterTest.cxx b/Modules/Bridge/VtkGlue/test/itkVTKImageToImageFilterTest.cxx index 0ec478129a7..02e01701df2 100644 --- a/Modules/Bridge/VtkGlue/test/itkVTKImageToImageFilterTest.cxx +++ b/Modules/Bridge/VtkGlue/test/itkVTKImageToImageFilterTest.cxx @@ -89,7 +89,7 @@ itkVTKImageToImageFilterTest(int, char *[]) { connector->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::string expectedErrorSubString = "is not equal to 0.0"; std::string fullErrorString = e.GetDescription(); diff --git a/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx b/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx index f95b864f557..6e8908b0e25 100644 --- a/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx @@ -159,7 +159,7 @@ itkBarrierTest(int argc, char * argv[]) multithreader->SetSingleMethod(BarrierSpecialTest, &data); multithreader->SingleMethodExecute(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Compatibility/Deprecated/test/itkConditionVariableTest.cxx b/Modules/Compatibility/Deprecated/test/itkConditionVariableTest.cxx index 7419476e3e4..cc5e3a1a579 100644 --- a/Modules/Compatibility/Deprecated/test/itkConditionVariableTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkConditionVariableTest.cxx @@ -120,7 +120,7 @@ itkConditionVariableTest(int, char *[]) multithreader->SingleMethodExecute(); } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return 2; diff --git a/Modules/Core/Common/include/itkSmapsFileParser.hxx b/Modules/Core/Common/include/itkSmapsFileParser.hxx index 891f00bb29e..0a828bb7f8d 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.hxx +++ b/Modules/Core/Common/include/itkSmapsFileParser.hxx @@ -125,7 +125,7 @@ SmapsFileParser::ReadFile(const std::string & mapFileLocation) // load the file inputFile >> this->m_MapData; } - catch (ExceptionObject excp) + catch (const ExceptionObject & excp) { // propagate the exception itkGenericExceptionMacro(<< "The smaps file " << filename.str() << " is an invalid file or contains errors"); @@ -184,7 +184,7 @@ VMMapFileParser::ReadFile(const std::string & mapFileLocation) #endif } } - catch (ExceptionObject excp) + catch (const ExceptionObject & excp) { // propagate the exception itkGenericExceptionMacro(<< "The vmmap file is an invalid file or contains errors"); diff --git a/Modules/Core/Common/test/itkAnnulusOperatorTest.cxx b/Modules/Core/Common/test/itkAnnulusOperatorTest.cxx index 24cc04e05a5..f4fcd635c68 100644 --- a/Modules/Core/Common/test/itkAnnulusOperatorTest.cxx +++ b/Modules/Core/Common/test/itkAnnulusOperatorTest.cxx @@ -41,7 +41,7 @@ itkAnnulusOperatorTest(int, char *[]) { normalizedAnnulus.CreateOperator(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx b/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx index 5786a5b63c5..f82b3ba3035 100644 --- a/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx +++ b/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx @@ -196,7 +196,7 @@ itkBSplineKernelFunctionTest(int, char *[]) { function->Evaluate(0.0); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception" << std::endl; std::cout << err << std::endl; @@ -222,7 +222,7 @@ itkBSplineKernelFunctionTest(int, char *[]) { function->Evaluate(0.0); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Core/Common/test/itkByteSwapTest.cxx b/Modules/Core/Common/test/itkByteSwapTest.cxx index c647e8ea706..a4ea86ff940 100644 --- a/Modules/Core/Common/test/itkByteSwapTest.cxx +++ b/Modules/Core/Common/test/itkByteSwapTest.cxx @@ -114,7 +114,7 @@ itkByteSwapTest(int, char *[]) } std::cout << "Passed unsigned long: " << ul << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught unsigned long exception size is: " << sizeof(unsigned long) << std::endl; (&err)->Print(std::cerr); @@ -139,7 +139,7 @@ itkByteSwapTest(int, char *[]) } std::cout << "Passed unsigned long long: " << ull << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught unsigned long long exception size is: " << sizeof(unsigned long long) << std::endl; (&err)->Print(std::cerr); @@ -163,7 +163,7 @@ itkByteSwapTest(int, char *[]) } std::cout << "Passed float: " << f << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught float exception size is: " << sizeof(float) << std::endl; (&err)->Print(std::cerr); @@ -188,7 +188,7 @@ itkByteSwapTest(int, char *[]) } std::cout << "Passed unsigned d: " << d << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Good catch! Caught double exception size is: " << sizeof(double) << std::endl; (&err)->Print(std::cerr); diff --git a/Modules/Core/Common/test/itkExceptionObjectTest.cxx b/Modules/Core/Common/test/itkExceptionObjectTest.cxx index e1eba9c9ba7..740338a7472 100644 --- a/Modules/Core/Common/test/itkExceptionObjectTest.cxx +++ b/Modules/Core/Common/test/itkExceptionObjectTest.cxx @@ -112,7 +112,7 @@ itkExceptionObjectTest(int, char *[]) lookup(4); // OK lookup(12); // ERROR } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e << std::endl; raised = true; diff --git a/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx b/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx index 291a45ea0c3..13af128efaa 100644 --- a/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx +++ b/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx @@ -54,7 +54,7 @@ itkFloatingPointExceptionsTest(int argc, char * argv[]) << " result is " << s << std::endl; error_return++; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Expected divide by zero exception caught" << std::endl; std::cout << e; @@ -74,7 +74,7 @@ itkFloatingPointExceptionsTest(int argc, char * argv[]) << " result is " << s << std::endl; error_return++; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Expected 0.0 / 0.0 exception caught" << std::endl; std::cout << e; @@ -95,7 +95,7 @@ itkFloatingPointExceptionsTest(int argc, char * argv[]) << " result is " << s << std::endl; error_return++; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Overflow exception caught" << std::endl; std::cout << e; @@ -117,7 +117,7 @@ itkFloatingPointExceptionsTest(int argc, char * argv[]) << " result is " << s << std::endl; error_return++; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Underflow exception caught" << std::endl; std::cout << e; diff --git a/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx b/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx index acc58d11942..07b8e3fc1c9 100644 --- a/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx +++ b/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx @@ -74,7 +74,7 @@ itkImageDuplicatorTest2(int argc, char * argv[]) writer->Update(); std::cout << "Test SUCCESS" << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkImageFillBufferTest.cxx b/Modules/Core/Common/test/itkImageFillBufferTest.cxx index c5d901fd159..103b82079d6 100644 --- a/Modules/Core/Common/test/itkImageFillBufferTest.cxx +++ b/Modules/Core/Common/test/itkImageFillBufferTest.cxx @@ -50,7 +50,7 @@ itkImageFillBufferTest(int argc, char * argv[]) // { // image->SetRegions( size ); // } - // catch(itk::ExceptionObject e) + // catch(const itk::ExceptionObject & e) // { // std::cout << e << std::endl; // std::cout << "Can't allocate memory - that's nice. Don't go further." << std::endl; diff --git a/Modules/Core/Common/test/itkImageRandomIteratorTest2.cxx b/Modules/Core/Common/test/itkImageRandomIteratorTest2.cxx index e1a08645cad..3ab84553bd8 100644 --- a/Modules/Core/Common/test/itkImageRandomIteratorTest2.cxx +++ b/Modules/Core/Common/test/itkImageRandomIteratorTest2.cxx @@ -118,7 +118,7 @@ itkImageRandomIteratorTest2(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkImageRegionTest.cxx b/Modules/Core/Common/test/itkImageRegionTest.cxx index 087e2c883cf..f53d1caedb0 100644 --- a/Modules/Core/Common/test/itkImageRegionTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionTest.cxx @@ -72,7 +72,7 @@ itkImageRegionTest(int, char *[]) sliceA = regionA.Slice(0); std::cout << "regionA.Slice(0): " << sliceA; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught unexpected exception" << err; return EXIT_FAILURE; @@ -84,7 +84,7 @@ itkImageRegionTest(int, char *[]) sliceA = regionA.Slice(1); std::cout << "regionA.Slice(1): " << sliceA; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught unexpected exception" << err; return EXIT_FAILURE; @@ -96,7 +96,7 @@ itkImageRegionTest(int, char *[]) sliceA = regionA.Slice(2); std::cout << "regionA.Slice(2): " << sliceA; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught unexpected exception" << err; return EXIT_FAILURE; @@ -110,7 +110,7 @@ itkImageRegionTest(int, char *[]) std::cout << "Failed to catch expected exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception" << err; } diff --git a/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx b/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx index d230437235a..086cb516074 100644 --- a/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx +++ b/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx @@ -55,7 +55,7 @@ itkImageToImageToleranceTest(int, char *[]) { addImageFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { exceptCaught = true; std::cout << "Expected exception:" << std::endl << e << std::endl; @@ -75,7 +75,7 @@ itkImageToImageToleranceTest(int, char *[]) { addImageFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { exceptCaught = true; std::cout << "Unexpected exception:" << std::endl << e << std::endl; @@ -99,7 +99,7 @@ itkImageToImageToleranceTest(int, char *[]) { addImageFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { exceptCaught = true; std::cout << "Expected exception:" << std::endl << e << std::endl; @@ -119,7 +119,7 @@ itkImageToImageToleranceTest(int, char *[]) { addImageFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { exceptCaught = true; std::cout << "Unexpected exception:" << std::endl << e << std::endl; diff --git a/Modules/Core/Common/test/itkImportContainerTest.cxx b/Modules/Core/Common/test/itkImportContainerTest.cxx index 917bbbfb3f5..8dd2ac42ba5 100644 --- a/Modules/Core/Common/test/itkImportContainerTest.cxx +++ b/Modules/Core/Common/test/itkImportContainerTest.cxx @@ -162,7 +162,7 @@ itkImportContainerTest(int, char *[]) ContainerType::Pointer container1 = ContainerType::New(); container1->Reserve(itk::NumericTraits::max() / sizeof(PixelType)); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception: " << err << std::endl; caughtException = true; diff --git a/Modules/Core/Common/test/itkImportImageTest.cxx b/Modules/Core/Common/test/itkImportImageTest.cxx index 9e793741872..5db17de0497 100644 --- a/Modules/Core/Common/test/itkImportImageTest.cxx +++ b/Modules/Core/Common/test/itkImportImageTest.cxx @@ -90,7 +90,7 @@ itkImportImageTest(int, char *[]) { shrink->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkMatrixTest.cxx b/Modules/Core/Common/test/itkMatrixTest.cxx index 3ba81e82fcf..8b23cdb6572 100644 --- a/Modules/Core/Common/test/itkMatrixTest.cxx +++ b/Modules/Core/Common/test/itkMatrixTest.cxx @@ -187,7 +187,7 @@ itkMatrixTest(int, char *[]) std::cout << "ITK * VNL Multiplication result: " << std::endl; std::cout << m3 * m4.GetVnlMatrix() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught in test..." << std::endl; std::cerr << e << std::endl; @@ -339,7 +339,7 @@ itkMatrixTest(int, char *[]) { matrixBad.GetInverse(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught expected exception!" << std::endl; std::cout << excp; @@ -356,7 +356,7 @@ itkMatrixTest(int, char *[]) { matrixBad.GetInverse(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught unexpected exception!" << std::endl; std::cout << excp; diff --git a/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx b/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx index de1c1d0b3d0..9d3624419aa 100644 --- a/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx +++ b/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx @@ -89,7 +89,7 @@ itkMetaDataDictionaryTest(int, char *[]) ++itr; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception Thrown." << std::endl; std::cerr << excp << std::endl; @@ -113,7 +113,7 @@ itkMetaDataDictionaryTest(int, char *[]) ++itr; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception Thrown." << std::endl; std::cerr << excp << std::endl; @@ -135,7 +135,7 @@ itkMetaDataDictionaryTest(int, char *[]) ++itr; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception Thrown." << std::endl; std::cerr << excp << std::endl; @@ -147,7 +147,7 @@ itkMetaDataDictionaryTest(int, char *[]) std::cerr << "Failed to throw expected exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << excp << std::endl; std::cout << "catched EXPECTED exception for invalid key string to MetaDataDictionary" << std::endl; diff --git a/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx index b48ec32f227..76a7bf5cc42 100644 --- a/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx @@ -197,7 +197,7 @@ itkNeighborhoodIteratorTest(int, char *[]) it3.SetPixel(it.Size() / 2, z); // in bounds it3.SetPixel(0, z); // out of bounds, should throw an exception } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e << std::endl; raised = true; diff --git a/Modules/Core/Common/test/itkOctreeTest.cxx b/Modules/Core/Common/test/itkOctreeTest.cxx index a6386e3069d..74533b7ed34 100644 --- a/Modules/Core/Common/test/itkOctreeTest.cxx +++ b/Modules/Core/Common/test/itkOctreeTest.cxx @@ -66,7 +66,7 @@ itkOctreeTest(int, char *[]) ++ri; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return EXIT_FAILURE; @@ -101,7 +101,7 @@ itkOctreeTest(int, char *[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkSliceIteratorTest.cxx b/Modules/Core/Common/test/itkSliceIteratorTest.cxx index 29718f890b7..813747e58f8 100644 --- a/Modules/Core/Common/test/itkSliceIteratorTest.cxx +++ b/Modules/Core/Common/test/itkSliceIteratorTest.cxx @@ -191,7 +191,7 @@ itkSliceIteratorTest(int, char *[]) PrintSlice(vnsi2); } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return 2; diff --git a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx index 43327ca91af..2ed85e36d1e 100644 --- a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx @@ -93,7 +93,7 @@ itkSymmetricSecondRankTensorImageReadTest(int ac, char * av[]) { matrixWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -110,7 +110,7 @@ itkSymmetricSecondRankTensorImageReadTest(int ac, char * av[]) { tensorReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx index ac007178a54..84e01ede2e4 100644 --- a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx @@ -78,7 +78,7 @@ itkSymmetricSecondRankTensorImageWriteReadTest(int ac, char * av[]) { tensorWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -94,7 +94,7 @@ itkSymmetricSecondRankTensorImageWriteReadTest(int ac, char * av[]) { tensorReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkTimeStampTest.cxx b/Modules/Core/Common/test/itkTimeStampTest.cxx index 165192097aa..e4bac2e289a 100644 --- a/Modules/Core/Common/test/itkTimeStampTest.cxx +++ b/Modules/Core/Common/test/itkTimeStampTest.cxx @@ -169,7 +169,7 @@ itkTimeStampTest(int, char *[]) prev_mtime = max_mtime; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "[TEST FAILED]" << std::endl; std::cerr << "Exception caught: " << e << std::endl; diff --git a/Modules/Core/Common/test/itkVariableSizeMatrixTest.cxx b/Modules/Core/Common/test/itkVariableSizeMatrixTest.cxx index 3784d685be4..f06318dc411 100644 --- a/Modules/Core/Common/test/itkVariableSizeMatrixTest.cxx +++ b/Modules/Core/Common/test/itkVariableSizeMatrixTest.cxx @@ -182,7 +182,7 @@ itkVariableSizeMatrixTest(int, char *[]) { std::cout << d34 * darray << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { (&e)->Print(std::cout); } @@ -191,7 +191,7 @@ itkVariableSizeMatrixTest(int, char *[]) { std::cout << d34 * d53 << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { (&e)->Print(std::cout); } @@ -200,7 +200,7 @@ itkVariableSizeMatrixTest(int, char *[]) { std::cout << d34 + d53 << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { (&e)->Print(std::cout); } @@ -209,7 +209,7 @@ itkVariableSizeMatrixTest(int, char *[]) { std::cout << d34 - d53 << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { (&e)->Print(std::cout); } @@ -218,7 +218,7 @@ itkVariableSizeMatrixTest(int, char *[]) { d34 += d53; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { (&e)->Print(std::cout); } @@ -227,7 +227,7 @@ itkVariableSizeMatrixTest(int, char *[]) { d34 -= d53; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { (&e)->Print(std::cout); } diff --git a/Modules/Core/Common/test/itkVersorTest.cxx b/Modules/Core/Common/test/itkVersorTest.cxx index 0089febb4ec..d531d21a3ac 100644 --- a/Modules/Core/Common/test/itkVersorTest.cxx +++ b/Modules/Core/Common/test/itkVersorTest.cxx @@ -249,7 +249,7 @@ itkVersorTest(int, char *[]) qa.Set(xa, angle); return EXIT_FAILURE; } // setting the axis to (0,0,0) should throw an exception - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught expected exception: " << excp; std::cout << " PASSED !" << std::endl; @@ -693,7 +693,7 @@ itkVersorTest(int, char *[]) vv.Set(mm); return EXIT_FAILURE; } // should always get here, mm isn't a rotation - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught expected exception: " << excp; } diff --git a/Modules/Core/Mesh/test/itkAutomaticTopologyMeshSourceTest.cxx b/Modules/Core/Mesh/test/itkAutomaticTopologyMeshSourceTest.cxx index 15092d223d2..62813695fec 100644 --- a/Modules/Core/Mesh/test/itkAutomaticTopologyMeshSourceTest.cxx +++ b/Modules/Core/Mesh/test/itkAutomaticTopologyMeshSourceTest.cxx @@ -194,7 +194,7 @@ itkAutomaticTopologyMeshSourceTest(int, char *[]) { meshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx b/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx index 5b5696987f6..b6f0476b604 100644 --- a/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx +++ b/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx @@ -115,7 +115,7 @@ itkBinaryMask3DMeshSourceTest(int argc, char * argv[]) { meshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkExtractMeshConnectedRegionsTest.cxx b/Modules/Core/Mesh/test/itkExtractMeshConnectedRegionsTest.cxx index 4485ecf41fe..a406f490985 100644 --- a/Modules/Core/Mesh/test/itkExtractMeshConnectedRegionsTest.cxx +++ b/Modules/Core/Mesh/test/itkExtractMeshConnectedRegionsTest.cxx @@ -98,7 +98,7 @@ itkExtractMeshConnectedRegionsTest(int, char *[]) { connect->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx index 4adba988788..ccea0584dc6 100644 --- a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx @@ -92,7 +92,7 @@ InternalTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; @@ -159,7 +159,7 @@ InternalTest(int argc, char * argv[]) { parametricFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Error: " << e.what() << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest.cxx b/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest.cxx index 07db518c8f5..c8b44bb06a6 100644 --- a/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest.cxx +++ b/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest.cxx @@ -52,7 +52,7 @@ itkRegularSphereMeshSourceTest(int, char *[]) { mySphereMeshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx index d25357afed3..ac7305e482e 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx @@ -49,7 +49,7 @@ itkTriangleMeshToBinaryImageFilterTest3(int argc, char * argv[]) { polyDataReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx index db96427cd5b..e5e3bbe9bbc 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx @@ -51,7 +51,7 @@ itkTriangleMeshToBinaryImageFilterTest4(int argc, char * argv[]) { polyDataReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; @@ -148,7 +148,7 @@ itkTriangleMeshToBinaryImageFilterTest4(int argc, char * argv[]) { imageFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; @@ -204,7 +204,7 @@ itkTriangleMeshToBinaryImageFilterTest4(int argc, char * argv[]) { imageFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; @@ -254,7 +254,7 @@ itkTriangleMeshToBinaryImageFilterTest4(int argc, char * argv[]) { imageFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkVTKPolyDataReaderTest.cxx b/Modules/Core/Mesh/test/itkVTKPolyDataReaderTest.cxx index aee0ba30fce..ad4f4006270 100644 --- a/Modules/Core/Mesh/test/itkVTKPolyDataReaderTest.cxx +++ b/Modules/Core/Mesh/test/itkVTKPolyDataReaderTest.cxx @@ -42,7 +42,7 @@ itkVTKPolyDataReaderTest(int argc, char * argv[]) { polyDataReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest02.cxx b/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest02.cxx index ddb5fd02cfe..a7a0729aa24 100644 --- a/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest02.cxx +++ b/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest02.cxx @@ -59,7 +59,7 @@ itkVTKPolyDataWriterTest02(int argc, char * argv[]) { mySphereMeshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx index aa63fa41fa6..a457651a3cb 100644 --- a/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx @@ -110,7 +110,7 @@ itkWarpMeshFilterTest(int, char *[]) { warpFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception: " << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1.cxx index 972842028d6..0e83e98187c 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1.cxx @@ -58,7 +58,7 @@ itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1(int argc, char * argv[]) { mySphereMeshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during source Update() " << std::endl; std::cerr << excp << std::endl; @@ -111,7 +111,7 @@ itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during writer Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataIOQuadEdgeMeshTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataIOQuadEdgeMeshTest.cxx index dc690d6459f..62de2951a7a 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataIOQuadEdgeMeshTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataIOQuadEdgeMeshTest.cxx @@ -50,7 +50,7 @@ itkVTKPolyDataIOQuadEdgeMeshTest(int argc, char * argv[]) { polyDataReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; @@ -67,7 +67,7 @@ itkVTKPolyDataIOQuadEdgeMeshTest(int argc, char * argv[]) { polyDataWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx index e10d0940036..e5bd8b43418 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx @@ -43,7 +43,7 @@ itkVTKPolyDataReaderQuadEdgeMeshTest(int argc, char * argv[]) { polyDataReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx index 29268bba91e..85d71721249 100644 --- a/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx @@ -153,7 +153,7 @@ itkBoxSpatialObjectTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Core/SpatialObjects/test/itkContourSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkContourSpatialObjectTest.cxx index 9f9ebb26c40..83d0531c159 100644 --- a/Modules/Core/SpatialObjects/test/itkContourSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkContourSpatialObjectTest.cxx @@ -241,9 +241,10 @@ itkContourSpatialObjectTest(int, char *[]) { contour->Update(); } - catch (itk::ExceptionObject excp) + catch (const itk::ExceptionObject & excp) { std::cout << "[FAILED] failed Update()" << std::endl; + std::cerr << excp << std::endl; return EXIT_FAILURE; } std::cout << "[PASSED] Update()" << std::endl; diff --git a/Modules/Core/TestKernel/include/itkTestingMacros.h b/Modules/Core/TestKernel/include/itkTestingMacros.h index 511d40c4988..38b789a22cd 100644 --- a/Modules/Core/TestKernel/include/itkTestingMacros.h +++ b/Modules/Core/TestKernel/include/itkTestingMacros.h @@ -95,7 +95,7 @@ namespace itk std::cerr << " In " __FILE__ ", line " << __LINE__ << std::endl; \ return EXIT_FAILURE; \ } \ - catch (itk::ExceptionObject & excp) \ + catch (const itk::ExceptionObject & excp) \ { \ std::cout << "Caught expected exception" << std::endl; \ std::cout << excp << std::endl; \ @@ -108,7 +108,7 @@ namespace itk std::cout << "Trying " << #command << std::endl; \ command; \ } \ - catch (itk::ExceptionObject & excp) \ + catch (const itk::ExceptionObject & excp) \ { \ std::cerr << excp << std::endl; \ std::cerr << " In " __FILE__ ", line " << __LINE__ << std::endl; \ diff --git a/Modules/Core/TestKernel/src/itkTestDriver.cxx b/Modules/Core/TestKernel/src/itkTestDriver.cxx index 0428f040fcc..5c2ce9ecc37 100644 --- a/Modules/Core/TestKernel/src/itkTestDriver.cxx +++ b/Modules/Core/TestKernel/src/itkTestDriver.cxx @@ -269,7 +269,7 @@ main(int ac, char * av[]) { RegisterRequiredFactories(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { err.Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx b/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx index b93989ca146..90fe0f74f3b 100644 --- a/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx +++ b/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx @@ -482,7 +482,7 @@ RegressionTestHelper(const char * testImageFilename, { baselineReader->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected while reading " << baselineImageFilename << " : " << e.GetDescription(); return itk::NumericTraits::max(); @@ -495,7 +495,7 @@ RegressionTestHelper(const char * testImageFilename, { testReader->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected while reading " << testImageFilename << " : " << e.GetDescription() << std::endl; return itk::NumericTraits::max(); @@ -772,7 +772,7 @@ RegressionTestImage(const char * testImageFilename, return itk::NumericTraits::max(); } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected while reading " << baselineImageFilename << " : " << e.GetDescription(); return itk::NumericTraits::max(); @@ -794,7 +794,7 @@ ComputeHash(const char * testImageFilename) { testReader->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected while reading " << testImageFilename << " : " << e.GetDescription() << std::endl; throw; // re-throw diff --git a/Modules/Core/TestKernel/src/itkTestDriverIncludeRequiredIOFactories.cxx b/Modules/Core/TestKernel/src/itkTestDriverIncludeRequiredIOFactories.cxx index 3b1ec60ca6b..f07feccb2af 100644 --- a/Modules/Core/TestKernel/src/itkTestDriverIncludeRequiredIOFactories.cxx +++ b/Modules/Core/TestKernel/src/itkTestDriverIncludeRequiredIOFactories.cxx @@ -77,7 +77,7 @@ ProcessArgumentsAndRegisterRequiredFactories(int * ac, ArgumentStringType * av) { RegisterRequiredFactories(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error during registration of required factories: " << error << std::endl; } diff --git a/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx b/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx index 41e92f45f41..3fd016c50b1 100644 --- a/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx +++ b/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx @@ -130,7 +130,7 @@ itkTestingExtractSliceImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx index 7a596fbe5d5..1f29cdac51b 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx @@ -297,7 +297,7 @@ itkBSplineDeformableTransformTest1() { transform->TransformVector(vector); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -321,7 +321,7 @@ itkBSplineDeformableTransformTest1() { transform->TransformCovariantVector(vector); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -345,7 +345,7 @@ itkBSplineDeformableTransformTest1() { transform->TransformVector(vector); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -367,7 +367,7 @@ itkBSplineDeformableTransformTest1() temp.Fill(4.0); transform->SetParameters(temp); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -507,7 +507,7 @@ itkBSplineDeformableTransformTest2() { outputPoint = transform->TransformPoint(inputPoint); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Expected exception:" << std::endl; std::cout << err << std::endl; @@ -562,7 +562,7 @@ itkBSplineDeformableTransformTest2() std::cout << " OutputPoint: " << outputPoint; std::cout << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx index b6f9d1ad4f8..483661f883d 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx @@ -85,7 +85,7 @@ class BSplineDeformableTransformTest2Helper { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -209,7 +209,7 @@ class BSplineDeformableTransformTest2Helper { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -261,7 +261,7 @@ class BSplineDeformableTransformTest2Helper { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx index f59ecb42317..a43ac33c894 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx @@ -86,7 +86,7 @@ class BSplineDeformableTransformTest3Helper { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -223,7 +223,7 @@ class BSplineDeformableTransformTest3Helper { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -275,7 +275,7 @@ class BSplineDeformableTransformTest3Helper { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx index 6d4685ccddd..66a8085b666 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx @@ -61,7 +61,7 @@ itkBSplineTransformInitializerTest1(int argc, char * argv[]) { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -156,7 +156,7 @@ itkBSplineTransformInitializerTest1(int argc, char * argv[]) { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -208,7 +208,7 @@ itkBSplineTransformInitializerTest1(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx index d5fcc9ca5b0..7919f45d635 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx @@ -64,7 +64,7 @@ itkBSplineTransformInitializerTest2(int argc, char * argv[]) { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest.cxx index a9a6822293f..d5457a497a2 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest.cxx @@ -333,7 +333,7 @@ itkBSplineTransformTest1() { transform->TransformVector(vector); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -357,7 +357,7 @@ itkBSplineTransformTest1() { transform->TransformCovariantVector(vector); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -381,7 +381,7 @@ itkBSplineTransformTest1() { transform->TransformVector(vector); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -403,7 +403,7 @@ itkBSplineTransformTest1() temp.Fill(4.0); transform->SetParameters(temp); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception." << std::endl; std::cout << err << std::endl; @@ -585,7 +585,7 @@ itkBSplineTransformTest2() std::cout << " OutputPoint: " << outputPoint; std::cout << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx index e50a614850d..e4f0409269e 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx @@ -85,7 +85,7 @@ class BSplineTransformTest2Helper { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -185,7 +185,7 @@ class BSplineTransformTest2Helper { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -237,7 +237,7 @@ class BSplineTransformTest2Helper { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx index 85b051cc1b9..58313600ad7 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx @@ -85,7 +85,7 @@ class BSplineTransformTest3Helper { fixedReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -210,7 +210,7 @@ class BSplineTransformTest3Helper { movingWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -262,7 +262,7 @@ class BSplineTransformTest3Helper { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Core/Transform/test/itkCompositeTransformTest.cxx b/Modules/Core/Transform/test/itkCompositeTransformTest.cxx index 22758f65fc1..c09a4c31d5a 100644 --- a/Modules/Core/Transform/test/itkCompositeTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCompositeTransformTest.cxx @@ -888,7 +888,7 @@ itkCompositeTransformTest(int, char *[]) { compositeTransform->SetParameters(parametersTruth); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { caught = true; std::cout << "\nCaught expected exception:" << std::endl; diff --git a/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx b/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx index 49c7ab0bb45..14d3a9a79a4 100644 --- a/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx @@ -388,7 +388,7 @@ itkEuler3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & itkNotUsed(err)) + catch (const itk::ExceptionObject & itkNotUsed(err)) { Ok = true; } @@ -420,7 +420,7 @@ itkEuler3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; diff --git a/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx b/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx index 4bc6adb3612..801446fd0ad 100644 --- a/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx +++ b/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx @@ -769,7 +769,7 @@ itkQuaternionRigidTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & itkNotUsed(err)) + catch (const itk::ExceptionObject & itkNotUsed(err)) { Ok = true; } @@ -801,7 +801,7 @@ itkQuaternionRigidTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; diff --git a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx index 56f5b9eb35b..0642e69846d 100644 --- a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx @@ -512,7 +512,7 @@ itkRigid3DTransformTest(int, char *[]) { t->SetParameters(p); } - catch (itk::ExceptionObject & itkNotUsed(err)) + catch (const itk::ExceptionObject & itkNotUsed(err)) { Ok = true; } @@ -555,7 +555,7 @@ itkRigid3DTransformTest(int, char *[]) { t->SetParameters(p); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; @@ -639,7 +639,7 @@ itkRigid3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & itkNotUsed(err)) + catch (const itk::ExceptionObject & itkNotUsed(err)) { Ok = true; } @@ -661,7 +661,7 @@ itkRigid3DTransformTest(int, char *[]) { t->SetMatrix(matrix, 1000); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; @@ -692,7 +692,7 @@ itkRigid3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; diff --git a/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx b/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx index 225bcd93241..965042fca85 100644 --- a/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx @@ -113,7 +113,7 @@ itkScaleVersor3DTransformTest(int, char *[]) std::cerr << "ERROR: Missed expected exception when calling SetMatrix() " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & itkNotUsed(excp)) + catch (const itk::ExceptionObject & itkNotUsed(excp)) { std::cerr << "Got Normal expected exception when calling SetMatrix() " << std::endl; } @@ -552,7 +552,7 @@ itkScaleVersor3DTransformTest(int, char *[]) std::cerr << "ERROR: Missed an expected exceptions from ComputeMatrixParameters() " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & itkNotUsed(excp)) + catch (const itk::ExceptionObject & itkNotUsed(excp)) { std::cout << "Got Correct expected exception from ComputeMatrixParameters() " << std::endl; } diff --git a/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx b/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx index 787f482d77c..74a2d0c16cd 100644 --- a/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx @@ -533,7 +533,7 @@ itkSimilarity3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception" << err << std::endl; Ok = true; @@ -568,7 +568,7 @@ itkSimilarity3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; diff --git a/Modules/Core/Transform/test/itkTestTransformGetInverse.cxx b/Modules/Core/Transform/test/itkTestTransformGetInverse.cxx index 0f665cb73df..b018805e84d 100644 --- a/Modules/Core/Transform/test/itkTestTransformGetInverse.cxx +++ b/Modules/Core/Transform/test/itkTestTransformGetInverse.cxx @@ -91,7 +91,7 @@ TransformTest() { threader->SingleMethodExecute(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "ITK Exception " << excp.what() << std::endl; return 1; diff --git a/Modules/Core/Transform/test/itkTransformTest.cxx b/Modules/Core/Transform/test/itkTransformTest.cxx index 41c5a742716..4937987dd4f 100644 --- a/Modules/Core/Transform/test/itkTransformTest.cxx +++ b/Modules/Core/Transform/test/itkTransformTest.cxx @@ -248,7 +248,7 @@ class TransformTester { transform->SetParameters(parameters); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -257,7 +257,7 @@ class TransformTester { transform->GetParameters(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -267,7 +267,7 @@ class TransformTester { transform->ComputeJacobianWithRespectToParameters(pnt, jacobian); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -277,7 +277,7 @@ class TransformTester { transform->ComputeJacobianWithRespectToPosition(pnt, jacobian_position); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -287,7 +287,7 @@ class TransformTester { transform->ComputeInverseJacobianWithRespectToPosition(pnt, inv_jacobian_position); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -298,7 +298,7 @@ class TransformTester { transform->UpdateTransformParameters(update); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } diff --git a/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx b/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx index 07c05c01b8a..f6bdc754ee6 100644 --- a/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx @@ -453,7 +453,7 @@ itkVersorRigid3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & itkNotUsed(err)) + catch (const itk::ExceptionObject & itkNotUsed(err)) { Ok = true; } @@ -485,7 +485,7 @@ itkVersorRigid3DTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; diff --git a/Modules/Core/Transform/test/itkVersorTransformTest.cxx b/Modules/Core/Transform/test/itkVersorTransformTest.cxx index 3fb4ba2e84c..0fb67ff1688 100644 --- a/Modules/Core/Transform/test/itkVersorTransformTest.cxx +++ b/Modules/Core/Transform/test/itkVersorTransformTest.cxx @@ -389,7 +389,7 @@ itkVersorTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & itkNotUsed(err)) + catch (const itk::ExceptionObject & itkNotUsed(err)) { Ok = true; } @@ -421,7 +421,7 @@ itkVersorTransformTest(int, char *[]) { t->SetMatrix(matrix); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; Ok = false; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkCurvatureAnisotropicDiffusionImageFilterTest.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkCurvatureAnisotropicDiffusionImageFilterTest.cxx index 753d8e74a0b..8cbefc79abd 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkCurvatureAnisotropicDiffusionImageFilterTest.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkCurvatureAnisotropicDiffusionImageFilterTest.cxx @@ -50,7 +50,7 @@ itkCurvatureAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itk test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest.cxx index a8bbc553d8d..c92af7be0ed 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest.cxx @@ -54,7 +54,7 @@ itkGradientAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itkN test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx index 8b55b1dd9f8..121106573d9 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx @@ -94,7 +94,7 @@ itkGradientAnisotropicDiffusionImageFilterTest2(int ac, char * av[]) { caster->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; @@ -133,7 +133,7 @@ itkGradientAnisotropicDiffusionImageFilterTest2(int ac, char * av[]) { filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx index 0a20c7ffb94..35d0333dd32 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx @@ -309,7 +309,7 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s denoiser->SetDifferenceFunction(wrongFunction); denoiser->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; std::cout << "Caught expected exception." << std::endl; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkVectorAnisotropicDiffusionImageFilterTest.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkVectorAnisotropicDiffusionImageFilterTest.cxx index a6a28d11adf..fbe1d9062e8 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkVectorAnisotropicDiffusionImageFilterTest.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkVectorAnisotropicDiffusionImageFilterTest.cxx @@ -75,7 +75,7 @@ itkVectorAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itkNot test2.SetFilter(filter2); test2.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx index f8ea66bee13..cb5d0c17ac3 100644 --- a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx @@ -74,7 +74,7 @@ WriteImage(const TImage * out, const char * filename) { w->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << error << std::endl; } @@ -300,7 +300,7 @@ N4(int argc, char * argv[]) { correcter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx index 56ef01b1f93..ea2bf9527ea 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx @@ -165,7 +165,7 @@ itkBinaryDilateImageFilterTest(int, char *[]) } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx index 39aa57e2a2f..e8be8fb5f40 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx @@ -165,7 +165,7 @@ itkBinaryDilateImageFilterTest2(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; @@ -200,7 +200,7 @@ itkBinaryDilateImageFilterTest2(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx index 69009bf7903..708a5482f19 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx @@ -114,7 +114,7 @@ itkBinaryDilateImageFilterTest3(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx index 4bdbb85a339..33b25f740bd 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx @@ -165,7 +165,7 @@ itkBinaryErodeImageFilterTest(int, char *[]) } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx index 6980d67980d..b17c8397a5b 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx @@ -114,7 +114,7 @@ itkBinaryErodeImageFilterTest3(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx index 15fb2f27b3f..b7b90776541 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx @@ -86,7 +86,7 @@ itkBinaryMorphologicalClosingImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx index 289b4ba5a6f..13807d6ad2c 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx @@ -83,7 +83,7 @@ itkBinaryMorphologicalOpeningImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx index 4f3e76be478..be2dc76eb8b 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx @@ -67,7 +67,7 @@ itkBinaryThinningImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx index 0910ed96c4e..254dced2831 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx @@ -179,7 +179,7 @@ itkErodeObjectMorphologyImageFilterTest(int, char *[]) } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx index 901d937529f..aa2361b062d 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx @@ -72,7 +72,7 @@ itkConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx index 67de285d19f..42274f833cc 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx @@ -69,7 +69,7 @@ itkConvolutionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -89,7 +89,7 @@ itkConvolutionImageFilterTest(int argc, char * argv[]) std::cerr << "Failed to throw expected exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << excp << std::endl; std::cout << "caught EXPECTED exception for empty image as input" << std::endl; @@ -176,7 +176,7 @@ itkConvolutionImageFilterTest(int argc, char * argv[]) std::cerr << "Failed to catch expected exception when kernel is larger than the input image." << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception when kernel is larger than the input image." << std::endl; std::cout << e << std::endl; @@ -196,7 +196,7 @@ itkConvolutionImageFilterTest(int argc, char * argv[]) << "possible region." << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception when request region is outside the largest " << "possible region." << std::endl; diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx index 96e464cd5b8..146b9cd6df0 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx @@ -99,7 +99,7 @@ itkConvolutionImageFilterTestInt(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx index 3b21e1a6cb9..b66702b87a1 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx @@ -72,7 +72,7 @@ itkFFTConvolutionImageFilterTest(int argc, char * argv[]) std::cerr << "Failed to throw expected exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << excp << std::endl; std::cout << "Caught EXPECTED exception for empty image as input" << std::endl; diff --git a/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx index b1bc602db76..1e6d4198144 100644 --- a/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx @@ -92,7 +92,7 @@ itkFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx index ff322a83184..aa04bb048cf 100644 --- a/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx @@ -115,7 +115,7 @@ itkMaskedFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx index 68801167981..7faea6df273 100644 --- a/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx @@ -102,7 +102,7 @@ itkNormalizedCorrelationImageFilterTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx b/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx index f8685f8e55c..131a1058542 100644 --- a/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx +++ b/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx @@ -268,7 +268,7 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz denoiser->SetDifferenceFunction(wrongFunction); denoiser->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; std::cout << "Caught expected exception." << std::endl; diff --git a/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx b/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx index 8ae56c3ac1b..d647e102f5a 100644 --- a/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx +++ b/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx @@ -128,7 +128,7 @@ itkCurvatureFlowTest(int argc, char * argv[]) std::cout << "Test when input is nullptr." << std::endl; filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -162,7 +162,7 @@ itkCurvatureFlowTest(int argc, char * argv[]) filter->SetDifferenceFunction(function); filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx index 8e81db640ee..eb21dd6eff8 100644 --- a/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx @@ -92,7 +92,7 @@ itkInverseDeconvolutionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Deconvolution/test/itkLandweberDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkLandweberDeconvolutionImageFilterTest.cxx index 7f38568adf6..e67eb5261aa 100644 --- a/Modules/Filtering/Deconvolution/test/itkLandweberDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkLandweberDeconvolutionImageFilterTest.cxx @@ -88,7 +88,7 @@ itkLandweberDeconvolutionImageFilterTest(int argc, char * argv[]) writer->SetInput(deconvolutionFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught when writing deconvolution image: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx index df85242fa65..c3ef53866e2 100644 --- a/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx @@ -200,7 +200,7 @@ itkParametricBlindLeastSquaresDeconvolutionImageFilterTest(int argc, char * argv writer->SetInput(deconvolutionFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught when writing deconvolution image: " << e << std::endl; return EXIT_FAILURE; @@ -233,7 +233,7 @@ itkParametricBlindLeastSquaresDeconvolutionImageFilterTest(int argc, char * argv writer->SetInput(convolutionFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught when writing convolution image: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Deconvolution/test/itkProjectedLandweberDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkProjectedLandweberDeconvolutionImageFilterTest.cxx index a6d44a0d517..d0e0bd79946 100644 --- a/Modules/Filtering/Deconvolution/test/itkProjectedLandweberDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkProjectedLandweberDeconvolutionImageFilterTest.cxx @@ -76,7 +76,7 @@ itkProjectedLandweberDeconvolutionImageFilterTest(int argc, char * argv[]) writer->SetInput(deconvolutionFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught when writing deconvolution image: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx index 67f0de7b907..a25f5a9b763 100644 --- a/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx @@ -65,7 +65,7 @@ itkRichardsonLucyDeconvolutionImageFilterTest(int argc, char * argv[]) writer->SetInput(convolutionFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught when writing convolution image: " << e << std::endl; return EXIT_FAILURE; @@ -96,7 +96,7 @@ itkRichardsonLucyDeconvolutionImageFilterTest(int argc, char * argv[]) writer->SetInput(deconvolutionFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught when writing deconvolution image: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx index 7b3de3e64e6..0f1f585bda2 100644 --- a/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx @@ -93,7 +93,7 @@ itkTikhonovDeconvolutionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx index 410b158613b..b2e51edfd15 100644 --- a/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx @@ -91,7 +91,7 @@ itkWienerDeconvolutionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx index 7e4e39ed93c..ff492fc7f15 100644 --- a/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx @@ -62,7 +62,7 @@ itkComposeDisplacementFieldsImageFilterTest(int, char *[]) { composer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx index cbd2dbf1bb3..784e3be5fe1 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx @@ -140,7 +140,7 @@ itkDisplacementFieldJacobianDeterminantFilterTest(int, char *[]) test1.Execute(); filter->Print(std::cout); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx index 6a6ef6a4d32..0c44a1c6ff3 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx @@ -109,7 +109,7 @@ itkDisplacementFieldToBSplineImageFilterTest(int, char *[]) { bspliner->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -168,7 +168,7 @@ itkDisplacementFieldToBSplineImageFilterTest(int, char *[]) { bspliner2->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx index c0c5a6b8d21..5172958ba14 100644 --- a/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx @@ -111,7 +111,7 @@ itkInverseDisplacementFieldImageFilterTest(int argc, char * argv[]) { filter->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -129,7 +129,7 @@ itkInverseDisplacementFieldImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown by writer" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx index 37586a2cd9e..0e43a423357 100644 --- a/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx @@ -98,7 +98,7 @@ itkInvertDisplacementFieldImageFilterTest(int, char *[]) { inverter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkIterativeInverseDisplacementFieldImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkIterativeInverseDisplacementFieldImageFilterTest.cxx index 47f5aa61717..f648ead88fb 100644 --- a/Modules/Filtering/DisplacementField/test/itkIterativeInverseDisplacementFieldImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkIterativeInverseDisplacementFieldImageFilterTest.cxx @@ -109,7 +109,7 @@ itkIterativeInverseDisplacementFieldImageFilterTest(int argc, char * argv[]) { filter->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -128,7 +128,7 @@ itkIterativeInverseDisplacementFieldImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown by writer" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx b/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx index 5be484b55b2..a6c8be12ba5 100644 --- a/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx @@ -118,7 +118,7 @@ itkLandmarkDisplacementFieldSourceTest(int argc, char * argv[]) { filter->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; @@ -136,7 +136,7 @@ itkLandmarkDisplacementFieldSourceTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown by writer" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx index 719ddcaa52b..983d56d94a6 100644 --- a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx @@ -178,7 +178,7 @@ itkTransformToDisplacementFieldFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while generating displacement field" << fileName << std::endl; std::cerr << " : " << err << std::endl; diff --git a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx index 2b00eef36e7..3c6bafaa4b2 100644 --- a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx +++ b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx @@ -190,7 +190,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) { writer1->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while writing image " << resampledImageFileName; std::cerr << " : " << err << std::endl; @@ -206,7 +206,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) { defGenerator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while generating deformation field"; std::cerr << " : " << err << std::endl; @@ -225,7 +225,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) { warper->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while warping image"; std::cerr << " : " << err << std::endl; @@ -238,7 +238,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception detected while writing image " << displacementFieldFileName; std::cerr << " : " << err << std::endl; diff --git a/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx index 97b7dbf75ad..1d048f22ff5 100644 --- a/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx @@ -105,7 +105,7 @@ FastChamferDistanceImageFilterTest(unsigned int iPositive, unsigned int iNegativ { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx index 18824ff94a0..ca7d12ac799 100644 --- a/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx @@ -128,7 +128,7 @@ itkIsoContourDistanceImageFilterTest(int, char *[]) { caster->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; @@ -162,7 +162,7 @@ itkIsoContourDistanceImageFilterTest(int, char *[]) { isocontour->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx index fe47acbaab3..625e825dd4e 100644 --- a/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx @@ -82,7 +82,7 @@ transformImage(const char * inputImageFileName, const char * outputImageFileName { writer->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << error << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx index b0f6aaceaa3..5ebe9bb3c24 100644 --- a/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx @@ -64,7 +64,7 @@ itkFFTShiftImageFilterTest(int argc, char * argv[]) std::cerr << "Failed to throw expected exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << excp << std::endl; std::cout << "catched EXPECTED exception for emtpy image as input" << std::endl; @@ -105,7 +105,7 @@ itkFFTShiftImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/FFT/test/itkFFTTest.h b/Modules/Filtering/FFT/test/itkFFTTest.h index 542b039df0d..2b19bb4f75a 100644 --- a/Modules/Filtering/FFT/test/itkFFTTest.h +++ b/Modules/Filtering/FFT/test/itkFFTTest.h @@ -113,7 +113,7 @@ test_fft(unsigned int * SizeOfDimensions) } std::cout << std::endl << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return -1; @@ -133,7 +133,7 @@ test_fft(unsigned int * SizeOfDimensions) { R2C->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return -1; @@ -334,7 +334,7 @@ test_fft_rtc(unsigned int * SizeOfDimensions) } std::cout << std::endl << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return -1; diff --git a/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx index bb2ae025465..8e420abb6b3 100644 --- a/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx @@ -81,7 +81,7 @@ transformImage(const char * inputImageFileName, const char * outputImageFileName { writer->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << error << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/FFT/test/itkRealFFTTest.h b/Modules/Filtering/FFT/test/itkRealFFTTest.h index f4dc62f25a6..9ed1fdb873c 100644 --- a/Modules/Filtering/FFT/test/itkRealFFTTest.h +++ b/Modules/Filtering/FFT/test/itkRealFFTTest.h @@ -99,7 +99,7 @@ test_fft(unsigned int * SizeOfDimensions) } std::cout << std::endl << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return -1; @@ -120,7 +120,7 @@ test_fft(unsigned int * SizeOfDimensions) { R2C->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return -1; @@ -285,7 +285,7 @@ test_fft_rtc(unsigned int * SizeOfDimensions) } std::cout << std::endl << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { ex.Print(std::cerr); return -1; diff --git a/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx index 6d4aed8cf1d..e5381e44569 100644 --- a/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx @@ -64,7 +64,7 @@ transformImage(const char * inputImageFileName, const char * outputImageFileName { writer->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << error << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx index 73f290d1cb5..03dae809079 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx @@ -125,7 +125,7 @@ itkFastMarchingBaseTest(int argc, char * argv[]) { fmm->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -153,7 +153,7 @@ itkFastMarchingBaseTest(int argc, char * argv[]) { fmm->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx index 66570a2f80b..bd4fbe57f68 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx @@ -140,7 +140,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) { marcher->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; marcher->ResetPipeline(); @@ -164,7 +164,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) { marcher->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; marcher->ResetPipeline(); @@ -190,7 +190,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) { marcher->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; marcher->ResetPipeline(); @@ -211,7 +211,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) { marcher->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; marcher->ResetPipeline(); @@ -237,7 +237,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) { marcher->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = false; marcher->ResetPipeline(); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx index 48f073f8551..ff3abfd6e1c 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx @@ -128,7 +128,7 @@ itkFastMarchingImageFilterRealWithNumberOfElementsTest(int, char *[]) // update the marcher marcher->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << excep << std::endl; return EXIT_FAILURE; @@ -152,7 +152,7 @@ itkFastMarchingImageFilterRealWithNumberOfElementsTest(int, char *[]) { thresholder->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx index 36b4b4ea83e..4f81ecca57b 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx @@ -55,7 +55,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -81,7 +81,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { labelImageReader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -100,7 +100,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { contour->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -160,7 +160,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { fastMarching->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -180,7 +180,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { thresholder->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -197,7 +197,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -217,7 +217,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { internal_writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -236,7 +236,7 @@ FastMarchingImageFilter(unsigned int argc, char * argv[]) { mapWriter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx index a535135d9af..a5ed64c11ac 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx @@ -88,7 +88,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest(int, char *[]) { fmm_filter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx index 31714dccdb6..f36bd317fa1 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx @@ -116,7 +116,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest2(int, char *[]) { fmm_filter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx index d4cf91068c1..2697285b3ce 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx @@ -122,7 +122,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest3(int, char *[]) { fmm_filter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx index 0c4f8bac363..e98f74311b4 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx @@ -118,7 +118,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest4(int, char *[]) { fmm_filter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx index 00687f02781..b6f6f710804 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx @@ -87,7 +87,7 @@ itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest(int, char *[]) { fmm_filter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx b/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx index 9405d3264d4..1ee6283805a 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx @@ -107,7 +107,7 @@ runGPUGradientAnisotropicDiffusionImageFilterTest(const std::string & inFile, co { GPUFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught exception during GPUFilter->Update() " << excp << std::endl; return EXIT_FAILURE; @@ -117,7 +117,7 @@ runGPUGradientAnisotropicDiffusionImageFilterTest(const std::string & inFile, co { GPUFilter->GetOutput()->UpdateBuffers(); // synchronization point } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught exception during GPUFilter->GetOutput()->UpdateBuffers() " << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx index bac7ebde450..ada019d95c5 100644 --- a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx @@ -172,7 +172,7 @@ Stapler::Execute() reader->Update(); m_Stapler->SetInput(itk::Math::CastWithRangeCheck(i), reader->GetOutput()); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return -1; @@ -185,7 +185,7 @@ Stapler::Execute() writer->SetInput(m_Stapler->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return -2; diff --git a/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx index 2560d3b3ae3..252d9c48325 100644 --- a/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx @@ -97,7 +97,7 @@ itkSimilarityIndexImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an unexpected exception" << std::endl; std::cout << err; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx index c2202cac29e..63748c0deac 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx @@ -69,7 +69,7 @@ itkCompose2DCovariantVectorImageFilterTest(int, char *[]) filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught !" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx index c80d4d75cbc..018503b150e 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx @@ -68,7 +68,7 @@ itkCompose2DVectorImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught !" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx index 25b5860d5af..275adacfb32 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx @@ -75,7 +75,7 @@ itkCompose3DCovariantVectorImageFilterTest(int, char *[]) filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught !" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx index 90f891e806c..e32ce56e1ba 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx @@ -73,7 +73,7 @@ itkCompose3DVectorImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught !" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx index 563822f416e..e95f0905436 100644 --- a/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx @@ -98,7 +98,7 @@ itkComposeRGBAImageFilterTest(int argc, char * argv[]) writer->SetInput(filterCompose->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx index 81e3692d37c..7e3fba2bc58 100644 --- a/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx @@ -75,7 +75,7 @@ itkComposeRGBImageFilterTest(int, char *[]) filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught !" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkImageReadRealAndImaginaryWriteComplexTest.cxx b/Modules/Filtering/ImageCompose/test/itkImageReadRealAndImaginaryWriteComplexTest.cxx index 7ac63bbfa46..dacea6fb523 100644 --- a/Modules/Filtering/ImageCompose/test/itkImageReadRealAndImaginaryWriteComplexTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkImageReadRealAndImaginaryWriteComplexTest.cxx @@ -79,7 +79,7 @@ itkImageReadRealAndImaginaryWriteComplexTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the magnitude image: " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx index 671e3197734..60f68d53461 100644 --- a/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx @@ -61,7 +61,7 @@ itkImageToVectorImageFilterTest(int argc, char * argv[]) writer->SetInput(filter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the file" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index 4febacac98c..14f26b25aba 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -147,7 +147,7 @@ itkJoinSeriesImageFilterTest(int, char *[]) { streamingImage->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; auto * errp = dynamic_cast(&err); @@ -215,7 +215,7 @@ itkJoinSeriesImageFilterTest(int, char *[]) std::cout << err << std::endl; passed = true; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx index 44e0ffd009c..03b14aa47ff 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx @@ -47,7 +47,7 @@ itkBilateralImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx index 86db1a2788b..d1e6c99ca6d 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx @@ -83,7 +83,7 @@ itkBilateralImageFilterTest2(int ac, char * av[]) input->Update(); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx index 3e45b766d54..c2da47c0016 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx @@ -72,7 +72,7 @@ itkBilateralImageFilterTest3(int ac, char * av[]) input->Update(); filter3->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx index f2963be951b..6252359ab66 100644 --- a/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx @@ -58,7 +58,7 @@ itkLaplacianImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { exceptionSeen = true; std::cout << "Expected exception: " << std::endl; @@ -71,7 +71,7 @@ itkLaplacianImageFilterTest(int, char *[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx index e5c932e536f..b14d80f68a0 100644 --- a/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx @@ -103,7 +103,7 @@ itkLaplacianRecursiveGaussianImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx index 4829ad681d8..dd8a04034d3 100644 --- a/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx @@ -69,7 +69,7 @@ itkMaskFeaturePointSelectionFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkMultiScaleHessianBasedMeasureImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkMultiScaleHessianBasedMeasureImageFilterTest.cxx index 7350361c3c8..03047f63899 100644 --- a/Modules/Filtering/ImageFeature/test/itkMultiScaleHessianBasedMeasureImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkMultiScaleHessianBasedMeasureImageFilterTest.cxx @@ -68,7 +68,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { imageReader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -170,7 +170,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { multiScaleEnhancementFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -184,7 +184,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -197,7 +197,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -219,7 +219,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { multiScaleEnhancementFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -233,7 +233,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -250,7 +250,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { multiScaleEnhancementFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -264,7 +264,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { writer3->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -276,7 +276,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { multiScaleEnhancementFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -287,7 +287,7 @@ itkMultiScaleHessianBasedMeasureImageFilterTest(int argc, char * argv[]) { multiScaleEnhancementFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } diff --git a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx index d090aca4c5f..2346bdb0e5d 100644 --- a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx @@ -105,7 +105,7 @@ itkSimpleContourExtractorImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during pipeline Update\n" << e; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkSobelEdgeDetectionImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkSobelEdgeDetectionImageFilterTest.cxx index a14217800d7..ee8b4a1884e 100644 --- a/Modules/Filtering/ImageFeature/test/itkSobelEdgeDetectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkSobelEdgeDetectionImageFilterTest.cxx @@ -47,7 +47,7 @@ itkSobelEdgeDetectionImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkZeroCrossingBasedEdgeDetectionImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkZeroCrossingBasedEdgeDetectionImageFilterTest.cxx index 53c7434e02d..dc6bfc8ee11 100644 --- a/Modules/Filtering/ImageFeature/test/itkZeroCrossingBasedEdgeDetectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkZeroCrossingBasedEdgeDetectionImageFilterTest.cxx @@ -45,7 +45,7 @@ itkZeroCrossingBasedEdgeDetectionImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFeature/test/itkZeroCrossingImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkZeroCrossingImageFilterTest.cxx index 0eed4cff595..7c33ccbd57f 100644 --- a/Modules/Filtering/ImageFeature/test/itkZeroCrossingImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkZeroCrossingImageFilterTest.cxx @@ -49,7 +49,7 @@ itkZeroCrossingImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx index a30cb3fb6e2..5ce37b3ff18 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx @@ -132,7 +132,7 @@ itkMaskNeighborhoodOperatorImageFilterTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Filtering/ImageFilterBase/test/itkNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkNeighborhoodOperatorImageFilterTest.cxx index 616392eb8ff..6f01d2baf15 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkNeighborhoodOperatorImageFilterTest.cxx @@ -48,7 +48,7 @@ itkNeighborhoodOperatorImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFilterBase/test/itkVectorNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkVectorNeighborhoodOperatorImageFilterTest.cxx index 9a65af3de97..ff5161c16e0 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkVectorNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkVectorNeighborhoodOperatorImageFilterTest.cxx @@ -50,7 +50,7 @@ itkVectorNeighborhoodOperatorImageFilterTest(int itkNotUsed(argc), char * itkNot test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest3.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest3.cxx index 77a007c7eb9..1a522cc38de 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest3.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest3.cxx @@ -79,7 +79,7 @@ itkLabelMapContourOverlayImageFilterTest3(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Unexpected exception." << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest3.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest3.cxx index 55be4e7c38b..792250064e2 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest3.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest3.cxx @@ -72,7 +72,7 @@ itkLabelMapOverlayImageFilterTest3(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Unexpected exception." << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx b/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx index d56f0f349b2..1464ff5b481 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx @@ -100,7 +100,7 @@ itkLabelOverlayImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx b/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx index 794eafe15ba..baaea045a04 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx @@ -76,7 +76,7 @@ itkLabelToRGBImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx index b92805d72cf..bf9eef19143 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx @@ -55,7 +55,7 @@ itkGradientImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; @@ -87,7 +87,7 @@ itkGradientImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeImageFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeImageFilterTest.cxx index 3b365ea3b7d..e74a2a2f914 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeImageFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeImageFilterTest.cxx @@ -47,7 +47,7 @@ itkGradientMagnitudeImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx index 1656fc7533d..340e66bfd43 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx @@ -73,7 +73,7 @@ itkVectorGradientMagnitudeImageFilterTest1(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx index 8e217feaeac..b6e8cee3a1a 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx @@ -104,7 +104,7 @@ itkVectorGradientMagnitudeImageFilterTest2(int ac, char * av[]) writer->SetInput(extractedImage); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx index 3ef4af07c12..c95e9650a09 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx @@ -77,7 +77,7 @@ itkVectorGradientMagnitudeImageFilterTest3(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx index ec7b6df3a7b..87031727136 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx @@ -80,7 +80,7 @@ BSpline(int argc, char * argv[]) { bspliner->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -116,7 +116,7 @@ BSpline(int argc, char * argv[]) { bspliner2->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx index 6b5f0f25fb6..534078010b5 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx @@ -77,7 +77,7 @@ itkBSplineDownsampleImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx index 1bfcb886024..fb074f02bf8 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx @@ -638,7 +638,7 @@ itkBSplineResampleImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ std::cout << "Test when Standard_l2 spline order is unsupported" << std::endl; dummyflag += test2D_Standard_l2_NthOrderSpline_filter(6); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -653,7 +653,7 @@ itkBSplineResampleImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ std::cout << "Test when Centered_l2 spline order is unsupported" << std::endl; dummyflag += test2D_Centered_l2_NthOrderSpline_filter(6); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -668,7 +668,7 @@ itkBSplineResampleImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ std::cout << "Test when Standard_L2 spline order is unsupported" << std::endl; dummyflag += test2D_Standard_L2_NthOrderSpline_filter(6); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -683,7 +683,7 @@ itkBSplineResampleImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ std::cout << "Test when Centered_L2 spline order is unsupported" << std::endl; dummyflag += test2D_Centered_L2_NthOrderSpline_filter(6); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx index a520531d1dd..d1dad0c1d11 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx @@ -77,7 +77,7 @@ itkBSplineUpsampleImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx index efe7e0e8b35..486e1705997 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx @@ -115,7 +115,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; @@ -141,7 +141,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; @@ -167,7 +167,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; @@ -193,7 +193,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; @@ -237,7 +237,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; @@ -263,7 +263,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; @@ -326,7 +326,7 @@ itkBinShrinkImageFilterTest1(int, char *[]) exit(1); } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception: " << e << std::endl; failed = true; diff --git a/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx index 9835093c05f..5ff76ec5eed 100644 --- a/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx @@ -287,7 +287,7 @@ itkChangeInformationImageFilterTest(int, char *[]) std::cout << "-----------ChangeAll(), UseReferenceOn(): " << std::endl; PrintInformation3(inputImage, filter->GetOutput(), referenceImage); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e; return -1; diff --git a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx index 4718224a358..92e54589b15 100644 --- a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx @@ -249,7 +249,7 @@ itkExpandImageFilterTest(int, char *[]) expander->SetInput(nullptr); expander->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; expander->ResetPipeline(); @@ -271,7 +271,7 @@ itkExpandImageFilterTest(int, char *[]) expander->SetInterpolator(nullptr); expander->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; expander->ResetPipeline(); diff --git a/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx index ec4f5a0c322..907d5f21eab 100644 --- a/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx @@ -68,7 +68,7 @@ itkInterpolateImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught unexpected exception: " << err << std::endl; std::cout << "Test failed. " << std::endl; @@ -116,7 +116,7 @@ itkInterpolateImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception: " << err << std::endl; pass = true; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx index 34c176a292d..746d5a3c69f 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx @@ -52,7 +52,7 @@ itkOrientedImage2DTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx index 8cf5ccd9787..15837c99315 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx @@ -52,7 +52,7 @@ itkOrientedImage3DTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx index d4a67f6f064..6a578054912 100644 --- a/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx @@ -154,7 +154,7 @@ itkPadImageFilterTest(int, char *[]) std::cerr << "Failed to catch expected exception when boundary condition is nullptr." << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception when boundary condition is nullptr." << std::endl; std::cout << e << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx index 35edaadda26..d79c90ceb17 100644 --- a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx @@ -96,7 +96,7 @@ itkPasteImageFilterTest(int argc, char * argv[]) { streamer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx index f2b47f8457c..6f831e06877 100644 --- a/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx @@ -150,7 +150,7 @@ itkPermuteAxesImageFilterTest(int, char *[]) { permuter->SetOrder(order); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; std::cout << err << std::endl; @@ -169,7 +169,7 @@ itkPermuteAxesImageFilterTest(int, char *[]) { permuter->SetOrder(order); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { passed = true; std::cout << err << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx index ac7a04770fb..57279579532 100644 --- a/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx @@ -114,7 +114,7 @@ itkPushPopTileImageFilterTest(int argc, char * argv[]) writer->SetInput(tiler->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing file." << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx index 425b939d466..7041a0eaf0a 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx @@ -145,7 +145,7 @@ itkResampleImageTest(int, char *[]) resample->SetInterpolator(nullptr); resample->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx index 05603f0991b..b0b34628ce1 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx @@ -113,7 +113,7 @@ itkResampleImageTest3(int argc, char * argv[]) { writer1->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx index cdc5df5947d..a06ff07de2e 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx @@ -108,7 +108,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -139,7 +139,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -211,7 +211,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) { badFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught expected exception" << std::endl; std::cout << excp << std::endl; @@ -230,7 +230,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) { badFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught expected exception" << std::endl; std::cout << excp << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx index aa8ced90baa..024b9bca8a4 100644 --- a/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx @@ -84,7 +84,7 @@ itkTileImageFilterTest(int argc, char * argv[]) writer->SetInput(tiler->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the series with SeriesFileNames generator" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx index 43faeb7a817..cfb75f073f4 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx @@ -363,7 +363,7 @@ itkWarpImageFilterTest(int, char *[]) warper->SetInterpolator(nullptr); warper->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; testPassed = true; diff --git a/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx index 2f4b6e91938..2b9b0082bae 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx @@ -349,7 +349,7 @@ itkWarpVectorImageFilterTest(int, char *[]) warper->SetInterpolator(nullptr); warper->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; testPassed = true; diff --git a/Modules/Filtering/ImageIntensity/test/itkAddImageFilterFrameTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAddImageFilterFrameTest.cxx index f7268f298f3..1d4307d519f 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAddImageFilterFrameTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAddImageFilterFrameTest.cxx @@ -135,7 +135,7 @@ itkAddImageFilterFrameTest(int, char *[]) std::cout << "No exception thrown for a difference in origins!" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Known exception caught (origin)! " << exc << std::endl; } @@ -155,7 +155,7 @@ itkAddImageFilterFrameTest(int, char *[]) std::cout << "No exception thrown for a difference in spacings!" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Known exception caught (spacing)! " << exc << std::endl; } @@ -176,7 +176,7 @@ itkAddImageFilterFrameTest(int, char *[]) std::cout << "No exception thrown for a difference in directions!" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Known exception caught (directions)! " << exc << std::endl; } diff --git a/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx index d1f891b48a6..c6fb94320cf 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx @@ -178,7 +178,7 @@ itkMaskImageFilterTest(int, char *[]) { vectorFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught unexpected exception when default outside value " << "is used." << e; @@ -207,7 +207,7 @@ itkMaskImageFilterTest(int, char *[]) { vectorFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught unexpected exception:" << e; return EXIT_FAILURE; @@ -229,7 +229,7 @@ itkMaskImageFilterTest(int, char *[]) << "image and non-default value is used." << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception: " << e; } @@ -243,7 +243,7 @@ itkMaskImageFilterTest(int, char *[]) { vectorFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught unexpected exception when resetting outside value " << "to vector of length 0." << e; diff --git a/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx index 0751cfcd859..cf6ba74c923 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx @@ -54,7 +54,7 @@ itkPolylineMask2DImageFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an unexpected exception. " << std::endl; std::cout << err << std::endl; @@ -119,7 +119,7 @@ itkPolylineMask2DImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an unexpected exception. " << std::endl; std::cout << err << std::endl; @@ -140,7 +140,7 @@ itkPolylineMask2DImageFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an expected exception. " << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx index d427e67dbff..52aadf7018d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx @@ -80,7 +80,7 @@ itkPromoteDimensionImageTest(int argc, char * argv[]) writer->Update(); // toChar->GetOutput()->Print(std::cout); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx index 8eaac90c324..d85df569b55 100644 --- a/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx @@ -94,7 +94,7 @@ itkShiftScaleImageFilterTest(int, char *[]) { filter->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e; return -1; diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx index b7c69ff6d66..524af423686 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx @@ -283,7 +283,7 @@ itkVectorExpandImageFilterTest(int, char *[]) expander->SetInput(nullptr); expander->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; expander->ResetPipeline(); @@ -305,7 +305,7 @@ itkVectorExpandImageFilterTest(int, char *[]) expander->SetInterpolator(nullptr); expander->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; expander->ResetPipeline(); diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx index b60a9c3a8e7..5b298b0cf01 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx @@ -66,7 +66,7 @@ itkVectorIndexSelectionCastImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e; return -1; @@ -87,7 +87,7 @@ itkVectorIndexSelectionCastImageFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught as expected: " << e; exceptionCaught = true; diff --git a/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx index eefd9b0fdd4..7fd6d533bbf 100644 --- a/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx @@ -60,7 +60,7 @@ itkAccumulateImageFilterTest(int argc, char * argv[]) reader->SetFileNames(names->GetInputFileNames()); reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error reading the series" << std::endl; std::cerr << excp << std::endl; @@ -76,7 +76,7 @@ itkAccumulateImageFilterTest(int argc, char * argv[]) { accumulate->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error running the accumulate filter" << std::endl; std::cerr << excp << std::endl; @@ -96,7 +96,7 @@ itkAccumulateImageFilterTest(int argc, char * argv[]) writer->SetInput(accumulate->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the series" << std::endl; std::cerr << excp << std::endl; @@ -115,7 +115,7 @@ itkAccumulateImageFilterTest(int argc, char * argv[]) writer->SetInput(accumulate->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the series" << std::endl; std::cerr << excp << std::endl; @@ -130,7 +130,7 @@ itkAccumulateImageFilterTest(int argc, char * argv[]) std::cout << "Failed to catch expected exception." << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Caught expected exception." << std::endl; std::cout << excp << std::endl; diff --git a/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx index 2588e650f85..29d0d7ea030 100644 --- a/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx @@ -97,7 +97,7 @@ itkBinaryProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx index ab1ad657227..a8f8c121666 100644 --- a/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx @@ -60,7 +60,7 @@ itkGetAverageSliceImageFilterTest(int argc, char * argv[]) reader->SetFileNames(names->GetInputFileNames()); reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error reading the series" << std::endl; std::cerr << excp << std::endl; @@ -76,7 +76,7 @@ itkGetAverageSliceImageFilterTest(int argc, char * argv[]) { average->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error running the average filter" << std::endl; std::cerr << excp << std::endl; @@ -94,7 +94,7 @@ itkGetAverageSliceImageFilterTest(int argc, char * argv[]) writer->SetInput(average->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error writing the series" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx index cdb95081831..586809994a4 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx @@ -45,7 +45,7 @@ itkHistogramToEntropyImageFilterTest1(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -96,7 +96,7 @@ itkHistogramToEntropyImageFilterTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx index 8c77d7cdefe..a0c78e96a5d 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx @@ -52,7 +52,7 @@ itkHistogramToEntropyImageFilterTest2(int argc, char * argv[]) reader1->Update(); reader2->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -133,7 +133,7 @@ itkHistogramToEntropyImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx index 5ae41b83c8b..9fbeef20fc5 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx @@ -45,7 +45,7 @@ itkHistogramToIntensityImageFilterTest1(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -95,7 +95,7 @@ itkHistogramToIntensityImageFilterTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx index 53259aa4110..d305b844dab 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx @@ -52,7 +52,7 @@ itkHistogramToIntensityImageFilterTest2(int argc, char * argv[]) reader1->Update(); reader2->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -133,7 +133,7 @@ itkHistogramToIntensityImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx index 4c42c15cffd..a5e1785a26b 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx @@ -45,7 +45,7 @@ itkHistogramToLogProbabilityImageFilterTest1(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -96,7 +96,7 @@ itkHistogramToLogProbabilityImageFilterTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx index 5646c808b12..1046b17c816 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx @@ -52,7 +52,7 @@ itkHistogramToLogProbabilityImageFilterTest2(int argc, char * argv[]) reader1->Update(); reader2->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -133,7 +133,7 @@ itkHistogramToLogProbabilityImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx index c479f5d9b8b..d0df234f9f5 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx @@ -45,7 +45,7 @@ itkHistogramToProbabilityImageFilterTest1(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -97,7 +97,7 @@ itkHistogramToProbabilityImageFilterTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx index 6b5656ee68f..8514ab90faa 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx @@ -52,7 +52,7 @@ itkHistogramToProbabilityImageFilterTest2(int argc, char * argv[]) reader1->Update(); reader2->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -133,7 +133,7 @@ itkHistogramToProbabilityImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx index 0862faf579d..aac126e1b54 100644 --- a/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx @@ -69,7 +69,7 @@ itkLabelStatisticsImageFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught ! " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx index f1b9588674d..75c8210acbf 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx @@ -58,7 +58,7 @@ itkMaximumProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx index 06c1efd460c..d94d2c6f327 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx @@ -65,7 +65,7 @@ itkMaximumProjectionImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx index d925778b342..1403655f0c7 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx @@ -61,7 +61,7 @@ itkMaximumProjectionImageFilterTest3(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -74,7 +74,7 @@ itkMaximumProjectionImageFilterTest3(int argc, char * argv[]) filter->SetProjectionDimension(100); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << std::endl << "Caught expected exception!"; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx index cd23026dd39..d73c2eb2290 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx @@ -57,7 +57,7 @@ itkMeanProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx index e26b09bb95e..aeba12d6098 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx @@ -58,7 +58,7 @@ itkMedianProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx index e5e8f548a8f..b5d7598f4f8 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx @@ -57,7 +57,7 @@ itkMinimumProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx index 318db16cc58..85a3778eb1f 100644 --- a/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx @@ -129,7 +129,7 @@ itkProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx index 435adde21b7..3761c9b471f 100644 --- a/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx @@ -58,7 +58,7 @@ itkStandardDeviationProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx index 7230f32e809..73af8c8040b 100644 --- a/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx @@ -60,7 +60,7 @@ itkSumProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx index a4fa579f7d5..294a0430644 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx @@ -76,7 +76,7 @@ itkShapeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) { ITK_TEST_SET_GET_VALUE(attribute, opening->GetAttribute()); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Unexpected exception detected: " << exc; return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx index f89994b97d8..343398165c5 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx @@ -86,7 +86,7 @@ itkClosingByReconstructionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught:" << excp << std::endl; return EXIT_FAILURE; @@ -104,7 +104,7 @@ itkClosingByReconstructionImageFilterTest(int argc, char * argv[]) writer->SetInput(subtract->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught writing diff image:" << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx index 75ee71b72cb..b78daea4538 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx @@ -89,7 +89,7 @@ itkFlatStructuringElementTest2(int argc, char * argv[]) { reader->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected while reading " << argv[1] << " : " << e; return 1000; @@ -131,7 +131,7 @@ itkFlatStructuringElementTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception writing test image:" << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx index c4f8a623ff5..c06c7a8465c 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx @@ -92,7 +92,7 @@ itkGrayscaleDilateImageFilterTest(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx index 574ec99bdf1..0552e788982 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx @@ -92,7 +92,7 @@ itkGrayscaleErodeImageFilterTest(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx index 4e901bfccac..3c05c791dc9 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx @@ -161,7 +161,7 @@ itkGrayscaleFunctionDilateImageFilterTest(int argc, char * argv[]) } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx index 833764a608d..3ec6efde79f 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx @@ -161,7 +161,7 @@ itkGrayscaleFunctionErodeImageFilterTest(int argc, char * argv[]) } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during filter Update\n" << e; return -1; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx index 9e8364dbe3e..c94ee58cdda 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx @@ -87,7 +87,7 @@ itkGrayscaleGeodesicErodeDilateImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught:" << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx index 3a9e59487b6..c13d61d82f7 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx @@ -99,7 +99,7 @@ itkGrayscaleMorphologicalClosingImageFilterTest2(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx index b8731b58537..421ae024925 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx @@ -99,7 +99,7 @@ itkGrayscaleMorphologicalOpeningImageFilterTest2(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx index facf48be585..c6fcd2e47a9 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx @@ -92,7 +92,7 @@ itkMapGrayscaleDilateImageFilterTest(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx index 030004e7174..96e27f5b419 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx @@ -92,7 +92,7 @@ itkMapGrayscaleErodeImageFilterTest(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx index b3f7e842a4b..b3001b39d82 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx @@ -99,7 +99,7 @@ itkMapGrayscaleMorphologicalClosingImageFilterTest(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx index 7d83884a3be..212bef934fa 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx @@ -99,7 +99,7 @@ itkMapGrayscaleMorphologicalOpeningImageFilterTest(int ac, char * av[]) writer->SetFileName(av[5]); writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx index 441713674f0..0032ae600d7 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx @@ -140,7 +140,7 @@ itkMapMaskedRankImageFilterTest(int ac, char * av[]) filter->SetBackgroundMaskValue(0); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx index 2836cd68c18..397c5e58d42 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx @@ -97,7 +97,7 @@ itkMapRankImageFilterTest(int ac, char * av[]) filter->SetRank(0.5); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx index 4992305f4bd..dde468fb51e 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx @@ -139,7 +139,7 @@ itkMaskedRankImageFilterTest(int ac, char * av[]) filter->SetBackgroundMaskValue(0); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx index 69dbba1a956..2c00b835ca2 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx @@ -63,7 +63,7 @@ itkMorphologicalGradientImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught ! " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx index fc81b86e810..c22e832cd4b 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx @@ -65,7 +65,7 @@ itkMorphologicalGradientImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught ! " << std::endl; std::cerr << excp << std::endl; @@ -80,7 +80,7 @@ itkMorphologicalGradientImageFilterTest2(int argc, char * argv[]) const int algorithmType1 = gradient->GetAlgorithm(); std::cout << "algorithmType1 : " << algorithmType1 << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; @@ -106,7 +106,7 @@ itkMorphologicalGradientImageFilterTest2(int argc, char * argv[]) const int algorithmType3 = gradient1->GetAlgorithm(); std::cout << "algorithmType : " << algorithmType3 << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx index 41aca6b93f7..df3dbcdb3bb 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx @@ -159,7 +159,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) std::cout << " Success: " << std::endl; std::cout << " Time = " << elapsedTime << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during dilate filter Update\n" << e; return -1; @@ -183,7 +183,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) std::cout << " Success: " << std::endl; std::cout << " Time = " << elapsedTime << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during dilate filter Update\n" << e; return -1; @@ -254,7 +254,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) std::cout << " Success: " << std::endl; std::cout << " Time = " << elapsedTime << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during erode filter Update\n" << e; return -1; @@ -279,7 +279,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) std::cout << " Success: " << std::endl; std::cout << " Time = " << elapsedTime << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during erode filter Update\n" << e; return -1; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx index a7323a4a753..9ad63483890 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx @@ -89,7 +89,7 @@ itkOpeningByReconstructionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught:" << excp << std::endl; return EXIT_FAILURE; @@ -108,7 +108,7 @@ itkOpeningByReconstructionImageFilterTest(int argc, char * argv[]) writer->SetInput(subtract->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught writing diff image:" << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx index d86c03c5a9f..4ceb544cb15 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx @@ -120,7 +120,7 @@ itkOpeningByReconstructionImageFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught:" << excp << std::endl; return EXIT_FAILURE; @@ -139,7 +139,7 @@ itkOpeningByReconstructionImageFilterTest2(int argc, char * argv[]) writer->SetInput(subtract->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught writing diff image:" << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx index c4d9c5f30b5..3dd1f6090e8 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx @@ -95,7 +95,7 @@ itkRankImageFilterTest(int ac, char * av[]) filter->SetRank(0.5); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkShapedIteratorFromStructuringElementTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkShapedIteratorFromStructuringElementTest.cxx index 461e585aee2..efb182baf0a 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkShapedIteratorFromStructuringElementTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkShapedIteratorFromStructuringElementTest.cxx @@ -95,7 +95,7 @@ itkShapedIteratorFromStructuringElementTest(int, char *[]) { biterator.CreateActiveListFromNeighborhood(structuringElement); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { caught = true; std::cout << "Caught expected exception." << e << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx index c0d7a51a670..2704f20e440 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx @@ -115,7 +115,7 @@ itkTopHatImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught during pipeline Update\n" << e; return EXIT_FAILURE; diff --git a/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx index ad4adbaf7c1..abc13a266b3 100644 --- a/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx @@ -554,7 +554,7 @@ itkContourExtractor2DImageFilterTest(int argc, char * argv[]) std::cout << "passed." << std::endl; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx index 4261322fc4e..78785c8dd9f 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx @@ -195,7 +195,7 @@ itkAutomaticTopologyQuadEdgeMeshSourceTest(int, char *[]) { meshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx index ce75f4638da..a36cfb14aa6 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx @@ -106,7 +106,7 @@ itkBinaryMask3DQuadEdgeMeshSourceTest(int, char *[]) { meshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest.cxx index 13019365401..3fe71ab08e0 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest.cxx @@ -57,7 +57,7 @@ itkBorderQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx index 91686b10f77..fa00c3762a2 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx @@ -51,7 +51,7 @@ itkCleanQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx index 742ea9f89f1..be4c6bd0210 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx @@ -48,7 +48,7 @@ itkDelaunayConformingQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest.cxx index 4eca3e9c6ac..75a9eee62c2 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest.cxx @@ -49,7 +49,7 @@ itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest.cxx index c1bb62b81be..b8f25ae1e77 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest.cxx @@ -48,7 +48,7 @@ itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest.cxx index 84b548c0201..cd38bbe19da 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest.cxx @@ -48,7 +48,7 @@ itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest.cxx index bd8e8158cc6..dc239aaf0cd 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest.cxx @@ -48,7 +48,7 @@ itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx index 964b4302f93..a67031e7068 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx @@ -100,7 +100,7 @@ itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest(int argc, char { filter->Update(); } - catch (itk::ExceptionObject & except) + catch (const itk::ExceptionObject & except) { std::cerr << "Failure: " << except.what(); return EXIT_FAILURE; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx index 397bc3ebe5e..4d8cd69c939 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx @@ -103,7 +103,7 @@ itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest(int argc, char { filter->Update(); } - catch (itk::ExceptionObject & except) + catch (const itk::ExceptionObject & except) { std::cerr << "Failure: " << except.what(); return EXIT_FAILURE; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkNormalQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkNormalQuadEdgeMeshFilterTest.cxx index 188e0d50ad9..e67eec0c2c9 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkNormalQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkNormalQuadEdgeMeshFilterTest.cxx @@ -85,7 +85,7 @@ itkNormalQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx index 230fefee384..87c60aa7f6b 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx @@ -65,7 +65,7 @@ ParameterizationQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx index a7eaa085365..8f2271c3bb6 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx @@ -51,7 +51,7 @@ itkQuadricDecimationQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkRegularSphereQuadEdgeMeshSourceTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkRegularSphereQuadEdgeMeshSourceTest.cxx index 01a272cad6d..08bcf379285 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkRegularSphereQuadEdgeMeshSourceTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkRegularSphereQuadEdgeMeshSourceTest.cxx @@ -57,7 +57,7 @@ itkRegularSphereQuadEdgeMeshSourceTest(int argc, char * argv[]) { mySphereMeshSource->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error during Update() " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx index d3346907ae0..1c1fdb5e815 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx @@ -51,7 +51,7 @@ itkSmoothingQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx index 1f60958f4c6..d9cd8bb0a41 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx @@ -51,7 +51,7 @@ itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while reading the input file " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx index 42ec81282b1..afd177d6238 100644 --- a/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx @@ -82,7 +82,7 @@ itkBoxMeanImageFilterTest(int ac, char * av[]) filter->SetRadius(r); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx index 6539f292789..b92298ff8a6 100644 --- a/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx @@ -82,7 +82,7 @@ itkBoxSigmaImageFilterTest(int ac, char * av[]) filter->SetRadius(r); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx index 207b9ffce9d..e2c48492cab 100644 --- a/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx @@ -116,7 +116,7 @@ itkDiscreteGaussianImageFilterTest(int, char *[]) test1.SetFilter(filter); test1.Execute(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnTensorsTest.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnTensorsTest.cxx index 11626441993..4195050b61b 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnTensorsTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnTensorsTest.cxx @@ -95,7 +95,7 @@ itkRecursiveGaussianImageFiltersOnTensorsTest(int, char *[]) { filterY->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught a !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnVectorImageTest.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnVectorImageTest.cxx index 278293a9fb9..9b917064458 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnVectorImageTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersOnVectorImageTest.cxx @@ -94,7 +94,7 @@ itkRecursiveGaussianImageFiltersOnVectorImageTest(int, char *[]) { filterY->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught a !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx index 0ae72b1278e..6defa70adc1 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx @@ -135,7 +135,7 @@ itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx index a132e7daa0f..f7d096382e8 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx @@ -126,7 +126,7 @@ itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx index e41c0d70b15..a759882ae45 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx @@ -124,7 +124,7 @@ itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx index b22dc6ef157..1289780b6be 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx @@ -155,7 +155,7 @@ itkBinaryThresholdImageFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { pass = true; std::cout << "Caught an expected exception. " << std::endl; diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx index 3a38a1260bb..28f3182b21f 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx @@ -91,7 +91,7 @@ itkBinaryThresholdProjectionImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx index 133ac44de66..ef57b632d6d 100644 --- a/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx @@ -52,7 +52,7 @@ itkKappaSigmaThresholdImageCalculatorTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx index 4ee4045092a..c69bbe5f276 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx @@ -84,7 +84,7 @@ itkOtsuMultipleThresholdsCalculatorTest(int, char *[]) { otsuThresholdCalculator->Compute(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx index 93b849f33ad..3f482949528 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx @@ -72,7 +72,7 @@ itkOtsuMultipleThresholdsCalculatorTest2(int, char *[]) otsuThresholdCalculator->Compute(); thMid = otsuThresholdCalculator->GetOutput(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx index 3e828257a23..86db4293bab 100644 --- a/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx @@ -132,7 +132,7 @@ ThresholdLabelerImageFilterTestHelper(bool useRealTypeThresholds) labelerFilter->Update(); labelerFilter->SetFunctor(labelerFilter->GetFunctor()); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx b/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx index 17274b53206..88b2967d31e 100644 --- a/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx +++ b/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx @@ -52,7 +52,7 @@ itkBioRadImageIOTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e.GetDescription() << std::endl; @@ -70,7 +70,7 @@ itkBioRadImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e.GetDescription() << std::endl; diff --git a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx index 29c03a375c4..e1f8ff4e881 100644 --- a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx +++ b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx @@ -179,7 +179,7 @@ CSVNumericObjectFileWriter::Write() outputStream << std::endl; } } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught! " << std::endl; std::cerr << exp << std::endl; diff --git a/Modules/IO/CSV/test/itkCSVArray2DFileReaderTest.cxx b/Modules/IO/CSV/test/itkCSVArray2DFileReaderTest.cxx index 1e0266c2563..6bd7e7067a2 100644 --- a/Modules/IO/CSV/test/itkCSVArray2DFileReaderTest.cxx +++ b/Modules/IO/CSV/test/itkCSVArray2DFileReaderTest.cxx @@ -137,7 +137,7 @@ itkCSVArray2DFileReaderTest(int argc, char * argv[]) { reader->Parse(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { caught = true; std::cerr << "Expected Exception caught!" << std::endl; @@ -157,7 +157,7 @@ itkCSVArray2DFileReaderTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -327,7 +327,7 @@ itkCSVArray2DFileReaderTest(int argc, char * argv[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Expected Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -344,7 +344,7 @@ itkCSVArray2DFileReaderTest(int argc, char * argv[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Expected Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -399,7 +399,7 @@ itkCSVArray2DFileReaderTest(int argc, char * argv[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Expected Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -413,7 +413,7 @@ itkCSVArray2DFileReaderTest(int argc, char * argv[]) std::cerr << "Wrong value! Test failed!"; } } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Expected Exception caught!" << std::endl; std::cerr << exp << std::endl; diff --git a/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx b/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx index 85e27e319ff..94fc790f696 100644 --- a/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx +++ b/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx @@ -126,7 +126,7 @@ itkCSVFileReaderWriterTest_Func(int argc, char * argv[], bool headers) { writer->Write(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -147,7 +147,7 @@ itkCSVFileReaderWriterTest_Func(int argc, char * argv[], bool headers) { reader->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; diff --git a/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx b/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx index 9919a8d2491..6d9585722b0 100644 --- a/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx +++ b/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx @@ -66,7 +66,7 @@ itkCSVNumericObjectFileWriterTest(int argc, char * argv[]) { array_writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { caught = true; std::cerr << "Exception caught!" << std::endl; @@ -90,7 +90,7 @@ itkCSVNumericObjectFileWriterTest(int argc, char * argv[]) { array_writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { caught = true; std::cerr << "Exception caught!" << std::endl; @@ -112,7 +112,7 @@ itkCSVNumericObjectFileWriterTest(int argc, char * argv[]) { array_writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -155,7 +155,7 @@ itkCSVNumericObjectFileWriterTest(int argc, char * argv[]) { vnl_matrix_writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -200,7 +200,7 @@ itkCSVNumericObjectFileWriterTest(int argc, char * argv[]) { fixed_matrix_writer->Update(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx index 1c59a6a9592..eccbf401371 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx @@ -101,7 +101,7 @@ itkDCMTKImageIOMultiFrameImageTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIONoPreambleTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIONoPreambleTest.cxx index 73817690a57..9fcf06d6007 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIONoPreambleTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIONoPreambleTest.cxx @@ -55,7 +55,7 @@ itkDCMTKImageIONoPreambleTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOOrthoDirTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOOrthoDirTest.cxx index 4cf85f54503..797ef30411c 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOOrthoDirTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOOrthoDirTest.cxx @@ -50,7 +50,7 @@ itkDCMTKImageIOOrthoDirTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -68,7 +68,7 @@ itkDCMTKImageIOOrthoDirTest(int ac, char * av[]) { rotation.Set(directionCosines); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception setting matrix" << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx index 34230186bc7..76367be775c 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx @@ -54,7 +54,7 @@ itkDCMTKImageIOSlopeInterceptTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOTest.cxx index 9da13d46629..4c44b2994fa 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOTest.cxx @@ -51,7 +51,7 @@ itkDCMTKImageIOTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -79,7 +79,7 @@ itkDCMTKImageIOTest(int ac, char * av[]) { writer2->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx index 582a283d9b8..73e494671be 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx @@ -65,7 +65,7 @@ itkDCMTKLoggerTest(int, char *[]) // expected exception std::cerr << "Failed to detect invalid assignment of " << illegalVal << " to LogLevel" << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Expected exception (illegal log level assignment)" << std::endl << e << std::endl; } diff --git a/Modules/IO/DCMTK/test/itkDCMTKMultiFrame4DTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKMultiFrame4DTest.cxx index 5147c88c05c..4c27d5792b3 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKMultiFrame4DTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKMultiFrame4DTest.cxx @@ -47,7 +47,7 @@ itkDCMTKMultiFrame4DTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader" << std::endl; std::cerr << e << std::endl; @@ -62,7 +62,7 @@ itkDCMTKMultiFrame4DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer" << std::endl; std::cerr << e << std::endl; @@ -91,7 +91,7 @@ itkDCMTKMultiFrame4DTest(int argc, char * argv[]) { statisticsFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception checking files " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKRGBImageIOTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKRGBImageIOTest.cxx index 7d7fa3ebbe4..3fb7c399633 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKRGBImageIOTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKRGBImageIOTest.cxx @@ -51,7 +51,7 @@ itkDCMTKRGBImageIOTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -68,7 +68,7 @@ itkDCMTKRGBImageIOTest(int ac, char * av[]) { writer2->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx b/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx index 72bf3a6343c..fcc0e99bd24 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx @@ -66,7 +66,7 @@ itkDCMTKSeriesReadImageWrite(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; @@ -84,7 +84,7 @@ itkDCMTKSeriesReadImageWrite(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/DCMTK/test/itkDCMTKSeriesStreamReadImageWrite.cxx b/Modules/IO/DCMTK/test/itkDCMTKSeriesStreamReadImageWrite.cxx index db8c1037153..2d457aa5977 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKSeriesStreamReadImageWrite.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKSeriesStreamReadImageWrite.cxx @@ -119,7 +119,7 @@ itkDCMTKSeriesStreamReadImageWrite(int argc, char * argv[]) streamer->Update(); } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -181,7 +181,7 @@ itkDCMTKSeriesStreamReadImageWrite(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImageIONoCrashTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIONoCrashTest.cxx index c9b4d7cc626..545d16266c5 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIONoCrashTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIONoCrashTest.cxx @@ -57,7 +57,7 @@ itkGDCMImageIONoCrashTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx index ae86e2b0a87..a76b174bd65 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx @@ -54,7 +54,7 @@ itkGDCMImageIONoPreambleTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOOrthoDirTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOOrthoDirTest.cxx index 70597c133ba..0918ec2a9e0 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOOrthoDirTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOOrthoDirTest.cxx @@ -50,7 +50,7 @@ itkGDCMImageIOOrthoDirTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -68,7 +68,7 @@ itkGDCMImageIOOrthoDirTest(int ac, char * av[]) { rotation.Set(directionCosines); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception setting matrix" << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx index 544eb6f9e24..b4714b20ddd 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx @@ -56,7 +56,7 @@ itkGDCMImageIOTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error: exception in file reader " << std::endl; std::cerr << error << std::endl; @@ -103,7 +103,7 @@ itkGDCMImageIOTest(int argc, char * argv[]) { dicomWriter->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error: exception in file writer " << std::endl; std::cerr << error << std::endl; @@ -122,7 +122,7 @@ itkGDCMImageIOTest(int argc, char * argv[]) { metaWriter->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error: exception in file writer " << std::endl; std::cerr << error << std::endl; @@ -164,7 +164,7 @@ itkGDCMImageIOTest(int argc, char * argv[]) { rescaledDicomWriter->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error: exception in file writer " << std::endl; std::cerr << error << std::endl; @@ -184,7 +184,7 @@ itkGDCMImageIOTest(int argc, char * argv[]) { rescaledMetaWriter->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error: exception in file writer " << std::endl; std::cerr << error << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx index 0ac08da55c4..8f92ec602b7 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx @@ -45,7 +45,7 @@ itkGDCMImageIOTest2(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; @@ -125,7 +125,7 @@ itkGDCMImageIOTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; @@ -139,7 +139,7 @@ itkGDCMImageIOTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; @@ -153,7 +153,7 @@ itkGDCMImageIOTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx index 49744f67b6e..2270057f4b8 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx @@ -108,7 +108,7 @@ itkGDCMImageOrientationPatientTest(int argc, char * argv[]) writer2D->SetImageIO(gdcmIO); writer2D->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the file: " << filename.str() << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx b/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx index 4fb32fafdee..d669d19f172 100644 --- a/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx @@ -98,7 +98,7 @@ itkGDCMImagePositionPatientTest(int argc, char * argv[]) writer2D->SetImageIO(gdcmIO); writer2D->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the file: " << filename.str() << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx b/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx index 806acca54ff..2562b44561a 100644 --- a/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx @@ -56,7 +56,7 @@ itkGDCMLegacyMultiFrameTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error when running pipeline: " << error << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx b/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx index 5844ea0158a..9a073c081bf 100644 --- a/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx @@ -59,7 +59,7 @@ itkGDCMLoadImageSpacingTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error when reading input: " << error << std::endl; } diff --git a/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWriteTest.cxx b/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWriteTest.cxx index c2bf83f15b1..0b4fe1ee4c7 100644 --- a/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWriteTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWriteTest.cxx @@ -120,7 +120,7 @@ itkGDCMSeriesStreamReadImageWriteTest(int argc, char * argv[]) streamer->Update(); } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -182,7 +182,7 @@ itkGDCMSeriesStreamReadImageWriteTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/GE/test/itkGEImageIOTest.cxx b/Modules/IO/GE/test/itkGEImageIOTest.cxx index 5f63eae4e80..38388e02ab6 100644 --- a/Modules/IO/GE/test/itkGEImageIOTest.cxx +++ b/Modules/IO/GE/test/itkGEImageIOTest.cxx @@ -62,7 +62,7 @@ itkGEImageIOFactoryTest(int ac, char * av[]) imageReader->Update(); input = imageReader->GetOutput(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught unexpected exception. Test Failed!" << std::endl; std::cout << e << std::endl; @@ -123,7 +123,7 @@ itkGEImageIOTest(int ac, char * av[]) imageReader->Update(); input = imageReader->GetOutput(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { if (Failmode) { diff --git a/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx b/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx index 37fb4a57c63..dcc5dd58641 100644 --- a/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx +++ b/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx @@ -48,7 +48,7 @@ itkGiplImageIOTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx index f9ed9e73844..de2c1e12a12 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx @@ -112,7 +112,7 @@ HDF5ReadWriteTest2(const char * fileName) { writer->Write(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkHDF5ImageIOTest" << std::endl << "Exception Object caught: " << std::endl << err << std::endl; return EXIT_FAILURE; @@ -159,7 +159,7 @@ HDF5ReadWriteTest2(const char * fileName) { streamer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkHDF5ImageIOTest" << std::endl << "Exception Object caught: " << std::endl << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx index d2ecbcd0d53..979f90fc5f0 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx @@ -135,7 +135,7 @@ HDF5ReadWriteTest(const char * fileName) itk::IOTestHelper::WriteImage(im, std::string(fileName)); im2 = itk::IOTestHelper::ReadImage(std::string(fileName)); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkHDF5ImageIOTest" << std::endl << "Exception Object caught: " << std::endl << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/include/itkIOTestHelper.h b/Modules/IO/ImageBase/include/itkIOTestHelper.h index 9ba207c3be9..43685cebb56 100644 --- a/Modules/IO/ImageBase/include/itkIOTestHelper.h +++ b/Modules/IO/ImageBase/include/itkIOTestHelper.h @@ -42,7 +42,7 @@ class IOTestHelper { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an exception: " << std::endl; std::cout << err << " " << __FILE__ << " " << __LINE__ << std::endl; @@ -87,7 +87,7 @@ class IOTestHelper { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception Object caught: " << std::endl << err << std::endl; throw; diff --git a/Modules/IO/ImageBase/include/itkImageFileReader.hxx b/Modules/IO/ImageBase/include/itkImageFileReader.hxx index 027893ff395..2a3622da223 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileReader.hxx @@ -91,7 +91,7 @@ ImageFileReader::GenerateOutputInformation() m_ExceptionMessage = ""; this->TestFileExistanceAndReadability(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { m_ExceptionMessage = err.GetDescription(); } @@ -374,7 +374,7 @@ ImageFileReader::GenerateData() m_ExceptionMessage = ""; this->TestFileExistanceAndReadability(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { m_ExceptionMessage = err.GetDescription(); } diff --git a/Modules/IO/ImageBase/test/itk64bitTest.cxx b/Modules/IO/ImageBase/test/itk64bitTest.cxx index 09d15737a9c..1de3e07000b 100644 --- a/Modules/IO/ImageBase/test/itk64bitTest.cxx +++ b/Modules/IO/ImageBase/test/itk64bitTest.cxx @@ -86,7 +86,7 @@ itk64bitTest(int argc, char * argv[]) ImageType::Pointer image2 = reader->GetOutput(); returnValue += verifyContent(image2); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << exc; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkIOPluginTest.cxx b/Modules/IO/ImageBase/test/itkIOPluginTest.cxx index b642626f708..9527d7ef327 100644 --- a/Modules/IO/ImageBase/test/itkIOPluginTest.cxx +++ b/Modules/IO/ImageBase/test/itkIOPluginTest.cxx @@ -90,7 +90,7 @@ itkIOPluginTest(int argc, char * argv[]) writer->Update(); reader->GetOutput()->Print(std::cout); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught unexpected exception!" << std::endl; std::cout << ex; @@ -102,7 +102,7 @@ itkIOPluginTest(int argc, char * argv[]) reader->SetFileName("foo"); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderDimensionsTest.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderDimensionsTest.cxx index a3861f6d453..68ff8f7a96b 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderDimensionsTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderDimensionsTest.cxx @@ -70,7 +70,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) writer->SetFileName(tempFile1); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -90,7 +90,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) writer->SetFileName(tempFile2); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -110,7 +110,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) writer->SetNumberOfStreamDivisions(4); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -131,7 +131,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) writer->SetNumberOfStreamDivisions(4); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -147,7 +147,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) reader->SetFileName(tempFile1); reader->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -181,7 +181,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) writer->SetIORegion(ioregion); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { // this exception is expected since the ioregion should be invalid std::cout << "------------------ Caught expected exception!" << std::endl; @@ -204,7 +204,7 @@ itkImageFileReaderDimensionsTest(int argc, char * argv[]) reader->SetFileName(argv[1]); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx index c5bdbd7e5ed..e424648b472 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx @@ -83,7 +83,7 @@ itkImageFileReaderStreamingTest(int argc, char * argv[]) streamer->Update(); } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderTest1.cxx index 0e02376d78b..0cd226bc018 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderTest1.cxx @@ -39,7 +39,7 @@ itkImageFileReaderTest1(int ac, char * av[]) ReaderType::Pointer reader = ReaderType::New(); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -60,7 +60,7 @@ itkImageFileReaderTest1(int ac, char * av[]) reader->SetFileName("this_file_should_not_exist"); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -81,7 +81,7 @@ itkImageFileReaderTest1(int ac, char * av[]) reader->SetFileName(av[0]); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx index 0073a514873..17d48936eb8 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx @@ -97,7 +97,7 @@ itkImageFileWriterPastingTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx index 525189ce830..240d53e801c 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx @@ -125,7 +125,7 @@ itkImageFileWriterPastingTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx index b2ecf8c7f45..940ab35cc3c 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx @@ -127,7 +127,7 @@ itkImageFileWriterPastingTest3(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx index dc74ec343b1..429eebe8b2c 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx @@ -171,7 +171,7 @@ ActualTest(std::string inputFileName, writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { if (expectException == -1 || expectException == 1) { diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx index f1003fdd5be..74732a24cc8 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx @@ -84,7 +84,7 @@ itkImageFileWriterStreamingTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx index dbf4620cdd0..9821d826ab2 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx @@ -103,7 +103,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -145,7 +145,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating 1x1x1 IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -179,7 +179,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating 2x2x2 IORegion with odd offset ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -214,7 +214,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating 1x1xlong IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -248,7 +248,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating 1xlongx1 IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -283,7 +283,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating Full IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -319,7 +319,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating out of bounds IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception" << std::endl; std::cout << err << std::endl; @@ -348,7 +348,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating out of bounds IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected exception" << std::endl; std::cout << err << std::endl; @@ -390,7 +390,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) std::cout << "=== Updating mismatched IORegion ==" << std::endl; writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx index 61fe2ea9e1f..60fba597f19 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx @@ -52,7 +52,7 @@ itkImageFileWriterTest(int ac, char * av[]) WriterType::Pointer writer = WriterType::New(); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -72,7 +72,7 @@ itkImageFileWriterTest(int ac, char * av[]) writer->SetInput(image); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -93,7 +93,7 @@ itkImageFileWriterTest(int ac, char * av[]) writer->SetFileName("this_is_a_bad_filename"); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -114,7 +114,7 @@ itkImageFileWriterTest(int ac, char * av[]) writer->SetFileName(av[1]); writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -135,7 +135,7 @@ itkImageFileWriterTest(int ac, char * av[]) writer->SetFileName(av[1]); writer->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx index d5c562bd10d..caeda23e942 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx @@ -73,7 +73,7 @@ itkImageFileWriterTest2(int ac, char * av[]) std::cout << "Original Starting Point (physical cooridents) : " << readPoint << std::endl; std::cout << "Read Origin: " << image->GetOrigin() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "caught exception!" << std::endl; std::cout << ex; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx index 6ff7476a00c..71fe3260dee 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx @@ -63,7 +63,7 @@ itkImageFileWriterUpdateLargestPossibleRegionTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "------------------ Caught expected exception!" << std::endl; std::cout << ex; @@ -81,7 +81,7 @@ itkImageFileWriterUpdateLargestPossibleRegionTest(int argc, char * argv[]) { writer->UpdateLargestPossibleRegion(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx b/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx index 9c25369a038..6e714091e87 100644 --- a/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx @@ -39,7 +39,7 @@ itkImageIOBaseTest(int, char *[]) { reader->SetDimensions(3, 1); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught expected exception " << e << std::endl; gotException = true; @@ -55,7 +55,7 @@ itkImageIOBaseTest(int, char *[]) { reader->SetOrigin(3, 1.0); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught expected exception " << e << std::endl; gotException = true; @@ -71,7 +71,7 @@ itkImageIOBaseTest(int, char *[]) { reader->SetSpacing(3, 1.0); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught expected exception " << e << std::endl; gotException = true; @@ -91,7 +91,7 @@ itkImageIOBaseTest(int, char *[]) direction[2] = 1.0; reader->SetDirection(3, direction); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught expected exception " << e << std::endl; gotException = true; @@ -111,7 +111,7 @@ itkImageIOBaseTest(int, char *[]) direction[2] = 1.0; reader->SetDirection(3, direction); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Caught expected exception " << e << std::endl; gotException = true; diff --git a/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx b/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx index ab6fab8fbe6..b81a488e227 100644 --- a/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx @@ -46,7 +46,7 @@ itkImageIODirection2DTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; @@ -89,7 +89,7 @@ itkImageIODirection2DTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx b/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx index 8b47ec214f9..5c93b0fe0c4 100644 --- a/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx @@ -46,7 +46,7 @@ itkImageIODirection3DTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; @@ -90,7 +90,7 @@ itkImageIODirection3DTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesReaderDimensionsTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesReaderDimensionsTest.cxx index 373cbc43982..a0ce12547a6 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesReaderDimensionsTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesReaderDimensionsTest.cxx @@ -56,7 +56,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -70,7 +70,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -84,7 +84,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -100,7 +100,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; // return EXIT_FAILURE; @@ -114,7 +114,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -128,7 +128,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -142,7 +142,7 @@ itkImageSeriesReaderDimensionsTest(int ac, char * av[]) reader->Update(); std::cout << "output image size:: " << reader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx index 4d53133774a..430bbf33557 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx @@ -72,7 +72,7 @@ itkImageSeriesReaderSamplingTest(int ac, char * av[]) } } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx index dcfb8b76ab3..8f38240ed8c 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx @@ -44,7 +44,7 @@ itkImageSeriesReaderVectorTest(int ac, char * av[]) reader->SetFileNames(fnames); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -57,7 +57,7 @@ itkImageSeriesReaderVectorTest(int ac, char * av[]) reader->SetFileNames(fnames); reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx index 3e9baad513a..50efd91d081 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx @@ -58,7 +58,7 @@ itkImageSeriesWriterTest(int ac, char * av[]) reader->Update(); reader->GetOutput()->Print(std::cout); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -93,7 +93,7 @@ itkImageSeriesWriterTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the series with old API" << std::endl; std::cerr << excp << std::endl; @@ -155,7 +155,7 @@ itkImageSeriesWriterTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the series with SeriesFileNames generator" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx b/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx index 223aecbe2f8..2aa83e61df7 100644 --- a/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx @@ -86,7 +86,7 @@ itkLargeImageWriteConvertReadTest(int ac, char * av[]) writer->Update(); chronometer.Stop("Write"); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -104,7 +104,7 @@ itkLargeImageWriteConvertReadTest(int ac, char * av[]) reader->Update(); chronometer.Stop("Read"); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx index 8c490c82674..966f2a27214 100644 --- a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx @@ -93,7 +93,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) writer->Update(); chronometer.Stop("Write"); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -110,7 +110,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) reader->Update(); chronometer.Stop("Read"); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx b/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx index 2a202bb035b..c60d2e175f1 100644 --- a/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx @@ -90,7 +90,7 @@ itkMatrixImageWriteReadTest(int ac, char * av[]) { matrixWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -107,7 +107,7 @@ itkMatrixImageWriteReadTest(int ac, char * av[]) { matrixReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx b/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx index f8294a11f7b..368006a2f76 100644 --- a/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx +++ b/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx @@ -63,7 +63,7 @@ itkNoiseImageFilterTest(int ac, char * av[]) filter->SetRadius(radius); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx b/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx index 9dd83ad9123..5a3406f7f0c 100644 --- a/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx +++ b/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx @@ -47,7 +47,7 @@ itkJPEGImageIOTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx b/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx index f83b4b41584..cda40e0f8f2 100644 --- a/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx +++ b/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx @@ -69,7 +69,7 @@ itkJPEGImageIOTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -83,7 +83,7 @@ itkJPEGImageIOTest2(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIORegionOfInterest.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIORegionOfInterest.cxx index 2d09d84e908..c03ac5d2648 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIORegionOfInterest.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIORegionOfInterest.cxx @@ -91,7 +91,7 @@ itkJPEG2000ImageIORegionOfInterest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest01.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest01.cxx index 7ad93e54118..ac35e04aecd 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest01.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest01.cxx @@ -62,7 +62,7 @@ itkJPEG2000ImageIOTest01(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest02.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest02.cxx index 70651f966ce..f554efa3ba3 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest02.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest02.cxx @@ -62,7 +62,7 @@ itkJPEG2000ImageIOTest02(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest03.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest03.cxx index 9d78d5e3b69..71e990faaeb 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest03.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest03.cxx @@ -61,7 +61,7 @@ itkJPEG2000ImageIOTest03(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest04.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest04.cxx index 74f8abb4487..d3689ae9a4f 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest04.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest04.cxx @@ -66,7 +66,7 @@ itkJPEG2000ImageIOTest04(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx index a51a9909f45..a067b72ce12 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx @@ -46,7 +46,7 @@ itkJPEG2000ImageIOTest05(int argc, char * argv[]) reader->Update(); reader->GetOutput()->Print(std::cout); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex; return EXIT_FAILURE; @@ -82,7 +82,7 @@ itkJPEG2000ImageIOTest05(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the series with SeriesFileNames generator" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest06.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest06.cxx index ed45827f145..dc9981e4cd2 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest06.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest06.cxx @@ -61,7 +61,7 @@ itkJPEG2000ImageIOTest06(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/LSM/test/itkLSMImageIOTest.cxx b/Modules/IO/LSM/test/itkLSMImageIOTest.cxx index 7e3a2c2dded..5f8193d6f5e 100644 --- a/Modules/IO/LSM/test/itkLSMImageIOTest.cxx +++ b/Modules/IO/LSM/test/itkLSMImageIOTest.cxx @@ -50,7 +50,7 @@ itkLSMImageIOTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkLSMImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest.cxx index 6a4d01b9a87..a07da735e53 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest.cxx @@ -403,7 +403,7 @@ MINCReadWriteTest(const char * fileName, const char * minc_storage_type, double itk::IOTestHelper::WriteImage(im, std::string(fileName)); im2 = itk::IOTestHelper::ReadImage(std::string(fileName)); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkMINCImageIOTest" << std::endl << "Exception Object caught: " << std::endl @@ -652,7 +652,7 @@ MINCReadWriteTestVector(const char * fileName, itk::IOTestHelper::WriteImage(im, std::string(fileName)); im2 = itk::IOTestHelper::ReadImage(std::string(fileName)); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkMINCImageIOTest" << std::endl << "Exception Object caught: " << std::endl diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx index 8f8c5b25c5e..8d4fea5728d 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx @@ -59,7 +59,7 @@ itkMINCImageIOTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx index 0ee7e5e8fe9..6868258ce0c 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx @@ -158,7 +158,7 @@ itkMINCImageIOTest4(int argc, char * argv[]) } return ret; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx index 9450eaa7adc..9009bfd2768 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx @@ -148,7 +148,7 @@ itkMINCImageIOTest_2D(int argc, char * argv[]) } return ret; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest_4D.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest_4D.cxx index 42d49e0f799..28837d9fe66 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest_4D.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest_4D.cxx @@ -53,7 +53,7 @@ itkMINCImageIOTest_4D(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest_Labels.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest_Labels.cxx index e96868b788a..b1b051fb67c 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest_Labels.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest_Labels.cxx @@ -54,7 +54,7 @@ itkMINCImageIOTest_Labels(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx index 5dd6da42498..7356cbeab69 100644 --- a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx +++ b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx @@ -132,7 +132,7 @@ MRCImageIOTester::Write(const std::string & filePrefix, std::string return true; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e.GetDescription() << std::endl; return false; @@ -264,7 +264,7 @@ MRCImageIOTester::Read(const std::string & filePrefix, std::string & // reading successful, so return true return true; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e.GetDescription() << std::endl; return false; diff --git a/Modules/IO/MeshBase/include/itkMeshFileReader.hxx b/Modules/IO/MeshBase/include/itkMeshFileReader.hxx index b9eb95c8184..f49bc14623e 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileReader.hxx +++ b/Modules/IO/MeshBase/include/itkMeshFileReader.hxx @@ -477,7 +477,7 @@ MeshFileReader::Ge m_ExceptionMessage = ""; this->TestFileExistanceAndReadability(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { m_ExceptionMessage = err.GetDescription(); } @@ -534,7 +534,7 @@ MeshFileReader::Ge m_ExceptionMessage = ""; this->TestFileExistanceAndReadability(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { m_ExceptionMessage = err.GetDescription(); } diff --git a/Modules/IO/MeshBase/include/itkMeshFileTestHelper.h b/Modules/IO/MeshBase/include/itkMeshFileTestHelper.h index b7705f9af4a..75da1dd73e7 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileTestHelper.h +++ b/Modules/IO/MeshBase/include/itkMeshFileTestHelper.h @@ -263,7 +263,7 @@ test(char * INfilename, char * OUTfilename, bool IsBinary) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Read file " << INfilename << " failed " << std::endl; std::cerr << err << std::endl; @@ -296,7 +296,7 @@ test(char * INfilename, char * OUTfilename, bool IsBinary) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Write file " << OUTfilename << " failed " << std::endl; std::cerr << err << std::endl; @@ -314,7 +314,7 @@ test(char * INfilename, char * OUTfilename, bool IsBinary) { reader1->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Read file " << OUTfilename << " failed " << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx b/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx index 53ee0dd0224..27091563c75 100644 --- a/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx +++ b/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx @@ -68,7 +68,7 @@ itkMeshFileWriteReadTensorTest(int argc, char * argv[]) { mesh2dWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Failed the VTKPolyDataMeshIO 2d test" << excp; return EXIT_FAILURE; @@ -100,7 +100,7 @@ itkMeshFileWriteReadTensorTest(int argc, char * argv[]) { mesh3dWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Failed the VTKPolyDataMeshIO 3D test" << excp; return EXIT_FAILURE; diff --git a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx index 0e915d69d63..0a59a8c7f80 100644 --- a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx +++ b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx @@ -96,7 +96,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) writer->Update(); chronometer.Stop("Write"); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; @@ -116,7 +116,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) reader->Update(); chronometer.Stop("Read"); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << ex << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx index 34fa4168cea..386c63f6ef0 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx @@ -69,7 +69,7 @@ itkMetaImageIOGzTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -92,7 +92,7 @@ itkMetaImageIOGzTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Test failed " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx index 3a27715eb1a..bf02bdf25ea 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx @@ -42,7 +42,7 @@ ReadImage(const std::string & fileName) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an exception: " << std::endl; std::cout << err << " " << __FILE__ << " " << __LINE__ << std::endl; @@ -76,7 +76,7 @@ WriteImage(typename ImageType::Pointer & image, const std::string & fileName) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Exception Object caught: " << std::endl; std::cout << err << std::endl; diff --git a/Modules/IO/Meta/test/itkMetaImageIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOTest.cxx index 22d943dcd7e..9cdda82306d 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOTest.cxx @@ -70,7 +70,7 @@ itkMetaImageIOTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx index 7a2f52d7cfc..0d6e657db77 100644 --- a/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx @@ -100,7 +100,7 @@ itkMetaImageStreamingIOTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx index bc46bca837b..fceb35998d1 100644 --- a/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx @@ -104,7 +104,7 @@ itkMetaImageStreamingWriterIOTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cout << "ERROR : " << ex << std::endl; return EXIT_FAILURE; @@ -134,7 +134,7 @@ itkMetaImageStreamingWriterIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/IO/Meta/test/testMetaImage.cxx b/Modules/IO/Meta/test/testMetaImage.cxx index 59e9da9ab1a..94b2df4ca19 100644 --- a/Modules/IO/Meta/test/testMetaImage.cxx +++ b/Modules/IO/Meta/test/testMetaImage.cxx @@ -61,7 +61,7 @@ ReadWriteCompare(PixelType value, std::string type) ++ri; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Error filling array" << ex << std::endl; return EXIT_FAILURE; @@ -71,7 +71,7 @@ ReadWriteCompare(PixelType value, std::string type) { itk::IOTestHelper::WriteImage(img, std::string(filename)); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while writing image "; @@ -90,7 +90,7 @@ ReadWriteCompare(PixelType value, std::string type) { input = itk::IOTestHelper::ReadImage(std::string(filename)); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); itk::IOTestHelper::Remove(filename); diff --git a/Modules/IO/NIFTI/test/itkExtractSlice.cxx b/Modules/IO/NIFTI/test/itkExtractSlice.cxx index c7a3668112f..c3608024bfc 100644 --- a/Modules/IO/NIFTI/test/itkExtractSlice.cxx +++ b/Modules/IO/NIFTI/test/itkExtractSlice.cxx @@ -64,7 +64,7 @@ itkExtractSlice(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Update(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << exc; return EXIT_FAILURE; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx index b88c57ff02b..96abfdd2702 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx @@ -133,7 +133,7 @@ itkNiftiImageIOTest(int ac, char * av[]) { input = itk::IOTestHelper::ReadImage(std::string(av[imagenameindex])); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); rval = 1; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h index b5180be5dbf..90be63e332a 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h @@ -107,7 +107,7 @@ MakeNiftiImage() ++ri; } } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Error filling array" << ex << std::endl; return EXIT_FAILURE; @@ -186,7 +186,7 @@ MakeNiftiImage() { itk::IOTestHelper::WriteImage(img, std::string(filename)); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while writing image "; @@ -231,7 +231,7 @@ MakeNiftiImage() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); itk::IOTestHelper::Remove(filename); @@ -381,7 +381,7 @@ TestImageOfSymMats(const std::string & fname) { itk::IOTestHelper::WriteImage(vi, fname); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while writing image "; @@ -401,7 +401,7 @@ TestImageOfSymMats(const std::string & fname) { readback = itk::IOTestHelper::ReadImage(fname); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while reading image "; @@ -547,7 +547,7 @@ RGBTest(int ac, char * av[]) itk::IOTestHelper::WriteImage(im, std::string(tmpImage)); im2 = itk::IOTestHelper::ReadImage(std::string(tmpImage)); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkNiftiImageIOTest9" << std::endl << "Exception Object caught: " << std::endl << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx index c2f384a3a35..059a7969db6 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx @@ -71,7 +71,7 @@ itkNiftiImageIOTest11(int ac, char * av[]) std::cerr << "FAILED to catch expected exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "EXPECTED exception in file writer " << std::endl; std::cout << e.GetDescription() << std::endl; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx index 104f5c6471f..f7b03937f9a 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx @@ -156,7 +156,7 @@ TestImageOfVectors(const std::string & fname) { itk::IOTestHelper::WriteImage(vi, fname); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while writing image "; @@ -176,7 +176,7 @@ TestImageOfVectors(const std::string & fname) { readback = itk::IOTestHelper::ReadImage(fname); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while reading image "; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx index f3cdf139ad1..f4fefe3408b 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx @@ -111,7 +111,7 @@ itkNiftiImageIOTest4(int ac, char * av[]) { itk::IOTestHelper::WriteImage(test4Image, fname); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while writing image "; @@ -131,7 +131,7 @@ itkNiftiImageIOTest4(int ac, char * av[]) { readback = itk::IOTestHelper::ReadImage(fname); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::string message; message = "Problem found while reading image "; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx index f31cc5379eb..9634b0291cf 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx @@ -172,7 +172,7 @@ SlopeInterceptWriteTest() { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception Object caught: " << std::endl << err << std::endl; throw; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx index 669f80c70f5..b41c53ec4a0 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx @@ -69,7 +69,7 @@ itkNiftiImageIOTest6(int ac, char * av[]) itk::IOTestHelper::WriteImage(vecImage, testfname); readback = itk::IOTestHelper::ReadImage(testfname); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "itkNiftiImageIOTest6" << std::endl << "Exception Object caught: " << std::endl << err << std::endl; throw; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTestHelper.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTestHelper.cxx index ac6a770ba8a..206565bfe57 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTestHelper.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTestHelper.cxx @@ -85,7 +85,7 @@ TestNiftiByteSwap(const std::string & prefix) std::cout << "Printing Dictionary" << std::endl; big->GetMetaDataDictionary().Print(std::cout); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); RemoveNiftiByteSwapTestFiles(prefix); @@ -106,7 +106,7 @@ TestNiftiByteSwap(const std::string & prefix) if (!littleIter.IsAtEnd() || !bigIter.IsAtEnd()) rval = -1; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Error filling array" << ex << std::endl; rval = -1; diff --git a/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx b/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx index fe1cc5e9681..e60d7bd4c70 100644 --- a/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx @@ -205,7 +205,7 @@ ReadImage(const std::string & fileName) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught an exception: " << std::endl; std::cout << err << " " << __FILE__ << " " << __LINE__ << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx index 70b5bbdfd63..21b3904fe91 100644 --- a/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx @@ -46,7 +46,7 @@ itkNrrdComplexImageReadTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdComplexImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdComplexImageReadWriteTest.cxx index 0727449bac3..828df17adda 100644 --- a/Modules/IO/NRRD/test/itkNrrdComplexImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdComplexImageReadWriteTest.cxx @@ -47,7 +47,7 @@ itkNrrdComplexImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkNrrdComplexImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx index 0d152e204d1..d19a84e4267 100644 --- a/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx @@ -46,7 +46,7 @@ itkNrrdCovariantVectorImageReadTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadWriteTest.cxx index d1a6690b705..4f86032d8d5 100644 --- a/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadWriteTest.cxx @@ -47,7 +47,7 @@ itkNrrdCovariantVectorImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkNrrdCovariantVectorImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest.cxx b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest.cxx index e5be60cd94c..78eb9b731c6 100644 --- a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest.cxx @@ -47,7 +47,7 @@ itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest(int ac, char { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest(int ac, char { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx index 2b8480522fe..cdd2c2b9df2 100644 --- a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx @@ -46,7 +46,7 @@ itkNrrdDiffusionTensor3DImageReadTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadWriteTest.cxx index ac4bd7d2722..93e099ceaf8 100644 --- a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadWriteTest.cxx @@ -47,7 +47,7 @@ itkNrrdDiffusionTensor3DImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkNrrdDiffusionTensor3DImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdImageIOTest.h b/Modules/IO/NRRD/test/itkNrrdImageIOTest.h index 60948f55d20..6c53386bbd2 100644 --- a/Modules/IO/NRRD/test/itkNrrdImageIOTest.h +++ b/Modules/IO/NRRD/test/itkNrrdImageIOTest.h @@ -78,7 +78,7 @@ itkNrrdImageIOTestReadWriteTest(std::string fn, unsigned int size, std::string i tmpReader->Update(); std::cout << "DONE READING INPUT IMAGE" << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; @@ -108,7 +108,7 @@ itkNrrdImageIOTestReadWriteTest(std::string fn, unsigned int size, std::string i // writer->SetFileName("testDebug.mhd"); // reader->SetFileName("testDebug.mhd"); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; @@ -126,7 +126,7 @@ itkNrrdImageIOTestReadWriteTest(std::string fn, unsigned int size, std::string i reader->Update(); std::cout << "DONE READING TEST IMAGE" << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception in file reader or writer " << std::endl; std::cerr << e.GetDescription() << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdImageReadWriteTest.cxx index f9e67bfb5c2..dd836b990c7 100644 --- a/Modules/IO/NRRD/test/itkNrrdImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdImageReadWriteTest.cxx @@ -47,7 +47,7 @@ itkNrrdImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkNrrdImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx b/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx index e8daebc2456..6aa74eeb587 100644 --- a/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx @@ -77,7 +77,7 @@ itkNrrdMetaDataTest(int ac, char * av[]) reader->Update(); image2 = reader->GetOutput(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception in file reader or writer " << std::endl; std::cerr << e.GetDescription() << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx index 9ee0b7d8c16..273a2710659 100644 --- a/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx @@ -44,7 +44,7 @@ itkNrrdRGBAImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -63,7 +63,7 @@ itkNrrdRGBAImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx index 21ef3b7a043..a516e3b209c 100644 --- a/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx @@ -44,7 +44,7 @@ itkNrrdRGBImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -63,7 +63,7 @@ itkNrrdRGBImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx index 01b294134fb..d09f7f36bbe 100644 --- a/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx @@ -46,7 +46,7 @@ itkNrrdVectorImageReadTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/NRRD/test/itkNrrdVectorImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdVectorImageReadWriteTest.cxx index 6ac3b659a67..1478b3cea73 100644 --- a/Modules/IO/NRRD/test/itkNrrdVectorImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdVectorImageReadWriteTest.cxx @@ -47,7 +47,7 @@ itkNrrdVectorImageReadWriteTest(int ac, char * av[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -67,7 +67,7 @@ itkNrrdVectorImageReadWriteTest(int ac, char * av[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOOrientationTest.cxx b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOOrientationTest.cxx index 35a874a14bd..6544f2a1bd3 100644 --- a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOOrientationTest.cxx +++ b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOOrientationTest.cxx @@ -81,7 +81,7 @@ itkPhilipsRECImageIOOrientationTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx index f6403cc07f6..11b112410ac 100644 --- a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx +++ b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx @@ -47,7 +47,7 @@ itkPhilipsRECImageIOPrintTest(int argc, char * argv[]) { imageIO->ReadImageInformation(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx index a3afdc37d46..0895c8ac248 100644 --- a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx +++ b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx @@ -51,7 +51,7 @@ itkPhilipsRECImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest.cxx b/Modules/IO/RAW/test/itkRawImageIOTest.cxx index bfcda6f1209..7b1323f643f 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest.cxx @@ -71,7 +71,7 @@ itkRawImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -87,7 +87,7 @@ itkRawImageIOTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the image " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -127,7 +127,7 @@ itkRawImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << argv[2] << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest4.cxx b/Modules/IO/RAW/test/itkRawImageIOTest4.cxx index 1136bd2a35b..d37f32d6683 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest4.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest4.cxx @@ -67,7 +67,7 @@ class RawImageIOReadFileTester { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception while reading file " << filename << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest5.cxx b/Modules/IO/RAW/test/itkRawImageIOTest5.cxx index 519f3724714..2935c8df79a 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest5.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest5.cxx @@ -194,7 +194,7 @@ itkRawImageIOTest5(int argc, char * argv[]) { tester1.Write(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught while writing char type." << std::endl; std::cerr << excp << std::endl; @@ -206,7 +206,7 @@ itkRawImageIOTest5(int argc, char * argv[]) { tester1.Read(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught while reading char type." << std::endl; std::cerr << excp << std::endl; @@ -235,7 +235,7 @@ itkRawImageIOTest5(int argc, char * argv[]) { tester2.Write(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught while writing signed char type." << std::endl; std::cerr << excp << std::endl; @@ -247,7 +247,7 @@ itkRawImageIOTest5(int argc, char * argv[]) { tester2.Read(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught while reading signed char type." << std::endl; std::cerr << excp << std::endl; @@ -277,7 +277,7 @@ itkRawImageIOTest5(int argc, char * argv[]) { tester3.Write(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught while writing unsigned char type." << std::endl; std::cerr << excp << std::endl; @@ -289,7 +289,7 @@ itkRawImageIOTest5(int argc, char * argv[]) { tester3.Read(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught while reading unsigned char type." << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx b/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx index 503fb9c8738..4b8161074d9 100644 --- a/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx @@ -40,7 +40,7 @@ itkReadVesselTubeSpatialObjectTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Exception caught: " << error << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx index 637d596ab0d..19b7798a4a1 100644 --- a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx @@ -398,7 +398,7 @@ itkReadWriteSpatialObjectTest(int argc, char * argv[]) } writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e << std::endl; } diff --git a/Modules/IO/Stimulate/test/itkStimulateImageIOTest.cxx b/Modules/IO/Stimulate/test/itkStimulateImageIOTest.cxx index 56a5e883e24..a0a9191aa9a 100644 --- a/Modules/IO/Stimulate/test/itkStimulateImageIOTest.cxx +++ b/Modules/IO/Stimulate/test/itkStimulateImageIOTest.cxx @@ -84,7 +84,7 @@ itkStimulateImageIOTest(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Write(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/Stimulate/test/itkStimulateImageIOTest2.cxx b/Modules/IO/Stimulate/test/itkStimulateImageIOTest2.cxx index 1839625825b..3936b2945a7 100644 --- a/Modules/IO/Stimulate/test/itkStimulateImageIOTest2.cxx +++ b/Modules/IO/Stimulate/test/itkStimulateImageIOTest2.cxx @@ -49,7 +49,7 @@ itkStimulateImageIOTest2(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception in file reader " << std::endl; std::cout << e << std::endl; diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx index ef768b17e2c..a55caed0573 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx @@ -46,7 +46,7 @@ TestMultipleReads(const std::string & fname, TImage *) reader->GetOutput()->ReleaseData(); reader->GetOutput()->UpdateOutputData(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader for bug " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/IO/TransformBase/test/itkTransformFileReaderTest.cxx b/Modules/IO/TransformBase/test/itkTransformFileReaderTest.cxx index 8c89e693b9a..f5e4af629f5 100644 --- a/Modules/IO/TransformBase/test/itkTransformFileReaderTest.cxx +++ b/Modules/IO/TransformBase/test/itkTransformFileReaderTest.cxx @@ -43,7 +43,7 @@ itkTransformFileReaderTest(int argc, char * argv[]) // trigger empty read exception transformReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected exception (no filename)" << std::endl << excp << std::endl; } @@ -53,7 +53,7 @@ itkTransformFileReaderTest(int argc, char * argv[]) // trigger exception for transformio not found transformReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected exception (no transformio that can read garbage and no transformio should be registered)" << excp << std::endl; diff --git a/Modules/IO/TransformBase/test/itkTransformFileWriterTest.cxx b/Modules/IO/TransformBase/test/itkTransformFileWriterTest.cxx index 4314cf30d57..bc8118ce5b8 100644 --- a/Modules/IO/TransformBase/test/itkTransformFileWriterTest.cxx +++ b/Modules/IO/TransformBase/test/itkTransformFileWriterTest.cxx @@ -44,7 +44,7 @@ itkTransformFileWriterTest(int argc, char * argv[]) // trigger empty write exception transformWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected exception (no filename)" << std::endl << excp << std::endl; } @@ -54,7 +54,7 @@ itkTransformFileWriterTest(int argc, char * argv[]) // trigger exception for transformio not found transformWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected exception (no transformio that can write garbage and no transformio should be registered)" diff --git a/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx b/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx index d36eabf317c..536a8a76605 100644 --- a/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx +++ b/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx @@ -104,7 +104,7 @@ ReadWriteTest(const std::string fileName, const bool isRealDisplacementField, co writer->AddTransform(displacementTransform); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -116,7 +116,7 @@ ReadWriteTest(const std::string fileName, const bool isRealDisplacementField, co { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -220,7 +220,7 @@ oneTest(const std::string goodname, const std::string badname, const bool UseCom std::cout << "Testing read : " << std::endl; reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -240,7 +240,7 @@ oneTest(const std::string goodname, const std::string badname, const bool UseCom ++lit; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -285,7 +285,7 @@ oneTest(const std::string goodname, const std::string badname, const bool UseCom { badwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -301,7 +301,7 @@ oneTest(const std::string goodname, const std::string badname, const bool UseCom { badreader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { caught = true; std::cout << "Caught exception as expected" << std::endl; diff --git a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx index d68654e28d3..125070262aa 100644 --- a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx +++ b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx @@ -100,7 +100,7 @@ TxtTransformIOTemplate::ReadComponentFile(std::string Valu { reader->Update(); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { itkExceptionMacro("Error reading component file: " << Value << std::endl << ex); } diff --git a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx index df12a8037d4..509cba06d94 100644 --- a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx +++ b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx @@ -75,7 +75,7 @@ oneTest(const std::string & outputDirectory, const char * goodname, const char * std::cout << "Testing read : " << std::endl; reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -106,7 +106,7 @@ oneTest(const std::string & outputDirectory, const char * goodname, const char * return EXIT_FAILURE; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -151,7 +151,7 @@ oneTest(const std::string & outputDirectory, const char * goodname, const char * { badwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -167,7 +167,7 @@ oneTest(const std::string & outputDirectory, const char * goodname, const char * { badreader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { caught = true; std::cout << "Caught exception as expected" << std::endl; @@ -219,7 +219,7 @@ secondTest(const std::string & outputDirectory) ++lit; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "EXPECTED Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx b/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx index 66e713b3956..f772e7be4ae 100644 --- a/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx +++ b/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx @@ -102,7 +102,7 @@ check_linear(const char * linear_transform) std::cout << "Testing read : " << std::endl; reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -148,7 +148,7 @@ check_linear(const char * linear_transform) } std::cout << " Done !" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -230,7 +230,7 @@ check_nonlinear_double(const char * nonlinear_transform) { nlwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -244,7 +244,7 @@ check_nonlinear_double(const char * nonlinear_transform) { nlreader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -371,7 +371,7 @@ check_nonlinear_float(const char * nonlinear_transform) { nlwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -385,7 +385,7 @@ check_nonlinear_float(const char * nonlinear_transform) { nlreader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -520,7 +520,7 @@ check_composite(const char * transform_file) std::cout << "Testing read : " << std::endl; reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -567,7 +567,7 @@ check_composite(const char * transform_file) } std::cout << " Done !" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -644,7 +644,7 @@ check_composite2(const char * transform_file, const char * transform_grid_file) writer->SetInput(field); writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing the deformation field" << std::endl; std::cerr << excp << std::endl; @@ -713,7 +713,7 @@ check_composite2(const char * transform_file, const char * transform_grid_file) std::cout << " Done !" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx b/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx index 51f206cef03..c0e83f3b9c0 100644 --- a/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx +++ b/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx @@ -117,7 +117,7 @@ compare_linear(const char * linear_transform) } } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -190,7 +190,7 @@ compare_nonlinear_double(const char * nonlinear_transform) { nlwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx b/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx index 50dfb45e361..25d74b372a4 100644 --- a/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx +++ b/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx @@ -78,7 +78,7 @@ oneTest(const char * goodname, const char * badname) reader->Update(); std::cout << goodname << "is read from disk successfully." << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -97,7 +97,7 @@ oneTest(const char * goodname, const char * badname) ++lit; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -142,7 +142,7 @@ oneTest(const char * goodname, const char * badname) { badwriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while saving the transforms" << std::endl; std::cerr << excp << std::endl; @@ -158,7 +158,7 @@ oneTest(const char * goodname, const char * badname) { badreader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { caught = true; std::cout << "Caught exception as expected" << std::endl; @@ -211,7 +211,7 @@ secondTest() ++lit; } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "EXPECTED Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; @@ -241,7 +241,7 @@ thirdTest() reader->Update(); std::cerr << "FAILED to throw expected exception" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "EXPECTED Error while reading the transforms" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx index 2db8dc2704d..17d9810842d 100644 --- a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx @@ -145,7 +145,7 @@ class VTKImageIOTester return true; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e << std::endl; return false; @@ -271,7 +271,7 @@ class VTKImageIOTester // reading successful, so return true return true; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << e << std::endl; return false; diff --git a/Modules/IO/VTK/test/itkVTKImageIOFileReadTest.cxx b/Modules/IO/VTK/test/itkVTKImageIOFileReadTest.cxx index fcffbd7f5b5..59f37d5373a 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOFileReadTest.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOFileReadTest.cxx @@ -45,7 +45,7 @@ ReadImage(const std::string fileName, typename TImage::Pointer image) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e.what() << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/VTK/test/itkVTKImageIOTest2.cxx b/Modules/IO/VTK/test/itkVTKImageIOTest2.cxx index d188dd5cbb0..1aed77007e6 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOTest2.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOTest2.cxx @@ -56,7 +56,7 @@ itkVTKImageIOTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx index 43bc8bddc0c..c23b9573c9b 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx @@ -50,7 +50,7 @@ itkBioRadImageIOTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file reader " << std::endl; std::cerr << e << std::endl; @@ -68,7 +68,7 @@ itkBioRadImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "exception in file writer " << std::endl; std::cerr << e << std::endl; diff --git a/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx b/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx index cf9e7e87721..28d38f12c04 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx @@ -91,7 +91,7 @@ itkImageToHistogramFilterTest4Templated(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx b/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx index 00c5ee2cfa4..10debb88b53 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx @@ -92,7 +92,7 @@ itkMaskedImageToHistogramFilterTest1(int argc, char * argv[]) { histogramFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -118,7 +118,7 @@ itkMaskedImageToHistogramFilterTest1(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/IntegratedTest/test/itkMaximumRatioDecisionRuleTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkMaximumRatioDecisionRuleTest.cxx index 7f0f25da4ab..edf8254303d 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkMaximumRatioDecisionRuleTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkMaximumRatioDecisionRuleTest.cxx @@ -61,7 +61,7 @@ itkMaximumRatioDecisionRuleTest(int, char *[]) << " probability is not set yet " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception= " << excp << std::endl; } @@ -89,7 +89,7 @@ itkMaximumRatioDecisionRuleTest(int, char *[]) << " score vector size doesn't match with the apriori vector" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception= " << excp << std::endl; } @@ -115,7 +115,7 @@ itkMaximumRatioDecisionRuleTest(int, char *[]) { decisionValue = decisionRule->Evaluate(membershipScoreVector); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception= " << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx b/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx index 7086bcdf1f7..a46d58335aa 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx @@ -248,7 +248,7 @@ itkShrinkImagePreserveObjectPhysicalLocations(int, char *[]) writer->SetInput(castFilter->GetOutput()); writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Exception Object caught: " << std::endl; std::cout << err << std::endl; diff --git a/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx index f22695ffbbe..d4d6a05870c 100644 --- a/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx @@ -112,7 +112,7 @@ itkAreaClosingImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx index d30c3355658..e3c43b1f74a 100644 --- a/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx @@ -112,7 +112,7 @@ itkAreaOpeningImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkConformalFlatteningMeshFilterTest.cxx b/Modules/Nonunit/Review/test/itkConformalFlatteningMeshFilterTest.cxx index 6e87eb9afc2..1461a82f70b 100644 --- a/Modules/Nonunit/Review/test/itkConformalFlatteningMeshFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkConformalFlatteningMeshFilterTest.cxx @@ -52,7 +52,7 @@ itkConformalFlatteningMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -100,7 +100,7 @@ itkConformalFlatteningMeshFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -123,7 +123,7 @@ itkConformalFlatteningMeshFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkConformalFlatteningQuadEdgeMeshFilterTest.cxx b/Modules/Nonunit/Review/test/itkConformalFlatteningQuadEdgeMeshFilterTest.cxx index af55bea77a3..fbf4c7077a7 100644 --- a/Modules/Nonunit/Review/test/itkConformalFlatteningQuadEdgeMeshFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkConformalFlatteningQuadEdgeMeshFilterTest.cxx @@ -56,7 +56,7 @@ itkConformalFlatteningQuadEdgeMeshFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -99,7 +99,7 @@ itkConformalFlatteningQuadEdgeMeshFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -122,7 +122,7 @@ itkConformalFlatteningQuadEdgeMeshFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx index 40156237ba0..ceed2f0f519 100644 --- a/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx @@ -157,7 +157,7 @@ itkDirectFourierReconstructionImageToImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "An error occurred somewhere:" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx index 41af8a50906..be83645a05b 100644 --- a/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx @@ -95,7 +95,7 @@ itkFastApproximateRankImageFilterTest(int ac, char * av[]) filter->SetRank(0.5); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx index df8a8224bd2..8ce90ca1068 100644 --- a/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx @@ -124,7 +124,7 @@ LabelGeometryImageFilterTest(std::string labelImageName, { labelGeometryFilter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -139,7 +139,7 @@ LabelGeometryImageFilterTest(std::string labelImageName, { intensityWriter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } @@ -224,7 +224,7 @@ LabelGeometryImageFilterTest(std::string labelImageName, { writer->Write(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; @@ -256,7 +256,7 @@ LabelGeometryImageFilterTest(std::string labelImageName, newReader->Parse(); compareReader->Parse(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught!" << std::endl; std::cerr << exp << std::endl; diff --git a/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx b/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx index 6c44ca72dc7..b44e9868112 100644 --- a/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx +++ b/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx @@ -69,7 +69,7 @@ itkOptMattesMutualInformationImageToImageMetricThreadsTest1(int argc, char * arg fixedImageReader->Update(); movingImageReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -132,7 +132,7 @@ itkOptMattesMutualInformationImageToImageMetricThreadsTest1(int argc, char * arg metric->GetDerivative(displacement, derivative_separate); metric->GetValueAndDerivative(displacement, value_combined, derivative_combined); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << excep << std::endl; return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx index 4f97b7f5e53..c68b5bd60b7 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx @@ -108,7 +108,7 @@ itkScalarChanAndVeseDenseLevelSetImageFilterTest2(int argc, char * argv[]) { writer1->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx index 46401079785..0896b102a08 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx @@ -119,7 +119,7 @@ itkScalarChanAndVeseDenseLevelSetImageFilterTest4(int argc, char * argv[]) { writer1->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx index b8e7b33b9d0..9fbd439e8be 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx @@ -109,7 +109,7 @@ itkScalarChanAndVeseSparseLevelSetImageFilterTest2(int argc, char * argv[]) { writer1->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx index 602ccb88fef..235b57085f3 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx @@ -100,7 +100,7 @@ itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1(int argc, char * } } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx index 3e00795d252..058ec4a1b56 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx @@ -111,7 +111,7 @@ itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2(int, char *[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx index 5ce09cc21cb..1f826b81de9 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx @@ -113,7 +113,7 @@ itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3(int, char *[]) return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); return EXIT_FAILURE; diff --git a/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx b/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx index 5b0beab564e..6416c80dcd2 100644 --- a/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx +++ b/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx @@ -51,7 +51,7 @@ itkVoxBoCUBImageIOTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx b/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx index 2f0681719e3..babf7784b2d 100644 --- a/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx @@ -74,7 +74,7 @@ itkFEMPArrayTest(int, char *[]) array.Find(2); array.Find(0); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -104,7 +104,7 @@ itkFEMPArrayTest(int, char *[]) { node = array.Find(200); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -117,7 +117,7 @@ itkFEMPArrayTest(int, char *[]) std::cout << "Error: exception should have been thrown here... " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Passed Exception test: " << e << std::endl; } diff --git a/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx b/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx index ba54bc66e5b..814e66fab11 100644 --- a/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx @@ -245,7 +245,7 @@ itkFEMSolverHyperbolicTest(int ac, char * av[]) { SH->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ITK exception detected: " << err; return EXIT_FAILURE; diff --git a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx index 689695cb52a..2cde0174e74 100644 --- a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx +++ b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx @@ -187,7 +187,7 @@ itkNarrowBandImageFilterBaseTest(int argc, char * argv[]) writer->SetFileName(argv[1]); writer->Write(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { (&err)->Print(std::cerr); std::cout << "Test failed." << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx index b2051f6b722..61fff698d8c 100644 --- a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx @@ -314,7 +314,7 @@ AmoebaTest1() itkOptimizer->SetInitialPosition(itkOptimizer->GetCurrentPosition()); itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -399,7 +399,7 @@ AmoebaTest1() std::cout << std::endl; itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -487,7 +487,7 @@ AmoebaTest2() { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -519,7 +519,7 @@ AmoebaTest2() { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx index 17fa101ad43..2b7854ca765 100644 --- a/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx @@ -212,7 +212,7 @@ itkConjugateGradientOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx index e04833dd551..33cda2e07a0 100644 --- a/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx @@ -199,7 +199,7 @@ itkExhaustiveOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx index ef2639dc7ae..cd302409dcd 100644 --- a/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx @@ -148,7 +148,7 @@ itkFRPROptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -201,7 +201,7 @@ itkFRPROptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx index 04f8ebab942..dd1a8a64a21 100644 --- a/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx @@ -146,7 +146,7 @@ itkGradientDescentOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx index 2771b8e3c66..5e57b8b6331 100644 --- a/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx @@ -190,7 +190,7 @@ IBPSOTest1() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "[Test 1 FAILURE]" << std::endl; std::cout << "Exception thrown ! " << std::endl; @@ -270,7 +270,7 @@ IBPSOTest2() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "[Test 2 FAILURE]" << std::endl; std::cout << "Exception thrown ! " << std::endl; @@ -416,7 +416,7 @@ IBPSOTest3() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "[Test 3 FAILURE]" << std::endl; std::cout << "Exception thrown ! " << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx index 904c4bd452c..72b42fed8c0 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx @@ -241,7 +241,7 @@ itkLBFGSBOptimizerTest(int, char *[]) itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx index 6431f804db5..00af3b0448d 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx @@ -173,7 +173,7 @@ itkLBFGSOptimizerTest(int, char *[]) itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx index 535bcea3e41..3f0847d4825 100644 --- a/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx @@ -252,7 +252,7 @@ itkRunLevenbergMarquardOptimization(bool useGradient, { optimizer->SetCostFunction(costFunction); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -297,7 +297,7 @@ itkRunLevenbergMarquardOptimization(bool useGradient, { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx index 44a2dae889f..0de8b2244f1 100644 --- a/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx @@ -188,7 +188,7 @@ itkOnePlusOneEvolutionaryOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx index 600f08d9844..9dfac7a3cc2 100644 --- a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx @@ -182,7 +182,7 @@ PSOTest1() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "[Test 1 FAILURE]" << std::endl; std::cout << "Exception thrown ! " << std::endl; @@ -258,7 +258,7 @@ PSOTest2() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "[Test 2 FAILURE]" << std::endl; std::cout << "Exception thrown ! " << std::endl; @@ -469,7 +469,7 @@ PSOTest3() return EXIT_FAILURE; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "[Test 3 FAILURE]" << std::endl; std::cout << "Exception thrown ! " << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx index 31ed33ad83c..cc785a9149c 100644 --- a/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx @@ -131,7 +131,7 @@ itkPowellOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx index 7b613d4360f..63ce7f1d421 100644 --- a/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx @@ -149,7 +149,7 @@ itkRegularStepGradientDescentOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -194,7 +194,7 @@ itkRegularStepGradientDescentOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -239,7 +239,7 @@ itkRegularStepGradientDescentOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << excp << std::endl; return EXIT_FAILURE; @@ -262,7 +262,7 @@ itkRegularStepGradientDescentOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { expectedExceptionReceived = true; std::cout << "Expected Exception " << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx index 849ff452185..213129ec103 100644 --- a/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx @@ -145,7 +145,7 @@ itkSPSAOptimizerTest(int, char *[]) { itkOptimizer->GuessParameters(50, 70.0); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Guessing Parameters" << std::endl; @@ -160,7 +160,7 @@ itkSPSAOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx index 2f13dcea15d..4916b928d87 100644 --- a/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx @@ -290,7 +290,7 @@ itkVersorRigid3DTransformOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx index ce8cdfd8175..31337abfd6f 100644 --- a/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx @@ -237,7 +237,7 @@ itkVersorTransformOptimizerTest(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx index 8469412178b..a09fa3de140 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx @@ -378,7 +378,7 @@ AmoebaTest1() itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -476,7 +476,7 @@ AmoebaTest2() { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -508,7 +508,7 @@ AmoebaTest2() { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx index 0158f819f02..da04880ead7 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx @@ -147,7 +147,7 @@ itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int number { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error ocurred during Optimization:" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx index 59677e740bc..ab5ab780d98 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx @@ -184,7 +184,7 @@ itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterat { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization:" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx index bbe4f313528..a4baaa649ff 100644 --- a/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx @@ -164,7 +164,7 @@ ConjugateGradientLineSearchOptimizerv4RunTest(itk::ConjugateGradientLineSearchOp itkOptimizer->StartOptimization(); std::cout << "currentPosition after optimization: " << itkOptimizer->GetCurrentPosition() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -284,7 +284,7 @@ itkConjugateGradientLineSearchOptimizerv4Test(int, char *[]) { badOptimizer->GetCurrentPosition(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception!"; std::cout << e << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx index f98bd1fdd6a..a546ca2dbb3 100644 --- a/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx @@ -251,7 +251,7 @@ itkExhaustiveOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx index 22f7b3b0778..06ff481ea21 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx @@ -166,7 +166,7 @@ GradientDescentLineSearchOptimizerv4RunTest(itk::GradientDescentLineSearchOptimi itkOptimizer->StartOptimization(); std::cout << "currentPosition after optimization: " << itkOptimizer->GetCurrentPosition() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -270,7 +270,7 @@ itkGradientDescentLineSearchOptimizerv4Test(int, char *[]) { badOptimizer->GetCurrentPosition(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception!"; std::cout << e << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx index 1f5518e12c9..a35092a48c7 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx @@ -160,7 +160,7 @@ GradientDescentOptimizerv4RunTest(itk::GradientDescentOptimizerv4::Pointer & itkOptimizer->StartOptimization(); std::cout << "currentPosition after optimization: " << itkOptimizer->GetCurrentPosition() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; @@ -339,7 +339,7 @@ itkGradientDescentOptimizerv4Test(int, char *[]) { badOptimizer->GetCurrentPosition(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Caught expected exception!"; std::cout << e << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx index b45bf11220d..9698c0c738d 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx @@ -186,7 +186,7 @@ itkGradientDescentOptimizerv4Test2(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx index a4a01392e22..94e945a04f9 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx @@ -208,7 +208,7 @@ itkLBFGS2Optimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -270,7 +270,7 @@ itkLBFGS2Optimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx index ac0d8d1e4cc..cc911276678 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx @@ -297,7 +297,7 @@ itkLBFGSBOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -388,7 +388,7 @@ itkLBFGSBOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -446,7 +446,7 @@ itkLBFGSBOptimizerv4Test(int, char *[]) { itkOptimizer2->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx index 13d03697646..d458f221a94 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx @@ -214,7 +214,7 @@ itkLBFGSOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -284,7 +284,7 @@ itkLBFGSOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; @@ -318,7 +318,7 @@ itkLBFGSOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx index af83ba25757..512775fbedd 100644 --- a/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx @@ -281,7 +281,7 @@ MultiGradientOptimizerv4RunTest(itk::MultiGradientOptimizerv4::Pointer & itkOpti itkOptimizer->StartOptimization(); std::cout << "currentPosition after optimization: " << itkOptimizer->GetCurrentPosition() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx index 09532bdd332..713cb9bcced 100644 --- a/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx @@ -159,7 +159,7 @@ MultiStartOptimizerv4RunTest(itk::MultiStartOptimizerv4::Pointer & itkOptimizer) itkOptimizer->StartOptimization(); std::cout << "currentPosition after optimization: " << itkOptimizer->GetCurrentPosition() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx index 72e40eb0c1a..9880dbe71ca 100644 --- a/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx @@ -234,7 +234,7 @@ itkOnePlusOneEvolutionaryOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx index 13ecad6f9da..65ade32ed21 100644 --- a/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx @@ -182,7 +182,7 @@ itkPowellOptimizerv4Test(int, char *[]) { itkOptimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx index 85f551d0d70..eb902819b57 100644 --- a/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx @@ -160,7 +160,7 @@ itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations, { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization:" << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx index 089c967819b..2dae0d2c96d 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx @@ -223,7 +223,7 @@ RegularStepGradientDescentOptimizerv4TestHelper( std::cout << "currentPosition after optimization: " << optimizer->GetMetric()->GetParameters() << std::endl; std::cout << " Stop Condition = " << optimizer->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx index 24b91ce9bc7..1ff8fed05b1 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx @@ -76,7 +76,7 @@ itkCovarianceSampleFilterTest(int, char *[]) { sampleGeneratingFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -98,7 +98,7 @@ itkCovarianceSampleFilterTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -118,7 +118,7 @@ itkCovarianceSampleFilterTest(int, char *[]) { covarianceFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -159,7 +159,7 @@ itkCovarianceSampleFilterTest(int, char *[]) { meanFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx index e0b1647e0bb..7bade717aea 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx @@ -62,7 +62,7 @@ itkCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -157,7 +157,7 @@ itkCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -249,7 +249,7 @@ itkCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx index ba01321989e..76ece2e1f82 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx @@ -150,7 +150,7 @@ itkCovarianceSampleFilterTest3(int, char *[]) filter->CreateInvalidOutput(); std::cerr << "Exception should have been thrown: " << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -162,7 +162,7 @@ itkCovarianceSampleFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx index 6ff56109b0f..d3d64065c3d 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx @@ -94,7 +94,7 @@ itkDistanceMetricTest(int, char *[]) << "an exception should have been thrown" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception thrown: " << excpt << std::endl; } @@ -106,7 +106,7 @@ itkDistanceMetricTest(int, char *[]) MeasurementVectorSizeType sameSize = 17; distance->SetMeasurementVectorSize(sameSize); } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception thrown: " << excpt << std::endl; return EXIT_FAILURE; @@ -125,7 +125,7 @@ itkDistanceMetricTest(int, char *[]) << "should result in an exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception thrown: " << excpt << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx b/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx index 8a39fbcd98c..f698a25026c 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx @@ -98,7 +98,7 @@ itkDistanceMetricTest2(int, char *[]) MeasurementVectorSizeType sameSize = 3; distance->SetMeasurementVectorSize(sameSize); } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception thrown: " << excpt << std::endl; return EXIT_FAILURE; @@ -117,7 +117,7 @@ itkDistanceMetricTest2(int, char *[]) << "should result in an exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception thrown: " << excpt << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx b/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx index 857ff14edda..2e3095bc1c2 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx @@ -68,7 +68,7 @@ itkDistanceToCentroidMembershipFunctionTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caughted expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx index 1002768a41f..663fce65432 100644 --- a/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx @@ -49,7 +49,7 @@ itkEuclideanDistanceMetricTest(int, char *[]) "size, Exception should have been thrown" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx index 0e47c0be29c..8421274824b 100644 --- a/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx @@ -50,7 +50,7 @@ itkEuclideanSquareDistanceMetricTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx index 171d12bc531..c2a31a109de 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx @@ -55,7 +55,7 @@ itkGaussianMembershipFunctionTest(int, char *[]) << std::endl; // return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caughted expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx index 7f4bc1cc7aa..9ec7934b863 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx @@ -130,7 +130,7 @@ itkGaussianRandomSpatialNeighborSubsamplerTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkHistogramTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramTest.cxx index fb9c2ebbab4..de0029cd9b5 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramTest.cxx @@ -63,7 +63,7 @@ itkHistogramTest(int, char *[]) pass = false; whereFail = "Initialize(size) before SetMeasurementVectorSize() didn't throw expected exception"; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception "; std::cout << excp << std::endl; @@ -374,7 +374,7 @@ itkHistogramTest(int, char *[]) pass = false; whereFail = "SetMeasurementVectorSize() didn't throw expected exception"; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception "; std::cout << excp << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx index a4a61bc6ff9..fece13bf286 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx @@ -114,7 +114,7 @@ itkHistogramToTextureFeaturesFilterTest(int, char *[]) filter->Update(); passed = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -131,7 +131,7 @@ itkHistogramToTextureFeaturesFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx index 08af3d1cfcf..bc5eefbd147 100644 --- a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx @@ -101,7 +101,7 @@ itkImageToHistogramFilterTest2(int argc, char * argv[]) { histogramFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -139,7 +139,7 @@ itkImageToHistogramFilterTest2(int argc, char * argv[]) { histogramFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -167,7 +167,7 @@ itkImageToHistogramFilterTest2(int argc, char * argv[]) { histogramFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest3.cxx index 7d455973adb..497b38e0387 100644 --- a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest3.cxx @@ -43,7 +43,7 @@ itkImageToHistogramFilterTest3(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encountered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx index f9f9c4701fa..9a77b5803fa 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx @@ -63,7 +63,7 @@ itkImageToListSampleAdaptorTestTemplate() is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -75,7 +75,7 @@ itkImageToListSampleAdaptorTestTemplate() is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -87,7 +87,7 @@ itkImageToListSampleAdaptorTestTemplate() is not set yet " << m << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -99,7 +99,7 @@ itkImageToListSampleAdaptorTestTemplate() is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -112,7 +112,7 @@ itkImageToListSampleAdaptorTestTemplate() is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx index eb2b0605881..9f400fb4d6b 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx @@ -142,7 +142,7 @@ itkImageToListSampleFilterTest(int, char *[]) Update() is invoked without setting an input "; pass = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -218,7 +218,7 @@ itkImageToListSampleFilterTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx index f346585d9a1..d276ad5212a 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx @@ -96,7 +96,7 @@ itkImageToListSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx index f90e317c285..895ca4ac3f3 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx @@ -105,7 +105,7 @@ itkImageToListSampleFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx index 52050d6e1cd..1912e97e873 100644 --- a/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx @@ -74,7 +74,7 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -86,7 +86,7 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -99,7 +99,7 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -112,7 +112,7 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -125,7 +125,7 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) is not set yet" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkListSampleTest.cxx b/Modules/Numerics/Statistics/test/itkListSampleTest.cxx index a823d12c567..3cff817f245 100644 --- a/Modules/Numerics/Statistics/test/itkListSampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkListSampleTest.cxx @@ -69,7 +69,7 @@ itkListSampleTest(int argc, char * argv[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -421,7 +421,7 @@ itkListSampleTest(int argc, char * argv[]) std::cerr << "Failed to throw expected exception in SetMeasurementVectorSize() " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -452,7 +452,7 @@ itkListSampleTest(int argc, char * argv[]) MeasurementVectorType measurement = sample->GetMeasurementVector(largestId + 10); std::cerr << measurement << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; exceptionWorks = true; diff --git a/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx index b47592f486f..383a716f6dd 100644 --- a/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx @@ -127,7 +127,7 @@ itkMahalanobisDistanceMetricTest(int, char *[]) std::cerr << "Exception should have been thrown: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception caught: " << excpt << std::endl; } @@ -247,7 +247,7 @@ itkMahalanobisDistanceMetricTest(int, char *[]) << "Exception should have been thrown: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excpt) + catch (const itk::ExceptionObject & excpt) { std::cerr << "Exception caught: " << excpt << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx index 9fc92e267d8..2ae834a01a6 100644 --- a/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx @@ -49,7 +49,7 @@ itkManhattanDistanceMetricTest(int, char *[]) "size, Exception should have been thrown" << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx index c4723c6f600..1300cf39584 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx @@ -68,7 +68,7 @@ itkMeanSampleFilterTest(int, char *[]) Update() is invoked without setting an input "; pass = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -87,7 +87,7 @@ itkMeanSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx index 54c4dc5ce63..a605edbb5a2 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx @@ -64,7 +64,7 @@ itkMeanSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx index fa45117b7ab..79be9f699c4 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx @@ -109,7 +109,7 @@ itkMeanSampleFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx b/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx index c3fef5419e3..9049a7847ea 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx @@ -94,7 +94,7 @@ itkMembershipFunctionBaseTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caughted expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx index 36b94cfb1d5..16f1d6e70dc 100644 --- a/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx @@ -52,7 +52,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) << std::endl; exceptionsProperlyCaught = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -65,7 +65,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) << std::endl; exceptionsProperlyCaught = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -79,7 +79,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) std::cerr << "The invalid listSample->GetMeasurementVector is: " << m << std::endl; exceptionsProperlyCaught = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -93,7 +93,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) << std::endl; exceptionsProperlyCaught = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } @@ -107,7 +107,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) << std::endl; exceptionsProperlyCaught = false; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caught expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkSampleTest.cxx b/Modules/Numerics/Statistics/test/itkSampleTest.cxx index 005fd19acc6..59ad17529e4 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest.cxx @@ -186,7 +186,7 @@ itkSampleTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Caughted expected exception: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkSampleTest2.cxx b/Modules/Numerics/Statistics/test/itkSampleTest2.cxx index 28b1b9e09b0..a492427e2b7 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest2.cxx @@ -190,7 +190,7 @@ itkSampleTest2(int, char *[]) std::cerr << "Sample failed to throw an exception when calling SetMeasurementVectorSize()" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -204,7 +204,7 @@ itkSampleTest2(int, char *[]) { sample->SetMeasurementVectorSize(MeasurementVectorSize + 5); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest3.cxx b/Modules/Numerics/Statistics/test/itkSampleTest3.cxx index 9cae170a0f9..d1a31f00928 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest3.cxx @@ -191,7 +191,7 @@ itkSampleTest3(int, char *[]) std::cerr << "Sample failed to throw an exception when calling SetMeasurementVectorSize()" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -205,7 +205,7 @@ itkSampleTest3(int, char *[]) { sample->SetMeasurementVectorSize(MeasurementVectorSize + 5); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest4.cxx b/Modules/Numerics/Statistics/test/itkSampleTest4.cxx index 2b95042fe36..c19e5e966da 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest4.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest4.cxx @@ -191,7 +191,7 @@ itkSampleTest4(int, char *[]) std::cerr << "Sample failed to throw an exception when calling SetMeasurementVectorSize()" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -205,7 +205,7 @@ itkSampleTest4(int, char *[]) { sample->SetMeasurementVectorSize(MeasurementVectorSize + 5); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx index b1b34ae9bfa..5e8fa95859f 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx @@ -125,7 +125,7 @@ itkSampleToHistogramFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -799,7 +799,7 @@ itkSampleToHistogramFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest2.cxx index b789e6842e6..569f0b78d46 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest2.cxx @@ -110,7 +110,7 @@ itkSampleToHistogramFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -158,7 +158,7 @@ itkSampleToHistogramFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -206,7 +206,7 @@ itkSampleToHistogramFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -254,7 +254,7 @@ itkSampleToHistogramFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx index 7475db3a0df..5e16cc39dad 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx @@ -110,7 +110,7 @@ itkSampleToHistogramFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -161,7 +161,7 @@ itkSampleToHistogramFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -183,7 +183,7 @@ itkSampleToHistogramFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -197,7 +197,7 @@ itkSampleToHistogramFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx index c814d56ae78..005f5619176 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx @@ -126,7 +126,7 @@ itkSampleToHistogramFilterTest4(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx index 0d249647e7e..046b086d5bd 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx @@ -113,7 +113,7 @@ itkSampleToHistogramFilterTest5(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx index a51be47526d..df518adbd2a 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx @@ -119,7 +119,7 @@ itkSampleToHistogramFilterTest6(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -169,7 +169,7 @@ itkSampleToHistogramFilterTest6(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx index ee556188fd6..425859e05aa 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx @@ -110,7 +110,7 @@ itkSampleToHistogramFilterTest7(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -161,7 +161,7 @@ itkSampleToHistogramFilterTest7(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -183,7 +183,7 @@ itkSampleToHistogramFilterTest7(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -197,7 +197,7 @@ itkSampleToHistogramFilterTest7(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx index 510b6332f20..d8f03e524ce 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx @@ -93,7 +93,7 @@ itkScalarImageToCooccurrenceListSampleFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx index 01c76210395..7d8b64329b3 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx @@ -109,7 +109,7 @@ itkScalarImageToCooccurrenceMatrixFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -143,7 +143,7 @@ itkScalarImageToCooccurrenceMatrixFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -409,7 +409,7 @@ itkScalarImageToCooccurrenceMatrixFilterTest(int, char *[]) return EXIT_SUCCESS; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx index 051f9692322..de4fa5d0554 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx @@ -334,7 +334,7 @@ itkScalarImageToCooccurrenceMatrixFilterTest2(int, char *[]) return EXIT_SUCCESS; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx index e3f3d1e0725..e8f79fc3b05 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx @@ -115,7 +115,7 @@ itkScalarImageToRunLengthFeaturesFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -146,7 +146,7 @@ itkScalarImageToRunLengthFeaturesFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -358,7 +358,7 @@ itkScalarImageToRunLengthFeaturesFilterTest(int, char *[]) return EXIT_SUCCESS; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx index 7ac2f85816f..34d632e092a 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx @@ -272,7 +272,7 @@ itkScalarImageToRunLengthMatrixFilterTest(int, char *[]) return EXIT_SUCCESS; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx index 4d3ef8d51cc..c605aadfa42 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx @@ -115,7 +115,7 @@ itkScalarImageToTextureFeaturesFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -148,7 +148,7 @@ itkScalarImageToTextureFeaturesFilterTest(int, char *[]) std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -348,7 +348,7 @@ itkScalarImageToTextureFeaturesFilterTest(int, char *[]) return EXIT_SUCCESS; } } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx index 6a26fd8f55d..cd8afe701c0 100644 --- a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx @@ -79,7 +79,7 @@ itkStandardDeviationPerComponentSampleFilterTest(int, char *[]) { sampleGeneratingFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -103,7 +103,7 @@ itkStandardDeviationPerComponentSampleFilterTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -123,7 +123,7 @@ itkStandardDeviationPerComponentSampleFilterTest(int, char *[]) { standardDeviationFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -170,7 +170,7 @@ itkStandardDeviationPerComponentSampleFilterTest(int, char *[]) { covarianceFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx b/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx index 53d5c6c77ee..728b2643c95 100644 --- a/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx @@ -67,7 +67,7 @@ itkSubsampleTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; @@ -117,7 +117,7 @@ itkSubsampleTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -132,7 +132,7 @@ itkSubsampleTest(int, char *[]) std::cerr << "The invalid subsample->GetMeasurementVector() is: " << vec << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -146,7 +146,7 @@ itkSubsampleTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -161,7 +161,7 @@ itkSubsampleTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -179,7 +179,7 @@ itkSubsampleTest(int, char *[]) std::cerr << "The invalid subsample->GetMeasurementVectorByIndex() is: " << measurementVector << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -196,7 +196,7 @@ itkSubsampleTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } @@ -213,7 +213,7 @@ itkSubsampleTest(int, char *[]) std::cout << "Instance identifier: " << id << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Expected Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx b/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx index 51026c502d6..8624563bdad 100644 --- a/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx @@ -70,7 +70,7 @@ itkSubsampleTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -109,7 +109,7 @@ itkSubsampleTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx b/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx index 3abfcf9a91b..9faddbfdecb 100644 --- a/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx +++ b/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx @@ -123,7 +123,7 @@ itkUniformRandomSpatialNeighborSubsamplerTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx index f1d42bd686b..e49d6598ca4 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx @@ -113,7 +113,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -134,7 +134,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) std::cerr << "Exception should have been thrown: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -148,7 +148,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -214,7 +214,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; @@ -275,7 +275,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; @@ -349,7 +349,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx index 2829c995734..5f606bdcb08 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx @@ -114,7 +114,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -135,7 +135,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) std::cerr << "Exception should have been thrown: " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -149,7 +149,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << "Expected exception caught: " << excp << std::endl; } @@ -219,7 +219,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; @@ -281,7 +281,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; @@ -356,7 +356,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx index cf95a12a716..892c5c64854 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx @@ -115,7 +115,7 @@ itkWeightedMeanSampleFilterTest(int, char *[]) << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -136,7 +136,7 @@ itkWeightedMeanSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -169,7 +169,7 @@ itkWeightedMeanSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -196,7 +196,7 @@ itkWeightedMeanSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } @@ -224,7 +224,7 @@ itkWeightedMeanSampleFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception caught: " << excp << std::endl; } diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx index 715529be438..1a37b7b2251 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx @@ -195,7 +195,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { e.Print(std::cerr); } diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx index f8458428f77..4908e64f243 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx @@ -306,7 +306,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -365,7 +365,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -391,7 +391,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -411,7 +411,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -465,7 +465,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx index 70fb8e59700..0b711cd93b8 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx @@ -226,7 +226,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -293,7 +293,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -319,7 +319,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -339,7 +339,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -393,7 +393,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx index 2008046d6cd..903bdbda62b 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx @@ -202,7 +202,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -306,7 +306,7 @@ main(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -354,7 +354,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -380,7 +380,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -400,7 +400,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -454,7 +454,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx index e5f969fb65b..421a83b47ad 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx @@ -280,7 +280,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -337,7 +337,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -363,7 +363,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -383,7 +383,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -437,7 +437,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx index d462ed2b984..91b1f2ec4a2 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx @@ -328,7 +328,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -387,7 +387,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -413,7 +413,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -433,7 +433,7 @@ main(int argc, char * argv[]) { writer2->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -487,7 +487,7 @@ main(int argc, char * argv[]) { fieldWriter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformationFieldJacobian.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformationFieldJacobian.cxx index c118c4d22c5..ff3fe8111b0 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformationFieldJacobian.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformationFieldJacobian.cxx @@ -66,7 +66,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx index 9d3f56c886a..42c68e5037f 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx @@ -315,7 +315,7 @@ main(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx index 1db72a8f150..9a825c5e3ad 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx @@ -235,7 +235,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx index e3971493ac8..ba3927463fd 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx @@ -226,7 +226,7 @@ main(int argc, char * argv[]) { maskReader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -256,7 +256,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx index e4ffc88d5ac..99a2d1df0fe 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx @@ -232,7 +232,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition = " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx index 6a857fccaed..b860475a044 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx @@ -248,7 +248,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx index 6f33d4d4cc5..ddb2dea4828 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx @@ -342,7 +342,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx index 0cdc314bf0b..0d09a2255a7 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx @@ -283,7 +283,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx index 711dd4d815c..e6db7ee4195 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx @@ -324,7 +324,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -470,7 +470,7 @@ main(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "ExceptionObject while writing the resampled image !" << std::endl; std::cerr << excp << std::endl; @@ -529,7 +529,7 @@ main(int argc, char * argv[]) writer2->Update(); } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing difference images" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx index 65b0cc5b80f..6b844b30b02 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx @@ -300,7 +300,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; @@ -588,7 +588,7 @@ main(int argc, char * argv[]) writer2->Update(); } } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Error while writing difference images" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx index d1d07e66608..43608164a35 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx @@ -311,7 +311,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx index f769fa08fb1..b97943adfbc 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx @@ -280,7 +280,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx index e7dbeac7673..cb6a13ab370 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx @@ -308,7 +308,7 @@ main(int argc, char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/MeanSquaresImageMetric1.cxx b/Modules/Registration/Common/test/RegistrationITKv3/MeanSquaresImageMetric1.cxx index b8dbf24f99c..bcda7a80b94 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/MeanSquaresImageMetric1.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/MeanSquaresImageMetric1.cxx @@ -80,7 +80,7 @@ main(int argc, char * argv[]) fixedReader->Update(); movingReader->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; @@ -135,7 +135,7 @@ main(int argc, char * argv[]) { metric->Initialize(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception catched !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx b/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx index 1219f4482d9..aa48b6cfcf6 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx @@ -450,7 +450,7 @@ main(int argc, const char * argv[]) std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription() << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx index 47e16cf4f64..b897fe7a042 100644 --- a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx @@ -71,7 +71,7 @@ itkBlockMatchingImageFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Error in reading the input image: " << e << std::endl; return EXIT_FAILURE; @@ -142,7 +142,7 @@ itkBlockMatchingImageFilterTest(int argc, char * argv[]) { blockMatchingFilter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -172,7 +172,7 @@ itkBlockMatchingImageFilterTest(int argc, char * argv[]) { colormapImageFilter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -239,7 +239,7 @@ itkBlockMatchingImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Error in writing the output image:" << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx index 3767d919721..6a401310ea1 100644 --- a/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx @@ -146,7 +146,7 @@ itkCompareHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx index 5762ea675f5..25941a53a5b 100644 --- a/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx @@ -137,7 +137,7 @@ itkCorrelationCoefficientHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx index 9bde06d1308..80896c35b67 100644 --- a/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx @@ -132,7 +132,7 @@ itkGradientDifferenceImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx index b9148109e2f..6d3f1985484 100644 --- a/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx @@ -181,7 +181,7 @@ itkHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; @@ -209,7 +209,7 @@ itkHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; @@ -226,7 +226,7 @@ itkHistogramImageToImageMetricTest(int, char *[]) metric->Initialize(); metric->GetDerivative(parameters2, derivatives2); } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Expected exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx index f052ba3a2c2..1803b7ce2b9 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx @@ -121,7 +121,7 @@ itkImageRegistrationMethodTest(int, char *[]) pass = false; \ registration->Update(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected ExceptionObject" << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx index 2aa6dad80cb..5667c30e26d 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx @@ -151,7 +151,7 @@ itkImageRegistrationMethodTest_1(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx index 4628398dfd1..92ea865844e 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx @@ -165,7 +165,7 @@ itkImageRegistrationMethodTest_10(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx index 77d56024f5f..998246035bd 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx @@ -166,7 +166,7 @@ itkImageRegistrationMethodTest_12(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx index f9168bc0191..13848cf6223 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx @@ -274,7 +274,7 @@ itkImageRegistrationMethodTest_13(int, char *[]) initialParameters = registration->GetLastTransformParameters(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -337,7 +337,7 @@ itkImageRegistrationMethodTest_13(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; @@ -365,7 +365,7 @@ itkImageRegistrationMethodTest_13(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx index c509d6625ea..983f443e97f 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx @@ -286,7 +286,7 @@ itkImageRegistrationMethodTest_14(int, char *[]) initialParameters = registration->GetLastTransformParameters(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -349,7 +349,7 @@ itkImageRegistrationMethodTest_14(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; @@ -377,7 +377,7 @@ itkImageRegistrationMethodTest_14(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx index 11af2d9f74b..9a725b30056 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx @@ -273,7 +273,7 @@ itkImageRegistrationMethodTest_15(int, char *[]) initialParameters = registration->GetLastTransformParameters(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx index e8a3cd78e6e..8f2962064e5 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx @@ -143,7 +143,7 @@ DoRegistration() { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx index 7b8ac83be05..a37a8d78d62 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx @@ -281,7 +281,7 @@ itkImageRegistrationMethodTest_17(int, char *[]) initialParameters = registration->GetLastTransformParameters(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx index 4794e34efe0..5ab99e4b62f 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx @@ -165,7 +165,7 @@ itkImageRegistrationMethodTest_2(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx index 29651dba2eb..c7f5e7488c5 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx @@ -155,7 +155,7 @@ itkImageRegistrationMethodTest_3(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx index c823ffbbf70..d6052eceaff 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx @@ -166,7 +166,7 @@ itkImageRegistrationMethodTest_4(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx index 9e2ae2c44cd..ce6d3a82806 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx @@ -161,7 +161,7 @@ itkImageRegistrationMethodTest_5_Func(int argc, char * argv[], bool subtractMean { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx index af255ddcd01..8b901f2e237 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx @@ -164,7 +164,7 @@ itkImageRegistrationMethodTest_6(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx index 8e1e4c94cdf..d14ee277d95 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx @@ -151,7 +151,7 @@ itkImageRegistrationMethodTest_7(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx index 12ec98c87d3..bd477a19df9 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx @@ -165,7 +165,7 @@ itkImageRegistrationMethodTest_8(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; pass = false; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx index 3bf0a5a329d..f847d18ce42 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx @@ -139,7 +139,7 @@ itkImageRegistrationMethodTest_9(int argc, char * argv[]) { registration->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; @@ -170,7 +170,7 @@ itkImageRegistrationMethodTest_9(int argc, char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx index 615c43e5a98..81dc5b16907 100644 --- a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx @@ -337,7 +337,7 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) std::cout << "Value = " << metric->GetValue(parameters); std::cout << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught the exception." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx index d3974a0f075..984dfd09fc2 100644 --- a/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx @@ -68,7 +68,7 @@ itkMatchCardinalityImageToImageMetricTest(int argc, char * argv[]) { std::cout << "Offset: " << offset << " = " << metric->GetValue(offset) << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while computing metric " << std::endl; std::cerr << excp << std::endl; @@ -90,7 +90,7 @@ itkMatchCardinalityImageToImageMetricTest(int argc, char * argv[]) { std::cout << "Offset: " << offset << " = " << metric->GetValue(offset) << std::endl; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown while computing metric " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx index aa0b4e7deaf..e0de927f785 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx @@ -155,7 +155,7 @@ itkMeanReciprocalSquareDifferenceImageMetricTest(int, char *[]) { metric->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Metric initialization failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -216,7 +216,7 @@ itkMeanReciprocalSquareDifferenceImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -233,7 +233,7 @@ itkMeanReciprocalSquareDifferenceImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx index d5755aae232..129ab66fcf6 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx @@ -195,7 +195,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) { metric->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Metric initialization failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -258,7 +258,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) std::cout << "is NOT managing exceptions correctly " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -274,7 +274,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) std::cout << "is NOT managing exceptions correctly " << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx index 26991aab844..20090ef7430 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx @@ -144,7 +144,7 @@ itkMeanSquaresHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx index f9b7f6d1bc9..2e9bc78e9f2 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx @@ -148,7 +148,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) { metric->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Metric initialization failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -315,7 +315,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -332,7 +332,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -348,7 +348,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) pass = false; \ metric->Initialize(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected ExceptionObject" << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx index 42b82caa894..55ce64d0b0e 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx @@ -195,7 +195,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) { metric->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Metric initialization failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -260,7 +260,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -277,7 +277,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx index bc565344f79..52c24c96da4 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx @@ -143,7 +143,7 @@ itkMultiResolutionImageRegistrationMethodTest(int, char *[]) pass = false; \ registration->Update(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected ExceptionObject" << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx index fa74f12f8c9..a109fc0c65b 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx @@ -277,7 +277,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -341,7 +341,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; @@ -369,7 +369,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; @@ -393,7 +393,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) registration->SetSchedules(fixedImageSchedule, movingImageSchedule); pass = false; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Expected exception is thrown since we tried to set schedules after" << " setting the number of levels" << std::endl; @@ -501,7 +501,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx index 4dd1bc1e5b8..f4a00e39b76 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx @@ -272,7 +272,7 @@ itkMultiResolutionImageRegistrationMethodTest_2(int, char *[]) registration->SetInitialTransformParameters(initialParameters); registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Registration failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -331,7 +331,7 @@ itkMultiResolutionImageRegistrationMethodTest_2(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; @@ -359,7 +359,7 @@ itkMultiResolutionImageRegistrationMethodTest_2(int, char *[]) pass = false; registration->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected ExceptionObject" << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx index a59bd6ed002..7ae1c7905c6 100644 --- a/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx @@ -143,7 +143,7 @@ itkMutualInformationHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx index 7dd6bd83a73..f3b224a639f 100644 --- a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx @@ -238,7 +238,7 @@ itkMutualInformationMetricTest(int, char *[]) std::cout << "Value = " << metric->GetValue(parameters); std::cout << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught the exception." << std::endl; std::cout << err << std::endl; @@ -256,7 +256,7 @@ itkMutualInformationMetricTest(int, char *[]) std::cout << "Value = " << metric->GetValue(parameters); std::cout << std::endl; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught the exception." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx index 26d88c81b17..8fd0f9091be 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx @@ -148,7 +148,7 @@ itkNormalizedCorrelationImageMetricTest(int, char *[]) { metric->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Metric initialization failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -215,7 +215,7 @@ itkNormalizedCorrelationImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -232,7 +232,7 @@ itkNormalizedCorrelationImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx index cfb4c200f4f..7c6b6949fa2 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx @@ -186,7 +186,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) { metric->Initialize(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Metric initialization failed" << std::endl; std::cout << "Reason " << e.GetDescription() << std::endl; @@ -264,7 +264,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; @@ -281,7 +281,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) return EXIT_FAILURE; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception received (as expected) " << std::endl; std::cout << "Description : " << e.GetDescription() << std::endl; diff --git a/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx index 63bc6a8f5b6..82286d2da7b 100644 --- a/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx @@ -144,7 +144,7 @@ itkNormalizedMutualInformationHistogramImageToImageMetricTest(int, char *[]) std::cout << "Test passed." << std::endl; } - catch (itk::ExceptionObject & ex) + catch (const itk::ExceptionObject & ex) { std::cerr << "Exception caught!" << std::endl; std::cerr << ex << std::endl; diff --git a/Modules/Registration/Common/test/itkPointSetToSpatialObjectDemonsRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToSpatialObjectDemonsRegistrationTest.cxx index 3c1d502f27d..219979d805c 100644 --- a/Modules/Registration/Common/test/itkPointSetToSpatialObjectDemonsRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToSpatialObjectDemonsRegistrationTest.cxx @@ -64,7 +64,7 @@ itkPointSetToSpatialObjectDemonsRegistrationTest(int, char *[]) { demonsRegistration->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown during the registration process" << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx index e56df5314f5..c5a9014735e 100644 --- a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx +++ b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx @@ -315,7 +315,7 @@ itkGPUDemonsRegistrationFilterTest2(int argc, char * argv[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -339,7 +339,7 @@ itkGPUDemonsRegistrationFilterTest2(int argc, char * argv[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -363,7 +363,7 @@ itkGPUDemonsRegistrationFilterTest2(int argc, char * argv[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx index 230ea6adb9f..2cac0543fac 100644 --- a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx @@ -261,7 +261,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc; std::cerr << "Test FAILED." << std::endl; @@ -276,7 +276,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn1, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during GetValueAndDerivative: " << exc; std::cerr << "Test FAILED." << std::endl; @@ -289,7 +289,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc; std::cerr << "Test FAILED." << std::endl; @@ -303,7 +303,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValue..." << std::endl; valueReturn2 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during GetValue: " << exc; std::cerr << "Test FAILED." << std::endl; @@ -366,7 +366,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) { metricSparse->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize() for sparse threader: " << exc; std::cerr << "Test FAILED." << std::endl; @@ -381,7 +381,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValueAndDerivative..." << std::endl; metricSparse->GetValueAndDerivative(valueReturnSparse, derivativeReturnSparse); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during GetValueAndDrivative() for sparse threader: " << exc; std::cerr << "Test FAILED." << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx index 2e6af2d754f..b380822a16e 100644 --- a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx @@ -217,7 +217,7 @@ itkANTSNeighborhoodCorrelationImageToImageRegistrationTest(int argc, char * argv { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; @@ -255,7 +255,7 @@ itkANTSNeighborhoodCorrelationImageToImageRegistrationTest(int argc, char * argv { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown using sparse metric ! " << std::endl; std::cout << "An error occurred during deformation Optimization using sparse metric:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx index 418f35effd0..9ded56f356b 100644 --- a/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx @@ -58,7 +58,7 @@ itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & me std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -73,7 +73,7 @@ itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & me std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn1, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; @@ -89,7 +89,7 @@ itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & me std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -100,7 +100,7 @@ itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & me std::cout << "Calling GetValue..." << std::endl; valueReturn2 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValue: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx index 8a2f4a0be90..d2eb54eaeb7 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx @@ -251,7 +251,7 @@ itkDemonsImageToImageMetricv4RegistrationTest(int argc, char * argv[]) { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error ocurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx index 8b1b5bd73e9..3efb0953682 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx @@ -136,7 +136,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -151,7 +151,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn1, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; @@ -163,7 +163,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -174,7 +174,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValue..." << std::endl; valueReturn2 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValue: " << exc; return EXIT_FAILURE; @@ -203,7 +203,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during initialize with moving " << "image gradient source: " << exc << std::endl; @@ -216,7 +216,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn1, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; @@ -228,7 +228,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -239,7 +239,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValue..." << std::endl; valueReturn2 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValue: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx index 37d3b11c2b3..90958b7b6db 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx @@ -321,7 +321,7 @@ ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointe { metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc; return EXIT_FAILURE; @@ -332,7 +332,7 @@ ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointe { valueReturn1 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during GetValue: " << exc; return EXIT_FAILURE; @@ -343,7 +343,7 @@ ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointe { metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc; return EXIT_FAILURE; @@ -353,7 +353,7 @@ ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointe { metric->GetValueAndDerivative(valueReturn2, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx index 8fccab847eb..0fd23185eff 100644 --- a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx @@ -112,7 +112,7 @@ itkJointHistogramMutualInformationImageToImageMetricv4Test(int, char *[]) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during Initialize: " << exc; return EXIT_FAILURE; @@ -128,7 +128,7 @@ itkJointHistogramMutualInformationImageToImageMetricv4Test(int, char *[]) std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn2, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx index db550f941bd..b62580a3b92 100644 --- a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx @@ -327,7 +327,7 @@ itkJointHistogramMutualInformationImageToImageRegistrationTest(int argc, char * { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx index 39d0225effc..f8766a42346 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx @@ -234,7 +234,7 @@ itkMattesMutualInformationImageToImageMetricv4RegistrationTest(int argc, char * { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx index 046c42a4c29..c5b8e957a8c 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx @@ -129,7 +129,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -145,7 +145,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest(int, char ** const) std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn1, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; @@ -157,7 +157,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -168,7 +168,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest(int, char ** const) std::cout << "Calling GetValue..." << std::endl; valueReturn2 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValue: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx index b4fc01126e5..acb7ff7c9c7 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx @@ -115,7 +115,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(typename TMetric::MeasureType std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -128,7 +128,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(typename TMetric::MeasureType std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(measureReturn, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx index cc2dd54d62f..08ef51adce5 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx @@ -221,7 +221,7 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest(int argc, char * argv[]) else std::cout << "** SKIPPING DISPLACEMENT FIELD OPT\n"; } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx index 46bea2a5968..5194a6a0b77 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx @@ -192,7 +192,7 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest2(int argc, char * argv[]) { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception thrown ! " << std::endl; std::cerr << "An error occurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx index e56f27e78fc..f5be2af1a97 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx @@ -116,7 +116,7 @@ itkMeanSquaresImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during Initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -131,7 +131,7 @@ itkMeanSquaresImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValueAndDerivative..." << std::endl; metric->GetValueAndDerivative(valueReturn1, derivativeReturn); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValueAndDerivative: " << exc; return EXIT_FAILURE; @@ -143,7 +143,7 @@ itkMeanSquaresImageToImageMetricv4Test(int, char ** const) std::cout << "Calling Initialize..." << std::endl; metric->Initialize(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cerr << "Caught unexpected exception during re-initialize: " << exc << std::endl; return EXIT_FAILURE; @@ -154,7 +154,7 @@ itkMeanSquaresImageToImageMetricv4Test(int, char ** const) std::cout << "Calling GetValue..." << std::endl; valueReturn2 = metric->GetValue(); } - catch (itk::ExceptionObject & exc) + catch (const itk::ExceptionObject & exc) { std::cout << "Caught unexpected exception during GetValue: " << exc; return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx index 02600b76f81..04816e7b84c 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx @@ -243,7 +243,7 @@ itkMeanSquaresImageToImageMetricv4VectorRegistrationTest(int argc, char * argv[] std::cout << "** SKIPPING DISPLACEMENT FIELD OPT\n"; } } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx index bed4f657a4b..c53770f2b58 100644 --- a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx @@ -73,7 +73,7 @@ itkObjectToObjectMultiMetricv4TestEvaluate(ObjectToObjectMultiMetricv4TestMultiM { multiVariateMetric->GetValueAndDerivative(measure, DerivResultOfGetValueAndDerivative); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught during call to GetValueAndDerivative:" << std::endl; std::cerr << exp << std::endl; @@ -109,7 +109,7 @@ itkObjectToObjectMultiMetricv4TestEvaluate(ObjectToObjectMultiMetricv4TestMultiM { measure2 = multiVariateMetric->GetValue(); } - catch (itk::ExceptionObject & exp) + catch (const itk::ExceptionObject & exp) { std::cerr << "Exception caught during call to GetValue:" << std::endl; std::cerr << exp << std::endl; diff --git a/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx index 6d2d93bfcd6..7416dafe39e 100644 --- a/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx @@ -269,7 +269,7 @@ itkCurvatureRegistrationFilterTest(int, char *[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -293,7 +293,7 @@ itkCurvatureRegistrationFilterTest(int, char *[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -317,7 +317,7 @@ itkCurvatureRegistrationFilterTest(int, char *[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx index 5551f4c0931..d13d54aabb0 100644 --- a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx @@ -279,7 +279,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -303,7 +303,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -332,7 +332,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx index ec6a400bb04..20eecf3dbba 100644 --- a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx @@ -358,7 +358,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -382,7 +382,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -406,7 +406,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx index 41386247b07..12d3290229b 100644 --- a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx @@ -92,7 +92,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest2(int argc, char * argv[]) fixedReader->Update(); movingReader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; @@ -214,7 +214,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest2(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx index 22fff4f56e3..6eca255aed2 100644 --- a/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -273,7 +273,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -297,7 +297,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -321,7 +321,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx index 120e7e4e58e..578bbabfdf8 100644 --- a/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx @@ -329,7 +329,7 @@ itkLevelSetMotionRegistrationFilterTest(int argc, char * argv[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -353,7 +353,7 @@ itkLevelSetMotionRegistrationFilterTest(int argc, char * argv[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -382,7 +382,7 @@ itkLevelSetMotionRegistrationFilterTest(int argc, char * argv[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx index 4307e6593f0..9c796b8098d 100644 --- a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx @@ -365,7 +365,7 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) registrator->SetRegistrationFilter(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; @@ -388,7 +388,7 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) registrator->SetFixedImagePyramid(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; @@ -412,7 +412,7 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) registrator->SetMovingImagePyramid(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; @@ -434,7 +434,7 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) registrator->SetFixedImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; diff --git a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx index 0a2706452ff..1c949b8655a 100644 --- a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -253,7 +253,7 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetNumberOfIterations(2); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Unexpected error." << std::endl; std::cout << err << std::endl; @@ -277,7 +277,7 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetMovingImage(nullptr); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; @@ -306,7 +306,7 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetInput(initField); registrator->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << "Caught expected error." << std::endl; std::cout << err << std::endl; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx index 33ab229b54e..ad3aa89d30c 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx @@ -195,7 +195,7 @@ PerformBSplineExpImageRegistration(int argc, char * argv[]) std::cout << "Affine txf:" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -347,7 +347,7 @@ PerformBSplineExpImageRegistration(int argc, char * argv[]) std::cout << "Displ. txf - bspline update" << std::endl; displacementFieldSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx index 4eced8f725d..2b8ff504aa1 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx @@ -180,7 +180,7 @@ PerformBSplineImageRegistration(int argc, char * argv[]) std::cout << "Affine txf:" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -323,7 +323,7 @@ PerformBSplineImageRegistration(int argc, char * argv[]) std::cout << "BSpline. txf - bspline update" << std::endl; bsplineRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx index 314b601eef4..7ed8ac37929 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx @@ -133,7 +133,7 @@ PerformBSplineSyNImageRegistration(int itkNotUsed(argc), char * argv[]) std::cout << "Affine transform" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -311,7 +311,7 @@ PerformBSplineSyNImageRegistration(int itkNotUsed(argc), char * argv[]) std::cout << "BSpline SyN registration" << std::endl; displacementFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx index c7c503d4cad..e45e5b1f763 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx @@ -226,7 +226,7 @@ itkBSplineSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(ar std::cout << "B-spline SyN point set registration" << std::endl; displacementFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx index 35e2bbfaffb..579bb167dcc 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx @@ -208,7 +208,7 @@ PerformExpImageRegistration(int argc, char * argv[]) affineSimple->Update(); timer.Stop("4 affineSimple"); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -358,7 +358,7 @@ PerformExpImageRegistration(int argc, char * argv[]) displacementFieldSimple->Update(); timer.Stop("6 displacementFieldSimple"); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx index bea30163817..06864f8570c 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx @@ -37,7 +37,7 @@ itkImageRegistrationSamplingTest(int, char *[]) { registrationMethod->SetMetricSamplingPercentage(0.1); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Unexpected exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx index e80473f6374..6ee6b18bff5 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx @@ -220,7 +220,7 @@ itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char * argv[]) { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; @@ -252,7 +252,7 @@ itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char * argv[]) { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during deformation Optimization:" << std::endl; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx index a22fc92913a..fdfeeeb2d3d 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx @@ -356,7 +356,7 @@ PerformSimpleImageRegistration(int argc, char * argv[]) std::cout << "Displ. txf - gauss update" << std::endl; displacementFieldSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx index e8f9cd60e54..92f568427cc 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx @@ -312,7 +312,7 @@ PerformSimpleImageRegistration2(int argc, char * argv[]) std::cout << "Affine txf:" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx index 059825b19fe..93282ebdc37 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx @@ -226,7 +226,7 @@ PerformCompositeImageRegistration(int itkNotUsed(argc), char * argv[]) std::cout << "Rigid transform" << std::endl; rigidRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -280,7 +280,7 @@ PerformCompositeImageRegistration(int itkNotUsed(argc), char * argv[]) std::cout << "Affine transform" << std::endl; affineRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx index ec93b1f5145..20e71d7e3bd 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx @@ -141,7 +141,7 @@ ImageRegistration(int itkNotUsed(argc), char * argv[]) { registration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx index 54c3be848c6..7e33ffdddc8 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx @@ -372,7 +372,7 @@ PerformSimpleImageRegistrationWithMaskAndSampling(int argc, char * argv[]) std::cout << "Displ. txf - gauss update" << std::endl; displacementFieldSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx index f908e68d545..e5addc22c15 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx @@ -227,7 +227,7 @@ itkSimplePointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ std::cout << "Point set affine registration update" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx index fe6c0f8b258..6e169ef7359 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx @@ -163,7 +163,7 @@ PerformDisplacementFieldImageRegistration(int itkNotUsed(argc), char * argv[]) std::cout << "Affine transform" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -378,7 +378,7 @@ PerformDisplacementFieldImageRegistration(int itkNotUsed(argc), char * argv[]) std::cout << "SyN registration" << std::endl; displacementFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx index fe3bdbf6beb..2e0f4ac4b6a 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx @@ -204,7 +204,7 @@ itkSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) std::cout << "SyN point set registration" << std::endl; displacementFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx index 10bd0973f89..cdf85d69521 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx @@ -157,7 +157,7 @@ PerformTimeVaryingBSplineVelocityFieldImageRegistration(int argc, char * argv[]) std::cout << "Affine transform" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -390,7 +390,7 @@ PerformTimeVaryingBSplineVelocityFieldImageRegistration(int argc, char * argv[]) std::cout << "Time-varying B-spline velocity field transform" << std::endl; velocityFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx index 01b2e190bfc..103473d1ec5 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx @@ -279,7 +279,7 @@ itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest(int itkNotUsed(argc), std::cout << "Time-varying B-spline velocity field point set registration" << std::endl; velocityFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx index f230c7f45a6..e429b8c306b 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx @@ -157,7 +157,7 @@ PerformTimeVaryingVelocityFieldImageRegistration(int argc, char * argv[]) std::cout << "Affine transform" << std::endl; affineSimple->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; @@ -358,7 +358,7 @@ PerformTimeVaryingVelocityFieldImageRegistration(int argc, char * argv[]) std::cout << "Time-varying velocity field transform (gaussian update)" << std::endl; velocityFieldRegistration->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception caught: " << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx index e824f86423c..42d95bd497f 100644 --- a/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx @@ -255,7 +255,7 @@ itkImageClassifierFilterTest(int argc, char * argv[]) << "decision rule, should throw an exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } @@ -274,7 +274,7 @@ itkImageClassifierFilterTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx index 6d185383a7f..d8174c39e1e 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx @@ -123,7 +123,7 @@ itkSampleClassifierFilterTest1(int, char *[]) << " should throw an exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } @@ -161,7 +161,7 @@ itkSampleClassifierFilterTest1(int, char *[]) << " should throw an exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } @@ -191,7 +191,7 @@ itkSampleClassifierFilterTest1(int, char *[]) << "decision rule, should throw an exception" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } @@ -213,7 +213,7 @@ itkSampleClassifierFilterTest1(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx index a3944b97c45..c70bd65b3ee 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx @@ -151,7 +151,7 @@ itkSampleClassifierFilterTest2(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx index 84645f102dc..6bfc7e66a78 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx @@ -183,7 +183,7 @@ itkSampleClassifierFilterTest3(int, char *[]) << "from the number of classes set" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; } @@ -201,7 +201,7 @@ itkSampleClassifierFilterTest3(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx index 3b8b3afb710..8aa14b2d09a 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx @@ -165,7 +165,7 @@ itkSampleClassifierFilterTest4(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx index 69bcab85b1d..43070f6a344 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx @@ -168,7 +168,7 @@ itkSampleClassifierFilterTest5(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx index 5ed0296b405..174809b456b 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx @@ -167,7 +167,7 @@ itkSampleClassifierFilterTest6(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx index 813840faa51..cf7a3ca14d3 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx @@ -286,7 +286,7 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx index bacd521ec3a..787f5e2457c 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx @@ -208,7 +208,7 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) { kmeansFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encountered while running K-means segmentation "; std::cerr << excp << std::endl; @@ -250,7 +250,7 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) { kmeansNonBrainFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encountered while Background K-Means segmentation "; std::cerr << excp << std::endl; diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx index 0ca12e517a8..7c88082e797 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx @@ -48,7 +48,7 @@ itkScalarImageKmeansImageFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while reading image file : " << argv[1] << std::endl; std::cerr << excp << std::endl; @@ -90,7 +90,7 @@ itkScalarImageKmeansImageFilterTest(int argc, char * argv[]) { kmeansFilter->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while classifying the image " << std::endl; std::cerr << excp << std::endl; @@ -125,7 +125,7 @@ itkScalarImageKmeansImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Problem encoutered while writing image file : " << argv[2] << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx index c3601f1904c..019e252a4e4 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx @@ -68,7 +68,7 @@ itkConnectedComponentImageFilterBackgroundTest(int argc, char * argv[]) { filter->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "exception caught:" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx index 8a7dc2e640e..f209c7bdaf7 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx @@ -95,7 +95,7 @@ itkConnectedComponentImageFilterTest(int argc, char * argv[]) { relabel->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Relabel: exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -144,7 +144,7 @@ itkConnectedComponentImageFilterTest(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx index 785407c7cb0..da9573a6ef8 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx @@ -94,7 +94,7 @@ itkConnectedComponentImageFilterTestRGB(int argc, char * argv[]) { relabel->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Relabel: exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -143,7 +143,7 @@ itkConnectedComponentImageFilterTestRGB(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx index 00b65efeb22..be422c4ca8b 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx @@ -56,7 +56,7 @@ itkConnectedComponentImageFilterTooManyObjectsTest(int itkNotUsed(argc), char *[ filter->Update(); // no exception - that's not normal } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "exception caught:" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx index 7718a443f4c..5809729262e 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx @@ -149,7 +149,7 @@ DoIt(int argc, char * argv[], const std::string pixelType) { writer->Update(); } - catch (itk::ExceptionObject & error) + catch (const itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx index 635f008c7b3..e5365af6995 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx @@ -146,7 +146,7 @@ itkMaskConnectedComponentImageFilterTest(int argc, char * argv[]) { relabel->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Relabel: exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -197,7 +197,7 @@ itkMaskConnectedComponentImageFilterTest(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx index 3bd8e7e926d..6f6c0df9113 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx @@ -132,7 +132,7 @@ itkRelabelComponentImageFilterTest(int argc, char * argv[]) relabel->Update(); std::cout << "Modified time of relabel's output = " << relabel->GetOutput()->GetMTime() << std::endl; } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -148,7 +148,7 @@ itkRelabelComponentImageFilterTest(int argc, char * argv[]) statistics->UseHistogramsOn(); statistics->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught during statistics calculation!" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx index aa8f136fbdb..b82759e1c44 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx @@ -134,7 +134,7 @@ itkScalarConnectedComponentImageFilterTest(int argc, char * argv[]) { relabel->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Relabel: exception caught !" << std::endl; std::cerr << excep << std::endl; @@ -184,7 +184,7 @@ itkScalarConnectedComponentImageFilterTest(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx index a11ac23c5c6..c2dbf634ad0 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx @@ -71,7 +71,7 @@ itkThresholdMaximumConnectedComponentsImageFilterTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception Caught!" << std::endl; std::cerr << err << std::endl; @@ -106,7 +106,7 @@ itkThresholdMaximumConnectedComponentsImageFilterTest(int argc, char * argv[]) { automaticThreshold->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception Caught!" << std::endl; std::cerr << err << std::endl; @@ -132,7 +132,7 @@ itkThresholdMaximumConnectedComponentsImageFilterTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << "Exception Caught!" << std::endl; std::cerr << err << std::endl; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx index cf8d62b835e..f7cad254d08 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx @@ -183,7 +183,7 @@ itkVectorConnectedComponentImageFilterTest(int argc, char * argv[]) writer->Update(); filter->SetFunctor(filter->GetFunctor()); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx b/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx index 34b7b3e6bc4..e894b6c8a3e 100644 --- a/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx @@ -161,7 +161,7 @@ test_RegionGrowKLMExceptionHandling() std::cout << MSG << std::endl; \ FILTER->Update(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected error." << std::endl; \ std::cout << err << std::endl; \ @@ -289,7 +289,7 @@ test_regiongrowKLM1D() { \ FILTER->Update(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught unexpected error." << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx index 991f38c0dc8..5c7ea32f760 100644 --- a/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx @@ -84,7 +84,7 @@ itkBinaryMaskToNarrowBandPointSetFilterTest(int, char *[]) { narrowBandGenerator->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cerr << "Exception thrown during the execution of the generator " << std::endl; std::cerr << excp << std::endl; diff --git a/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx index 16c9dcc59d1..8e237a79ffa 100644 --- a/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx @@ -237,7 +237,7 @@ itkCannySegmentationLevelSetImageFilterTest(int, char *[]) // writer->SetFileName("speedimage.raw"); // writer->Write(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx index cc599cfcd3c..80e74f4ac3b 100644 --- a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx @@ -98,7 +98,7 @@ itkCollidingFrontsImageFilterTest(int argc, char * argv[]) { collidingFronts->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } @@ -177,7 +177,7 @@ itkCollidingFrontsImageFilterTest(int argc, char * argv[]) { collidingFronts->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx index 04b1126abc9..a478887dd98 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx @@ -298,7 +298,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(int, char *[]) { overlap->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; std::cout << "Caught unexpected exception." << std::endl; @@ -396,7 +396,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(int, char *[]) pass = false; \ filter->Update(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected ExceptionObject" << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx index 85b024c92c6..0a956191071 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx @@ -369,7 +369,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2(int, char *[]) { overlap->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; std::cout << "Caught unexpected exception." << std::endl; diff --git a/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx index b672cc0546d..cdcdd498e79 100644 --- a/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx @@ -71,7 +71,7 @@ itkImplicitManifoldNormalVectorFilterTest(int, char *[]) { filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } diff --git a/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx index 352d195734a..6dbf30deb2b 100644 --- a/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx @@ -237,7 +237,7 @@ itkLaplacianSegmentationLevelSetImageFilterTest(int, char *[]) // writer->SetFileName("speedimage.raw"); // writer->Write(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx index 2778ad1e923..50ecb17461a 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx @@ -102,7 +102,7 @@ itkLevelSetNeighborhoodExtractorTest(int, char *[]) extractor->SetInputLevelSet(nullptr); extractor->Locate(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; @@ -122,7 +122,7 @@ itkLevelSetNeighborhoodExtractorTest(int, char *[]) extractor->SetInputNarrowBand(nullptr); extractor->Locate(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; passed = true; diff --git a/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx index 3193bbc163a..bafdc2722bc 100644 --- a/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx @@ -213,7 +213,7 @@ itkNarrowBandThresholdSegmentationLevelSetImageFilterTest(int, char *[]) // writer->SetFileName("output.raw"); // writer->Write(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx index 341f6118c76..d3496c87ec3 100644 --- a/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx @@ -305,7 +305,7 @@ itkParallelSparseFieldLevelSetImageFilterTest(int argc, char * argv[]) { mf->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; } diff --git a/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx index ece1a5ed8e0..ef8be1209f2 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx @@ -235,7 +235,7 @@ itkShapeDetectionLevelSetImageFilterTest(int, char *[]) std::cout << "Test Passed. " << std::endl; return EXIT_SUCCESS; } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx index dea2b9f0759..2eca431e957 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx @@ -161,7 +161,7 @@ itkShapePriorMAPCostFunctionTest(int, char *[]) { costFunction->Initialize(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -203,7 +203,7 @@ itkShapePriorMAPCostFunctionTest(int, char *[]) { optimizer->StartOptimization(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -232,7 +232,7 @@ itkShapePriorMAPCostFunctionTest(int, char *[]) pass = false; \ costFunction->Initialize(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected ExceptionObject" << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx index 64e0e4ebff1..f4fb9a3d9af 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx @@ -172,7 +172,7 @@ itkShapePriorSegmentationLevelSetFunctionTest(int, char *[]) filter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx index b12235496f6..04a932279bf 100644 --- a/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx @@ -235,7 +235,7 @@ itkThresholdSegmentationLevelSetImageFilterTest(int, char *[]) // writer->SetFileName("output.raw"); // writer->Write(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx index 7e4f2fcc229..8fcce379c2f 100644 --- a/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx @@ -105,7 +105,7 @@ itkVectorThresholdSegmentationLevelSetImageFilterTest(int ac, char * av[]) rgbReader->Update(); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx index 5301c94f68d..17fe22f282d 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx @@ -47,7 +47,7 @@ itkBinaryImageToMalcolmSparseLevelSetAdaptorTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -98,7 +98,7 @@ itkBinaryImageToMalcolmSparseLevelSetAdaptorTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx index a413da46919..aed13a51041 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx @@ -42,7 +42,7 @@ itkBinaryImageToShiSparseLevelSetAdaptorTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -92,7 +92,7 @@ itkBinaryImageToShiSparseLevelSetAdaptorTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx index 675a4241c1e..f37c5bbe7db 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx @@ -44,7 +44,7 @@ itkBinaryImageToWhitakerSparseLevelSetAdaptorTest(int argc, char * argv[]) { reader->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -108,7 +108,7 @@ itkBinaryImageToWhitakerSparseLevelSetAdaptorTest(int argc, char * argv[]) { outputWriter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -123,7 +123,7 @@ itkBinaryImageToWhitakerSparseLevelSetAdaptorTest(int argc, char * argv[]) { statusWriter->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageSubset2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageSubset2DTest.cxx index 8c5cd09401d..920e6a11566 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageSubset2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageSubset2DTest.cxx @@ -310,7 +310,7 @@ itkMultiLevelSetDenseImageSubset2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx index 0474e761307..28daccc3f9f 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx @@ -228,7 +228,7 @@ itkMultiLevelSetEvolutionTest(int, char *[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetMalcolmImageSubset2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetMalcolmImageSubset2DTest.cxx index 749b39315ef..dc0642ad43e 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetMalcolmImageSubset2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetMalcolmImageSubset2DTest.cxx @@ -241,7 +241,7 @@ itkMultiLevelSetMalcolmImageSubset2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetShiImageSubset2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetShiImageSubset2DTest.cxx index 077e4febe11..9dc2098239f 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetShiImageSubset2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetShiImageSubset2DTest.cxx @@ -241,7 +241,7 @@ itkMultiLevelSetShiImageSubset2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetWhitakerImageSubset2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetWhitakerImageSubset2DTest.cxx index 93922c909f4..933032547a8 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetWhitakerImageSubset2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetWhitakerImageSubset2DTest.cxx @@ -242,7 +242,7 @@ itkMultiLevelSetWhitakerImageSubset2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx index b1808121085..9d01ee27898 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx @@ -174,7 +174,7 @@ itkSingleLevelSetDenseAdvectionImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -210,7 +210,7 @@ itkSingleLevelSetDenseAdvectionImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx index 7b0ca61de83..8bdd9d9e1b0 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx @@ -182,7 +182,7 @@ itkSingleLevelSetDenseImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -215,7 +215,7 @@ itkSingleLevelSetDenseImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx index 69070aeb9fc..2a9685a929f 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx @@ -165,7 +165,7 @@ itkSingleLevelSetMalcolmImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -200,7 +200,7 @@ itkSingleLevelSetMalcolmImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx index c8c0c8eb64b..3452f5dfdea 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx @@ -165,7 +165,7 @@ itkSingleLevelSetShiImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -200,7 +200,7 @@ itkSingleLevelSetShiImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx index 5db80e03ceb..1a271ccaa96 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx @@ -168,7 +168,7 @@ itkSingleLevelSetWhitakerImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -203,7 +203,7 @@ itkSingleLevelSetWhitakerImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx index 963279f8561..9a4bb74c517 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx @@ -212,7 +212,7 @@ itkSingleLevelSetWhitakerImage2DWithCurvatureTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx index 8a9866fa8b7..ea212c11757 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx @@ -193,7 +193,7 @@ itkSingleLevelSetWhitakerImage2DWithLaplacianTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx index ec50e6e576e..289c642e518 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx @@ -185,7 +185,7 @@ itkSingleLevelSetWhitakerImage2DWithPropagationTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx index 76913bc7e96..b675018e8e6 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx @@ -237,7 +237,7 @@ itkTwoLevelSetDenseImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx index ea0f688edbb..4c090d698ea 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx @@ -225,7 +225,7 @@ itkTwoLevelSetMalcolmImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; return EXIT_FAILURE; @@ -259,7 +259,7 @@ itkTwoLevelSetMalcolmImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx index 1094ce7d492..ca1c4b3c093 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx @@ -223,7 +223,7 @@ itkTwoLevelSetShiImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -258,7 +258,7 @@ itkTwoLevelSetShiImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx index 9bd3b212eac..379330a411b 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx @@ -227,7 +227,7 @@ itkTwoLevelSetWhitakerImage2DTest(int argc, char * argv[]) { evolution->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cerr << err << std::endl; return EXIT_FAILURE; @@ -262,7 +262,7 @@ itkTwoLevelSetWhitakerImage2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & err) + catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; } diff --git a/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx index d860129dcfb..f9cd73ed490 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx @@ -72,7 +72,7 @@ itkConfidenceConnectedImageFilterTest(int ac, char * av[]) input->Update(); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx index 3381341c62f..da9a6ec805f 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx @@ -118,7 +118,7 @@ itkIsolatedConnectedImageFilterTest(int ac, char * av[]) input->Update(); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; @@ -157,7 +157,7 @@ itkIsolatedConnectedImageFilterTest(int ac, char * av[]) { filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx index 400e55550e8..5c54f129263 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx @@ -77,7 +77,7 @@ itkNeighborhoodConnectedImageFilterTest(int ac, char * av[]) input->Update(); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx index 6911f8f238a..4ce101fedac 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx @@ -80,7 +80,7 @@ itkVectorConfidenceConnectedImageFilterTest(int ac, char * av[]) input->Update(); filter->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Exception detected: " << e.GetDescription(); return -1; diff --git a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx index 5a5860a95c7..0e8ee45e678 100644 --- a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx +++ b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx @@ -216,7 +216,7 @@ itkPCAShapeSignedDistanceFunctionTest(int, char *[]) pass = false; \ shape->Initialize(); \ } \ - catch (itk::ExceptionObject & err) \ + catch (const itk::ExceptionObject & err) \ { \ std::cout << "Caught expected ExceptionObject" << std::endl; \ std::cout << err << std::endl; \ diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx index 6b25c4a4af7..b04cba2821a 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx @@ -102,7 +102,7 @@ itkVoronoiDiagram2DTest(int argc, char * argv[]) { writer->Update(); } - catch (itk::ExceptionObject & excp) + catch (const itk::ExceptionObject & excp) { std::cout << excp << std::endl; return EXIT_FAILURE; diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx index a9134192902..afdc87f745c 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx @@ -84,7 +84,7 @@ itkVoronoiPartitioningImageFilterTest(int argc, char * argv[]) writer->SetFileName(argv[2]); writer->Update(); } - catch (itk::ExceptionObject & excep) + catch (const itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx index 33e7326e1b3..941b186bb8a 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx @@ -163,7 +163,7 @@ itkOpenCVImageBridgeTestTemplatedRGB(char * argv0, char * argv1) { reader->Update(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << e.what() << std::endl; return EXIT_FAILURE; diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx index a60c4fac0fb..691f4c6bd38 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx @@ -387,7 +387,7 @@ test_OpenCVVideoIO(char * input, { opencvIO->ReadImageInformation(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Could not read information from the camera" << std::endl; std::cerr << "If a camera is present, this test requires it to be on with OpenCV 2" << std::endl; @@ -404,7 +404,7 @@ test_OpenCVVideoIO(char * input, { opencvIO->Read(reinterpret_cast(camBuffer)); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Could not read from the camera" << std::endl; std::cerr << e << std::endl; diff --git a/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx b/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx index f14dc79a07f..d9ced30c800 100644 --- a/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx +++ b/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx @@ -390,7 +390,7 @@ test_VXLVideoIO(char * input, { vxlIO->ReadImageInformation(); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Could not read information from the camera" << std::endl; ret = EXIT_FAILURE; @@ -407,7 +407,7 @@ test_VXLVideoIO(char * input, { vxlIO->Read(reinterpret_cast(camBuffer)); } - catch (itk::ExceptionObject & e) + catch (const itk::ExceptionObject & e) { std::cerr << "Could not read from the camera" << std::endl; ret = EXIT_FAILURE; From 7e4ec294fdf8b45b1aa3cb8865d66c9a21ff40df Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 14 Dec 2019 06:55:25 -0600 Subject: [PATCH 2/5] BUG: Second argument to stream `operator<<` as const The second argument to the stream insertion operator should be a constant reference or pointer. operator<<(std::ostream & os, const EventObject & e) Stream insertion should not modify the object being inserted. --- Modules/Core/Common/include/itkAutoPointer.h | 2 +- Modules/Core/Common/include/itkEventObject.h | 2 +- Modules/Core/Common/include/itkExceptionObject.h | 2 +- Modules/Core/Common/include/itkSmartPointer.h | 2 +- Modules/Core/Common/include/itkTreeIteratorClone.h | 2 +- Modules/Core/Common/include/itkWeakPointer.h | 2 +- .../Polynomials/include/itkMultivariateLegendrePolynomial.h | 2 +- .../Polynomials/src/itkMultivariateLegendrePolynomial.cxx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Modules/Core/Common/include/itkAutoPointer.h b/Modules/Core/Common/include/itkAutoPointer.h index 229014fafc3..a6d776fec17 100644 --- a/Modules/Core/Common/include/itkAutoPointer.h +++ b/Modules/Core/Common/include/itkAutoPointer.h @@ -234,7 +234,7 @@ class AutoPointer template std::ostream & -operator<<(std::ostream & os, AutoPointer p) +operator<<(std::ostream & os, const AutoPointer p) { p.Print(os); os << "Owner: " << p.IsOwner() << std::endl; diff --git a/Modules/Core/Common/include/itkEventObject.h b/Modules/Core/Common/include/itkEventObject.h index 110fafbaf94..3342b109596 100644 --- a/Modules/Core/Common/include/itkEventObject.h +++ b/Modules/Core/Common/include/itkEventObject.h @@ -106,7 +106,7 @@ class ITKCommon_EXPORT EventObject /** Generic inserter operator for EventObject and its subclasses. */ inline std::ostream & -operator<<(std::ostream & os, EventObject & e) +operator<<(std::ostream & os, const EventObject & e) { (&e)->Print(os); return os; diff --git a/Modules/Core/Common/include/itkExceptionObject.h b/Modules/Core/Common/include/itkExceptionObject.h index 76eb6b56815..64802d4ed4f 100644 --- a/Modules/Core/Common/include/itkExceptionObject.h +++ b/Modules/Core/Common/include/itkExceptionObject.h @@ -167,7 +167,7 @@ class ITKCommon_EXPORT ExceptionObject : public std::exception /** Generic inserter operator for ExceptionObject and its subclasses. */ inline std::ostream & -operator<<(std::ostream & os, ExceptionObject & e) +operator<<(std::ostream & os, const ExceptionObject & e) { (&e)->Print(os); return os; diff --git a/Modules/Core/Common/include/itkSmartPointer.h b/Modules/Core/Common/include/itkSmartPointer.h index db395fe1d53..c33e6a8fff3 100644 --- a/Modules/Core/Common/include/itkSmartPointer.h +++ b/Modules/Core/Common/include/itkSmartPointer.h @@ -299,7 +299,7 @@ operator>=(const SmartPointer & l, const SmartPointer & r) noexcept template std::ostream & -operator<<(std::ostream & os, SmartPointer p) +operator<<(std::ostream & os, const SmartPointer p) { p.Print(os); return os; diff --git a/Modules/Core/Common/include/itkTreeIteratorClone.h b/Modules/Core/Common/include/itkTreeIteratorClone.h index 6d5a7998e69..fc38d292ec7 100644 --- a/Modules/Core/Common/include/itkTreeIteratorClone.h +++ b/Modules/Core/Common/include/itkTreeIteratorClone.h @@ -199,7 +199,7 @@ class TreeIteratorClone template std::ostream & -operator<<(std::ostream & os, TreeIteratorClone p) +operator<<(std::ostream & os, const TreeIteratorClone p) { p.Print(os); return os; diff --git a/Modules/Core/Common/include/itkWeakPointer.h b/Modules/Core/Common/include/itkWeakPointer.h index 1627e551a40..4241c14eec3 100644 --- a/Modules/Core/Common/include/itkWeakPointer.h +++ b/Modules/Core/Common/include/itkWeakPointer.h @@ -173,7 +173,7 @@ class WeakPointer template std::ostream & -operator<<(std::ostream & os, WeakPointer p) +operator<<(std::ostream & os, const WeakPointer p) { p.Print(os); return os; diff --git a/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h b/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h index 7ec688305c7..06ed843337f 100644 --- a/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h +++ b/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h @@ -321,6 +321,6 @@ class ITKPolynomials_EXPORT MultivariateLegendrePolynomial }; // end of class ITKPolynomials_EXPORT std::ostream & - operator<<(std::ostream & os, MultivariateLegendrePolynomial & poly); + operator<<(std::ostream & os, const MultivariateLegendrePolynomial & poly); } // end of namespace itk #endif diff --git a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx index ddc7f00bbad..7f768b55c92 100644 --- a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx +++ b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx @@ -247,7 +247,7 @@ MultivariateLegendrePolynomial ::GetNumberOfCoefficients() } std::ostream & -operator<<(std::ostream & os, MultivariateLegendrePolynomial & poly) +operator<<(std::ostream & os, const MultivariateLegendrePolynomial & poly) { poly.Print(os); return os; From bed62abd7c3a310add9b316368e012fec05bed32 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 14 Dec 2019 07:15:46 -0600 Subject: [PATCH 3/5] BUG: Print function should be const --- .../Polynomials/include/itkMultivariateLegendrePolynomial.h | 2 +- .../Polynomials/src/itkMultivariateLegendrePolynomial.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h b/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h index 06ed843337f..b2e805ee317 100644 --- a/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h +++ b/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h @@ -289,7 +289,7 @@ class ITKPolynomials_EXPORT MultivariateLegendrePolynomial }; // end of class Iterator void - Print(std::ostream & os); + Print(std::ostream & os) const; protected: void diff --git a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx index 7f768b55c92..85543f515d4 100644 --- a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx +++ b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx @@ -59,7 +59,7 @@ MultivariateLegendrePolynomial ::MultivariateLegendrePolynomial(unsigned int MultivariateLegendrePolynomial ::~MultivariateLegendrePolynomial() = default; void -MultivariateLegendrePolynomial ::Print(std::ostream & os) +MultivariateLegendrePolynomial ::Print(std::ostream & os) const { itk::Indent indent(4); From 64a864e35e1b40f52547ed0767de9d138da21c97 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 14 Dec 2019 07:35:00 -0600 Subject: [PATCH 4/5] BUG: Add missing const 'GetDataObject' function signature --- Modules/Core/Common/include/itkDataObject.h | 3 +++ Modules/Core/Common/src/itkDataObject.cxx | 7 +++++++ .../ImageCompose/test/itkJoinSeriesImageFilterTest.cxx | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Modules/Core/Common/include/itkDataObject.h b/Modules/Core/Common/include/itkDataObject.h index 97b38320751..ea746fd8643 100644 --- a/Modules/Core/Common/include/itkDataObject.h +++ b/Modules/Core/Common/include/itkDataObject.h @@ -81,6 +81,9 @@ class ITKCommon_EXPORT DataObjectError : public ExceptionObject DataObject * GetDataObject() noexcept; + const DataObject * + GetDataObject() const noexcept; + protected: /** Print exception information. This method can be overridden by * specific exception subtypes. The default is to print out the diff --git a/Modules/Core/Common/src/itkDataObject.cxx b/Modules/Core/Common/src/itkDataObject.cxx index 12127d366b3..85feb624968 100644 --- a/Modules/Core/Common/src/itkDataObject.cxx +++ b/Modules/Core/Common/src/itkDataObject.cxx @@ -70,6 +70,13 @@ DataObjectError ::GetDataObject() noexcept return m_DataObject; } +const DataObject * +DataObjectError ::GetDataObject() const noexcept +{ + return m_DataObject; +} + + void DataObjectError ::PrintSelf(std::ostream & os, Indent indent) const { diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index 14f26b25aba..42ca88b7669 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -150,7 +150,7 @@ itkJoinSeriesImageFilterTest(int, char *[]) catch (const itk::ExceptionObject & err) { std::cout << err << std::endl; - auto * errp = dynamic_cast(&err); + const auto * const errp = dynamic_cast(&err); if (errp) { errp->GetDataObject()->Print(std::cout); From 011b9aa21e5cb35de74676b509f5fa9630d1812d Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 14 Dec 2019 07:59:02 -0600 Subject: [PATCH 5/5] BUG: Set 'GetDataObject' function signature to const When throwing exceptions, getting the data object pointer should be always be constant. --- Modules/Core/Common/include/itkDataObject.h | 8 +++++--- Modules/Core/Common/src/itkDataObject.cxx | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Modules/Core/Common/include/itkDataObject.h b/Modules/Core/Common/include/itkDataObject.h index ea746fd8643..ebe4245fd2c 100644 --- a/Modules/Core/Common/include/itkDataObject.h +++ b/Modules/Core/Common/include/itkDataObject.h @@ -77,12 +77,14 @@ class ITKCommon_EXPORT DataObjectError : public ExceptionObject void SetDataObject(DataObject * dobj) noexcept; - /** Get the data object that is throwing this exception. */ - DataObject * - GetDataObject() noexcept; + /** Get the data object that is throwing this exception. */ const DataObject * GetDataObject() const noexcept; +#if !defined(ITK_LEGACY_REMOVE) + DataObject * + GetDataObject() noexcept; +#endif protected: /** Print exception information. This method can be overridden by diff --git a/Modules/Core/Common/src/itkDataObject.cxx b/Modules/Core/Common/src/itkDataObject.cxx index 85feb624968..7ace5282117 100644 --- a/Modules/Core/Common/src/itkDataObject.cxx +++ b/Modules/Core/Common/src/itkDataObject.cxx @@ -64,11 +64,13 @@ DataObjectError ::SetDataObject(DataObject * dobj) noexcept m_DataObject = dobj; } +#if !defined(ITK_LEGACY_REMOVE) DataObject * DataObjectError ::GetDataObject() noexcept { return m_DataObject; } +#endif const DataObject * DataObjectError ::GetDataObject() const noexcept