From e254f8df9b68170a8a0e12cb703b55fe14a8a0ee Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 16 May 2023 17:35:23 +0200 Subject: [PATCH] STYLE: Remove initial `<<` insertion from `itkExceptionMacro(<< "` calls Let the C++ preprocessor append the specified literal string to the error message, instead of doing the equivalent `<<` insertion at run-time. Aims to shorten the code a little bit, and improve consistency. The code base already had more than 750 `itkExceptionMacro` calls that passed a literal string directly, without having `<<` at its left side. --- .../Bridge/VTK/include/itkVTKImageExport.hxx | 16 +-- .../Bridge/VTK/include/itkVTKImageImport.hxx | 16 +-- .../Bridge/VTK/src/itkVTKImageExportBase.cxx | 4 +- .../include/itkVectorResampleImageFilter.hxx | 2 +- .../Common/include/itkExtractImageFilter.h | 2 +- .../Common/include/itkExtractImageFilter.hxx | 4 +- .../itkFiniteCylinderSpatialFunction.hxx | 2 +- .../include/itkFrustumSpatialFunction.hxx | 2 +- Modules/Core/Common/include/itkImage.hxx | 4 +- Modules/Core/Common/include/itkImageBase.hxx | 6 +- .../Common/include/itkImageDuplicator.hxx | 2 +- .../Common/include/itkImageKernelOperator.hxx | 5 +- Modules/Core/Common/include/itkImageSink.hxx | 5 +- .../Core/Common/include/itkImageSource.hxx | 6 +- .../Common/include/itkImageToImageFilter.hxx | 5 +- Modules/Core/Common/include/itkMacro.h | 6 +- Modules/Core/Common/include/itkPointSet.hxx | 16 +-- .../Core/Common/include/itkSobelOperator.hxx | 8 +- .../include/itkStreamingImageFilter.hxx | 4 +- .../Core/Common/include/itkVectorImage.hxx | 6 +- .../Common/src/itkPlatformMultiThreader.cxx | 6 +- .../src/itkPlatformMultiThreaderPosix.cxx | 12 +- .../src/itkPlatformMultiThreaderSingle.cxx | 6 +- .../src/itkPlatformMultiThreaderWindows.cxx | 4 +- .../Core/Common/src/itkPoolMultiThreader.cxx | 2 +- Modules/Core/Common/src/itkProcessObject.cxx | 18 +-- .../Common/src/itkStreamingProcessObject.cxx | 4 +- .../Core/Common/src/itkTBBMultiThreader.cxx | 2 +- .../itkDenseFiniteDifferenceImageFilter.hxx | 2 +- .../Core/GPUCommon/include/itkGPUImage.hxx | 4 +- .../include/itkGPUImageToImageFilter.hxx | 8 +- .../GPUCommon/include/itkGPUReduction.hxx | 2 +- .../ImageAdaptors/include/itkImageAdaptor.hxx | 4 +- .../itkBSplineDecompositionImageFilter.hxx | 2 +- .../include/itkCovarianceImageFunction.hxx | 2 +- .../include/itkGaussianBlurImageFunction.hxx | 4 +- Modules/Core/Mesh/include/itkMesh.hxx | 10 +- Modules/Core/Mesh/include/itkMeshSource.hxx | 6 +- ...kParametricSpaceToImageSpaceMeshFilter.hxx | 4 +- Modules/Core/Mesh/include/itkSimplexMesh.hxx | 4 +- .../itkSimplexMeshToTriangleMeshFilter.hxx | 4 +- .../itkSimplexMeshVolumeCalculator.hxx | 4 +- .../Mesh/include/itkTransformMeshFilter.hxx | 6 +- .../itkTriangleMeshToBinaryImageFilter.hxx | 4 +- .../Mesh/include/itkVTKPolyDataReader.hxx | 91 +++++++------- .../Core/Mesh/include/itkWarpMeshFilter.hxx | 4 +- .../test/itkMeshSourceGraftOutputTest.cxx | 4 +- .../QuadEdgeMesh/include/itkQuadEdgeMesh.hxx | 4 +- .../include/itkArrowSpatialObject.hxx | 2 +- .../include/itkBlobSpatialObject.hxx | 2 +- .../include/itkBoxSpatialObject.hxx | 2 +- .../include/itkContourSpatialObject.hxx | 4 +- .../include/itkDTITubeSpatialObject.hxx | 2 +- .../include/itkEllipseSpatialObject.hxx | 2 +- .../include/itkGaussianSpatialObject.hxx | 2 +- .../include/itkGroupSpatialObject.hxx | 2 +- .../include/itkImageMaskSpatialObject.hxx | 2 +- .../include/itkImageSpatialObject.hxx | 2 +- .../include/itkLandmarkSpatialObject.hxx | 2 +- .../include/itkLineSpatialObject.hxx | 2 +- .../include/itkMeshSpatialObject.hxx | 2 +- .../include/itkMetaArrowConverter.hxx | 4 +- .../include/itkMetaBlobConverter.hxx | 4 +- .../include/itkMetaContourConverter.hxx | 4 +- .../include/itkMetaDTITubeConverter.hxx | 4 +- .../include/itkMetaEllipseConverter.hxx | 4 +- .../include/itkMetaGaussianConverter.hxx | 4 +- .../include/itkMetaGroupConverter.hxx | 4 +- .../include/itkMetaImageConverter.hxx | 4 +- .../include/itkMetaLandmarkConverter.hxx | 4 +- .../include/itkMetaLineConverter.hxx | 4 +- .../include/itkMetaMeshConverter.hxx | 4 +- .../include/itkMetaSurfaceConverter.hxx | 4 +- .../include/itkMetaTubeConverter.hxx | 4 +- .../include/itkMetaVesselTubeConverter.hxx | 4 +- .../include/itkPointBasedSpatialObject.hxx | 6 +- .../include/itkPolygonSpatialObject.hxx | 2 +- .../include/itkSpatialObject.hxx | 22 ++-- .../include/itkSpatialObjectDuplicator.hxx | 2 +- .../include/itkSpatialObjectPoint.hxx | 4 +- .../include/itkSurfaceSpatialObject.hxx | 2 +- .../include/itkSurfaceSpatialObjectPoint.hxx | 4 +- .../include/itkTubeSpatialObject.hxx | 6 +- .../include/itkTubeSpatialObjectPoint.hxx | 16 +-- .../test/itkNewMetaObjectTypeTest.cxx | 4 +- .../itkTestingComparisonImageFilter.hxx | 2 +- .../itkTestingExtractSliceImageFilter.h | 2 +- .../itkTestingExtractSliceImageFilter.hxx | 4 +- .../itkTestingStretchIntensityImageFilter.hxx | 2 +- .../include/itkBSplineBaseTransform.h | 10 +- .../include/itkBSplineBaseTransform.hxx | 8 +- .../include/itkBSplineDeformableTransform.hxx | 14 ++- .../Transform/include/itkBSplineTransform.hxx | 9 +- .../itkBSplineTransformInitializer.hxx | 6 +- .../include/itkCompositeTransform.hxx | 10 +- .../Transform/include/itkEuler3DTransform.hxx | 5 +- .../Transform/include/itkKernelTransform.h | 4 +- .../Transform/include/itkKernelTransform.hxx | 4 +- .../include/itkMatrixOffsetTransformBase.hxx | 8 +- .../Transform/include/itkMultiTransform.hxx | 8 +- .../include/itkRigid3DPerspectiveTransform.h | 6 +- .../Transform/include/itkRigid3DTransform.hxx | 4 +- .../include/itkScaleSkewVersor3DTransform.hxx | 2 +- .../include/itkScaleVersor3DTransform.hxx | 2 +- .../include/itkSimilarity2DTransform.hxx | 4 +- .../include/itkSimilarity3DTransform.hxx | 6 +- .../Core/Transform/include/itkTransform.hxx | 2 +- .../itkTransformGeometryImageFilter.hxx | 2 +- .../include/itkTranslationTransform.hxx | 4 +- .../test/itkRigid3DTransformTest.cxx | 2 +- .../itkMRIBiasFieldCorrectionFilter.hxx | 14 +-- ...kedFFTNormalizedCorrelationImageFilter.hxx | 2 +- ...tkBinaryMinMaxCurvatureFlowImageFilter.hxx | 2 +- .../include/itkCurvatureFlowImageFilter.hxx | 2 +- .../itkMinMaxCurvatureFlowImageFilter.hxx | 2 +- .../test/itkDeconvolutionIterationCommand.h | 2 +- .../itkPatchBasedDenoisingImageFilter.hxx | 26 ++-- ...ffusionTensor3DReconstructionImageFilter.h | 4 +- ...usionTensor3DReconstructionImageFilter.hxx | 16 +-- ...hingOnUpdateDisplacementFieldTransform.hxx | 2 +- .../itkConstantVelocityFieldTransform.hxx | 2 +- ...lacementFieldJacobianDeterminantFilter.hxx | 2 +- ...hingOnUpdateDisplacementFieldTransform.hxx | 2 +- .../include/itkVelocityFieldTransform.hxx | 4 +- .../itkIsoContourDistanceImageFilter.hxx | 2 +- .../itkVnlComplexToComplexFFTImageFilter.hxx | 3 +- .../include/itkVnlForwardFFTImageFilter.hxx | 3 +- ...lfHermitianToRealInverseFFTImageFilter.hxx | 3 +- .../include/itkVnlInverseFFTImageFilter.hxx | 3 +- ...alToHalfHermitianForwardFFTImageFilter.hxx | 4 +- .../include/itkFastMarchingBase.hxx | 8 +- .../itkFastMarchingExtensionImageFilter.hxx | 8 +- ...tkFastMarchingExtensionImageFilterBase.hxx | 8 +- .../itkFastMarchingImageFilterBase.hxx | 2 +- ...chingReachedTargetNodesStoppingCriterion.h | 2 +- ...itkFastMarchingUpwindGradientImageFilter.h | 6 +- .../itkGPUNeighborhoodOperatorImageFilter.hxx | 2 +- .../itkGPUDiscreteGaussianImageFilter.hxx | 2 +- .../itkGPUBinaryThresholdImageFilter.hxx | 2 +- .../include/itkSTAPLEImageFilter.h | 4 +- .../include/itkSTAPLEImageFilter.hxx | 2 +- .../include/itkComposeImageFilter.hxx | 4 +- .../include/itkJoinSeriesImageFilter.hxx | 11 +- .../include/itkDerivativeImageFilter.hxx | 2 +- .../itkHoughTransform2DCirclesImageFilter.hxx | 2 +- .../include/itkLaplacianImageFilter.hxx | 2 +- .../itkLaplacianSharpeningImageFilter.hxx | 2 +- .../include/itkUnsharpMaskImageFilter.hxx | 2 +- .../include/itkBinaryFunctorImageFilter.hxx | 4 +- .../include/itkBinaryGeneratorImageFilter.hxx | 4 +- .../itkMovingHistogramImageFilterBase.hxx | 2 +- .../include/itkTernaryFunctorImageFilter.hxx | 2 +- .../itkTernaryGeneratorImageFilter.hxx | 6 +- .../itkLabelMapContourOverlayImageFilter.hxx | 2 +- .../include/itkGradientImageFilter.hxx | 2 +- .../itkGradientMagnitudeImageFilter.hxx | 2 +- .../itkVectorGradientMagnitudeImageFilter.h | 4 +- .../itkVectorGradientMagnitudeImageFilter.hxx | 4 +- .../include/itkExpandImageFilter.hxx | 2 +- .../include/itkInterpolateImageFilter.hxx | 4 +- .../include/itkPadImageFilterBase.hxx | 2 +- .../include/itkResampleImageFilter.hxx | 2 +- .../ImageGrid/include/itkTileImageFilter.hxx | 7 +- .../ImageGrid/include/itkWarpImageFilter.hxx | 2 +- .../include/itkWarpVectorImageFilter.hxx | 2 +- .../itkHistogramMatchingImageFilter.hxx | 8 +- .../include/itkMaskImageFilter.h | 4 +- .../include/itkMaskNegatedImageFilter.h | 4 +- .../include/itkPolylineMask2DImageFilter.hxx | 2 +- .../include/itkPolylineMaskImageFilter.hxx | 8 +- .../itkRescaleIntensityImageFilter.hxx | 2 +- .../include/itkVectorExpandImageFilter.hxx | 4 +- .../itkVectorIndexSelectionCastImageFilter.h | 4 +- .../itkVectorRescaleIntensityImageFilter.hxx | 2 +- .../itkPeakSignalToNoiseRatioCalculator.hxx | 2 +- .../include/itkAccumulateImageFilter.hxx | 4 +- .../include/itkImageMomentsCalculator.hxx | 12 +- .../include/itkProjectionImageFilter.hxx | 12 +- .../itkBinaryImageToLabelMapFilter.hxx | 8 +- .../LabelMap/include/itkLabelMap.hxx | 38 +++--- .../include/itkMergeLabelMapFilter.hxx | 8 +- .../itkShapeKeepNObjectsLabelMapFilter.hxx | 2 +- .../include/itkShapeOpeningLabelMapFilter.hxx | 2 +- .../itkShapePositionLabelMapFilter.hxx | 2 +- .../include/itkShapeRelabelLabelMapFilter.hxx | 2 +- .../include/itkShapeUniqueLabelMapFilter.hxx | 2 +- .../include/itkGrayscaleDilateImageFilter.hxx | 2 +- .../include/itkGrayscaleErodeImageFilter.hxx | 2 +- ...ayscaleMorphologicalClosingImageFilter.hxx | 2 +- ...ayscaleMorphologicalOpeningImageFilter.hxx | 2 +- .../itkMorphologicalGradientImageFilter.hxx | 2 +- .../include/itkReconstructionImageFilter.hxx | 6 +- .../Path/include/itkParametricPath.hxx | 2 +- .../Path/include/itkPathToImageFilter.hxx | 4 +- .../itkRecursiveGaussianImageFilter.hxx | 4 +- .../include/itkBinaryThresholdImageFilter.hxx | 2 +- .../include/itkHistogramThresholdCalculator.h | 2 +- .../itkHistogramThresholdImageFilter.h | 2 +- .../include/itkHuangThresholdCalculator.hxx | 2 +- .../itkIntermodesThresholdCalculator.hxx | 2 +- .../itkIntermodesThresholdImageFilter.h | 2 +- .../include/itkIsoDataThresholdCalculator.hxx | 2 +- .../itkKappaSigmaThresholdImageCalculator.hxx | 2 +- ...kKittlerIllingworthThresholdCalculator.hxx | 6 +- .../include/itkLiThresholdCalculator.hxx | 2 +- .../itkMaximumEntropyThresholdCalculator.hxx | 2 +- .../include/itkMomentsThresholdCalculator.hxx | 2 +- .../itkOtsuMultipleThresholdsCalculator.hxx | 2 +- .../include/itkOtsuThresholdImageFilter.h | 2 +- .../itkRenyiEntropyThresholdCalculator.hxx | 2 +- .../itkShanbhagThresholdCalculator.hxx | 2 +- .../include/itkThresholdImageFilter.hxx | 2 +- .../itkThresholdLabelerImageFilter.hxx | 2 +- .../itkTriangleThresholdCalculator.hxx | 2 +- .../include/itkYenThresholdCalculator.hxx | 2 +- Modules/IO/BMP/src/itkBMPImageIO.cxx | 14 +-- Modules/IO/BioRad/src/itkBioRadImageIO.cxx | 14 +-- .../CSV/include/itkCSVArray2DDataObject.hxx | 16 +-- .../include/itkCSVNumericObjectFileWriter.hxx | 4 +- Modules/IO/CSV/src/itkCSVFileReaderBase.cxx | 6 +- Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx | 12 +- .../IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx | 2 +- Modules/IO/GDCM/src/itkGDCMImageIO.cxx | 36 +++--- .../IO/GDCM/src/itkGDCMSeriesFileNames.cxx | 2 +- Modules/IO/HDF5/src/itkHDF5ImageIO.cxx | 20 ++-- .../ImageBase/include/itkImageFileWriter.hxx | 6 +- .../include/itkImageSeriesReader.hxx | 5 +- .../include/itkImageSeriesWriter.hxx | 12 +- Modules/IO/ImageBase/src/itkImageIOBase.cxx | 12 +- .../src/itkNumericSeriesFileNames.cxx | 4 +- .../itkRegularExpressionSeriesFileNames.cxx | 6 +- .../ImageBase/src/itkStreamingImageIOBase.cxx | 4 +- Modules/IO/JPEG/src/itkJPEGImageIO.cxx | 12 +- Modules/IO/LSM/src/itkLSMImageIO.cxx | 6 +- Modules/IO/MINC/src/itkMINCImageIO.cxx | 64 +++++----- Modules/IO/MRC/src/itkMRCImageIO.cxx | 29 ++--- Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx | 10 +- .../IO/MeshBase/include/itkMeshFileReader.hxx | 24 ++-- .../IO/MeshBase/include/itkMeshFileWriter.hxx | 4 +- .../src/itkFreeSurferAsciiMeshIO.cxx | 4 +- .../src/itkFreeSurferBinaryMeshIO.cxx | 12 +- Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx | 40 +++---- Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx | 8 +- Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx | 14 +-- .../IO/MeshVTK/include/itkVTKPolyDataMeshIO.h | 10 +- .../IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx | 76 ++++++------ Modules/IO/NIFTI/src/itkNiftiImageIO.cxx | 55 +++++---- Modules/IO/PNG/src/itkPNGImageIO.cxx | 4 +- Modules/IO/RAW/include/itkRawImageIO.hxx | 8 +- .../IO/Stimulate/src/itkStimulateImageIO.cxx | 16 +-- Modules/IO/TIFF/src/itkTIFFImageIO.cxx | 46 ++++---- .../TransformHDF5/src/itkHDF5TransformIO.cxx | 12 +- .../src/itkTxtTransformIO.cxx | 2 +- .../include/itkMINCTransformAdapter.h | 26 ++-- .../TransformMINC/src/itkMINCTransformIO.cxx | 18 +-- Modules/IO/VTK/src/itkVTKImageIO.cxx | 48 ++++---- .../itkConformalFlatteningMeshFilter.hxx | 4 +- ...iscreteGaussianDerivativeImageFunction.hxx | 2 +- ...GradientMagnitudeGaussianImageFunction.hxx | 2 +- ...iphaseDenseFiniteDifferenceImageFilter.hxx | 2 +- ...phaseSparseFiniteDifferenceImageFilter.hxx | 6 +- .../itkRobustAutomaticThresholdCalculator.hxx | 4 +- .../itkWarpHarmonicEnergyCalculator.hxx | 2 +- Modules/Numerics/FEM/include/itkFEMObject.hxx | 14 +-- .../FEM/include/itkMetaFEMObjectConverter.hxx | 4 +- .../Optimizers/include/itkLBFGSBOptimizer.h | 2 +- .../Optimizers/src/itkAmoebaOptimizer.cxx | 16 +-- .../Optimizers/src/itkExhaustiveOptimizer.cxx | 4 +- .../src/itkGradientDescentOptimizer.cxx | 5 +- .../Optimizers/src/itkLBFGSBOptimizer.cxx | 10 +- .../Optimizers/src/itkLBFGSOptimizer.cxx | 2 +- .../itkOnePlusOneEvolutionaryOptimizer.cxx | 7 +- .../src/itkParticleSwarmOptimizerBase.cxx | 26 ++-- ...RigidTransformGradientDescentOptimizer.cxx | 4 +- ...egularStepGradientDescentBaseOptimizer.cxx | 13 +- .../Optimizers/src/itkSPSAOptimizer.cxx | 13 +- .../include/itkExhaustiveOptimizerv4.hxx | 4 +- .../include/itkLBFGS2Optimizerv4.hxx | 2 +- .../include/itkObjectToObjectMetric.hxx | 2 +- .../itkOnePlusOneEvolutionaryOptimizerv4.hxx | 7 +- ...egistrationParameterScalesFromJacobian.hxx | 2 +- ...kRegularStepGradientDescentOptimizerv4.hxx | 13 +- .../Optimizersv4/src/itkAmoebaOptimizerv4.cxx | 8 +- .../Optimizersv4/src/itkLBFGSBOptimizerv4.cxx | 8 +- .../Optimizersv4/src/itkLBFGSOptimizerv4.cxx | 2 +- .../Statistics/include/itkDistanceMetric.hxx | 2 +- ...tkDistanceToCentroidMembershipFunction.hxx | 2 +- .../include/itkEuclideanDistanceMetric.hxx | 4 +- .../itkEuclideanSquareDistanceMetric.hxx | 4 +- ...ationMaximizationMixtureModelEstimator.hxx | 2 +- .../include/itkGaussianMembershipFunction.hxx | 8 +- ...aussianRandomSpatialNeighborSubsampler.hxx | 4 +- .../include/itkImageToHistogramFilter.hxx | 2 +- .../Statistics/include/itkKdTreeGenerator.hxx | 2 +- ...kMahalanobisDistanceMembershipFunction.hxx | 8 +- .../include/itkMahalanobisDistanceMetric.hxx | 6 +- .../include/itkManhattanDistanceMetric.hxx | 4 +- .../itkRegionConstrainedSubsampler.hxx | 2 +- .../include/itkSpatialNeighborSubsampler.hxx | 6 +- .../Statistics/include/itkSubsamplerBase.hxx | 2 +- ...UniformRandomSpatialNeighborSubsampler.hxx | 6 +- .../itkWeightedCentroidKdTreeGenerator.hxx | 2 +- .../include/itkBlockMatchingImageFilter.hxx | 2 +- .../itkCompareHistogramImageToImageMetric.hxx | 14 +-- .../itkEuclideanDistancePointMetric.hxx | 6 +- ...tkGradientDifferenceImageToImageMetric.hxx | 2 +- .../itkHistogramImageToImageMetric.hxx | 13 +- .../include/itkImageRegistrationMethod.hxx | 14 +-- .../Common/include/itkImageToImageMetric.hxx | 16 +-- .../include/itkImageToSpatialObjectMetric.hxx | 10 +- ...ImageToSpatialObjectRegistrationMethod.hxx | 12 +- .../itkKappaStatisticImageToImageMetric.hxx | 10 +- .../itkLandmarkBasedTransformInitializer.hxx | 19 ++- .../itkMatchCardinalityImageToImageMetric.hxx | 6 +- ...ocalSquareDifferenceImageToImageMetric.hxx | 2 +- ...lSquareDifferencePointSetToImageMetric.hxx | 16 +-- .../itkMeanSquareRegistrationFunction.hxx | 2 +- .../itkMeanSquaresImageToImageMetric.hxx | 6 +- .../itkMeanSquaresPointSetToImageMetric.hxx | 16 +-- ...MultiResolutionImageRegistrationMethod.hxx | 20 ++-- .../itkMultiResolutionPyramidImageFilter.hxx | 6 +- ...itkMutualInformationImageToImageMetric.hxx | 8 +- ...ormalizedCorrelationImageToImageMetric.hxx | 10 +- ...alizedCorrelationPointSetToImageMetric.hxx | 10 +- .../include/itkPointSetToImageMetric.hxx | 10 +- .../itkPointSetToImageRegistrationMethod.hxx | 14 +-- .../include/itkPointSetToPointSetMetric.hxx | 8 +- ...tkPointSetToPointSetRegistrationMethod.hxx | 12 +- ...rsiveMultiResolutionPyramidImageFilter.hxx | 4 +- .../FEM/include/itkFEMRegistrationFilter.hxx | 4 +- .../FEM/include/itkMIRegistrationFunction.hxx | 2 +- .../include/itkNCCRegistrationFunction.hxx | 2 +- .../FEM/test/itkVTKTetrahedralMeshReader.hxx | 111 +++++++++--------- .../itkGPUDemonsRegistrationFilter.hxx | 10 +- .../itkGPUDemonsRegistrationFunction.hxx | 2 +- .../itkGPUPDEDeformableRegistrationFilter.hxx | 4 +- .../include/itkImageToImageMetricv4.hxx | 8 +- .../itkCurvatureRegistrationFilter.hxx | 4 +- .../include/itkDemonsRegistrationFilter.hxx | 10 +- .../include/itkDemonsRegistrationFunction.hxx | 2 +- ...kDiffeomorphicDemonsRegistrationFilter.hxx | 4 +- .../itkESMDemonsRegistrationFunction.hxx | 6 +- ...ymmetricForcesDemonsRegistrationFilter.hxx | 4 +- ...metricForcesDemonsRegistrationFunction.hxx | 2 +- .../itkLevelSetMotionRegistrationFilter.hxx | 22 ++-- .../itkLevelSetMotionRegistrationFunction.hxx | 2 +- ...ltiResolutionPDEDeformableRegistration.hxx | 8 +- .../itkPDEDeformableRegistrationFilter.hxx | 4 +- ...ymmetricForcesDemonsRegistrationFilter.hxx | 12 +- ...metricForcesDemonsRegistrationFunction.hxx | 2 +- .../test/itkSimpleImageRegistrationTest.cxx | 2 +- ...ageRegistrationTestWithMaskAndSampling.cxx | 2 +- .../itkSimplePointSetRegistrationTest.cxx | 2 +- ...ianClassifierInitializationImageFilter.hxx | 6 +- .../include/itkImageKmeansModelEstimator.hxx | 8 +- .../itkConnectedComponentImageFilter.hxx | 8 +- .../include/itkKLMRegionGrowImageFilter.hxx | 20 ++-- .../src/itkKLMSegmentationRegion.cxx | 26 ++-- .../itkLevelSetFunctionWithRefitTerm.hxx | 4 +- .../itkLevelSetNeighborhoodExtractor.hxx | 4 +- ...ParallelSparseFieldLevelSetImageFilter.hxx | 2 +- .../include/itkShapePriorMAPCostFunction.hxx | 4 +- .../itkShapePriorMAPCostFunctionBase.h | 2 +- .../itkShapePriorMAPCostFunctionBase.hxx | 6 +- ...pePriorSegmentationLevelSetImageFilter.hxx | 8 +- .../itkSparseFieldLevelSetImageFilter.hxx | 2 +- .../include/itkDiscreteLevelSetImage.hxx | 8 +- .../LevelSetsv4/include/itkLevelSetBase.hxx | 16 +-- .../include/itkLevelSetDenseImage.hxx | 8 +- .../include/itkLevelSetQuadEdgeMesh.hxx | 8 +- .../include/itkLevelSetSparseImage.hxx | 8 +- .../itkPCAShapeSignedDistanceFunction.hxx | 12 +- ...logicalWatershedFromMarkersImageFilter.hxx | 2 +- .../include/itkWatershedImageFilter.h | 2 +- .../BridgeOpenCV/src/itkOpenCVVideoIO.cxx | 14 +-- Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx | 12 +- .../Core/include/itkImageToVideoFilter.hxx | 2 +- Modules/Video/Core/include/itkVideoSource.hxx | 8 +- Modules/Video/Core/include/itkVideoStream.hxx | 4 +- .../Video/Core/src/itkTemporalDataObject.cxx | 10 +- .../Core/src/itkTemporalProcessObject.cxx | 32 ++--- .../Video/Core/test/itkVideoSourceTest.cxx | 4 +- .../Core/test/itkVideoToVideoFilterTest.cxx | 8 +- .../Video/IO/include/itkVideoFileReader.hxx | 2 +- Modules/Video/IO/src/itkFileListVideoIO.cxx | 4 +- .../Python/PyUtils/itkPyCommand.cxx | 4 +- .../Python/PyUtils/itkPyImageFilter.hxx | 10 +- 387 files changed, 1418 insertions(+), 1394 deletions(-) diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx index cb2e1269389..c6fcc23a94f 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx @@ -97,7 +97,7 @@ VTKImageExport::VTKImageExport() } else { - itkExceptionMacro(<< "Type currently not supported"); + itkExceptionMacro("Type currently not supported"); } } @@ -141,7 +141,7 @@ VTKImageExport::WholeExtentCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } InputRegionType region = input->GetLargestPossibleRegion(); @@ -176,7 +176,7 @@ VTKImageExport::SpacingCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } const typename TInputImage::SpacingType & spacing = input->GetSpacing(); @@ -233,7 +233,7 @@ VTKImageExport::OriginCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } const typename TInputImage::PointType & origin = input->GetOrigin(); @@ -290,7 +290,7 @@ VTKImageExport::DirectionCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } const typename TInputImage::DirectionType & direction = input->GetDirection(); @@ -363,7 +363,7 @@ VTKImageExport::PropagateUpdateExtentCallback(int * extent) InputImagePointer input = this->GetInput(); if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } input->SetRequestedRegion(region); @@ -383,7 +383,7 @@ VTKImageExport::DataExtentCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } InputRegionType region = input->GetBufferedRegion(); @@ -416,7 +416,7 @@ VTKImageExport::BufferPointerCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } return input->GetBufferPointer(); diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx index e0f9bac6356..5e53427ecf3 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx @@ -92,7 +92,7 @@ VTKImageImport::VTKImageImport() } else { - itkExceptionMacro(<< "Type currently not supported"); + itkExceptionMacro("Type currently not supported"); } } @@ -107,7 +107,7 @@ VTKImageImport::PropagateRequestedRegion(DataObject * outputPtr) if (!output) { - itkExceptionMacro(<< "Downcast from DataObject to my Image type failed."); + itkExceptionMacro("Downcast from DataObject to my Image type failed."); } Superclass::PropagateRequestedRegion(output); if (m_PropagateUpdateExtentCallback) @@ -236,9 +236,9 @@ VTKImageImport::GenerateOutputInformation() { std::string ijk = "IJK"; std::string xyz = "XYZ"; - itkExceptionMacro(<< "Cannot convert a VTK image to an ITK image of dimension " << OutputImageDimension - << " since the VTK image direction matrix element at (" << i << ',' << j - << ") is not equal to 0.0:\n" + itkExceptionMacro("Cannot convert a VTK image to an ITK image of dimension " + << OutputImageDimension << " since the VTK image direction matrix element at (" << i << ',' + << j << ") is not equal to 0.0:\n" << " I J K\n" << "X " << inDirection[0] << ", " << inDirection[1] << ", " << inDirection[2] << '\n' << "Y " << inDirection[3] << ", " << inDirection[4] << ", " << inDirection[5] << '\n' @@ -261,8 +261,8 @@ VTKImageImport::GenerateOutputInformation() if (components != estimatedNumberOfComponents) { - itkExceptionMacro(<< "Input number of components is " << components << " but should be " - << estimatedNumberOfComponents); + itkExceptionMacro("Input number of components is " << components << " but should be " + << estimatedNumberOfComponents); } } if (m_ScalarTypeCallback) @@ -270,7 +270,7 @@ VTKImageImport::GenerateOutputInformation() const char * scalarName = (m_ScalarTypeCallback)(m_CallbackUserData); if (scalarName != m_ScalarTypeName) { - itkExceptionMacro(<< "Input scalar type is " << scalarName << " but should be " << m_ScalarTypeName.c_str()); + itkExceptionMacro("Input scalar type is " << scalarName << " but should be " << m_ScalarTypeName.c_str()); } } } diff --git a/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx b/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx index bc625d69376..87c103a3592 100644 --- a/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx +++ b/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx @@ -140,7 +140,7 @@ VTKImageExportBase::PipelineModifiedCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } ModifiedTimeType pipelineMTime = input->GetPipelineMTime(); @@ -180,7 +180,7 @@ VTKImageExportBase::UpdateDataCallback() if (!input) { - itkExceptionMacro(<< "Need to set an input"); + itkExceptionMacro("Need to set an input"); } // Notify start event observers diff --git a/Modules/Compatibility/Deprecated/include/itkVectorResampleImageFilter.hxx b/Modules/Compatibility/Deprecated/include/itkVectorResampleImageFilter.hxx index f6c074f0b8f..4880cbdcdbb 100644 --- a/Modules/Compatibility/Deprecated/include/itkVectorResampleImageFilter.hxx +++ b/Modules/Compatibility/Deprecated/include/itkVectorResampleImageFilter.hxx @@ -72,7 +72,7 @@ VectorResampleImageFilter { if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator not set"); + itkExceptionMacro("Interpolator not set"); } // Connect input image to interpolator diff --git a/Modules/Core/Common/include/itkExtractImageFilter.h b/Modules/Core/Common/include/itkExtractImageFilter.h index b97286eb46b..2c2eeb3cdbd 100644 --- a/Modules/Core/Common/include/itkExtractImageFilter.h +++ b/Modules/Core/Common/include/itkExtractImageFilter.h @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilter : public InPlaceImageFilterm_DirectionCollapseStrategy = choosenStrategy; diff --git a/Modules/Core/Common/include/itkExtractImageFilter.hxx b/Modules/Core/Common/include/itkExtractImageFilter.hxx index 94ee1dcda0c..d5aa2ea8fab 100644 --- a/Modules/Core/Common/include/itkExtractImageFilter.hxx +++ b/Modules/Core/Common/include/itkExtractImageFilter.hxx @@ -215,7 +215,7 @@ ExtractImageFilter::GenerateOutputInformation() { if (vnl_determinant(outputDirection.GetVnlMatrix()) == 0.0) { - itkExceptionMacro(<< "Invalid submatrix extracted for collapsed direction."); + itkExceptionMacro("Invalid submatrix extracted for collapsed direction."); } } break; @@ -247,7 +247,7 @@ ExtractImageFilter::GenerateOutputInformation() else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::ExtractImageFilter::GenerateOutputInformation " + itkExceptionMacro("itk::ExtractImageFilter::GenerateOutputInformation " << "cannot cast input to " << typeid(ImageBase *).name()); } } diff --git a/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx b/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx index a94c5e3a861..ae89bd63378 100644 --- a/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx @@ -55,7 +55,7 @@ FiniteCylinderSpatialFunction::SetOrientation(const InputTyp norm = std::sqrt(norm); if (norm == 0.0) // avoid divide by zero { - itkExceptionMacro(<< "Degenerate orientation vector " << this->m_Orientation); + itkExceptionMacro("Degenerate orientation vector " << this->m_Orientation); } for (unsigned int i = 0; i < VDimension; ++i) { diff --git a/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx b/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx index 415942b12a0..3fb38055e52 100644 --- a/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx @@ -106,7 +106,7 @@ FrustumSpatialFunction::Evaluate(const InputType & position) } else { - itkExceptionMacro(<< "Rotation plane not set or set to an unsupported value!"); + itkExceptionMacro("Rotation plane not set or set to an unsupported value!"); } } diff --git a/Modules/Core/Common/include/itkImage.hxx b/Modules/Core/Common/include/itkImage.hxx index 4229b2d6f9d..22d782043da 100644 --- a/Modules/Core/Common/include/itkImage.hxx +++ b/Modules/Core/Common/include/itkImage.hxx @@ -119,8 +119,8 @@ Image::Graft(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::Image::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(const Self *).name()); + itkExceptionMacro("itk::Image::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(const Self *).name()); } } } diff --git a/Modules/Core/Common/include/itkImageBase.hxx b/Modules/Core/Common/include/itkImageBase.hxx index 1ecd6b07251..a316ea468bf 100644 --- a/Modules/Core/Common/include/itkImageBase.hxx +++ b/Modules/Core/Common/include/itkImageBase.hxx @@ -202,7 +202,7 @@ ImageBase::ComputeOffsetTable() } // if( num > NumericTraits::max() ) // { - // itkExceptionMacro(<< "Requested number of pixels (" << num + // itkExceptionMacro("Requested number of pixels (" << num // << ") is greater than the largest possible number of pixels (" << // NumericTraits::max() << ")."); // } @@ -299,8 +299,8 @@ ImageBase::CopyInformation(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::ImageBase::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(const ImageBase *).name()); + itkExceptionMacro("itk::ImageBase::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(const ImageBase *).name()); } } } diff --git a/Modules/Core/Common/include/itkImageDuplicator.hxx b/Modules/Core/Common/include/itkImageDuplicator.hxx index 82f0b1642cb..d342a82ca65 100644 --- a/Modules/Core/Common/include/itkImageDuplicator.hxx +++ b/Modules/Core/Common/include/itkImageDuplicator.hxx @@ -29,7 +29,7 @@ ImageDuplicator::Update() { if (!m_InputImage) { - itkExceptionMacro(<< "Input image has not been connected"); + itkExceptionMacro("Input image has not been connected"); } // Update only if the input image has been modified diff --git a/Modules/Core/Common/include/itkImageKernelOperator.hxx b/Modules/Core/Common/include/itkImageKernelOperator.hxx index e4870010d52..6bfc14901f1 100644 --- a/Modules/Core/Common/include/itkImageKernelOperator.hxx +++ b/Modules/Core/Common/include/itkImageKernelOperator.hxx @@ -56,7 +56,8 @@ ImageKernelOperator::GenerateCoefficients() -> C // Check that the input image is fully buffered. if (m_ImageKernel->GetBufferedRegion() != m_ImageKernel->GetLargestPossibleRegion()) { - itkExceptionMacro(<< "ImageKernel is not fully buffered. " << std::endl + itkExceptionMacro("ImageKernel is not fully buffered. " + << std::endl << "Buffered region: " << m_ImageKernel->GetBufferedRegion() << std::endl << "Largest possible region: " << m_ImageKernel->GetLargestPossibleRegion() << std::endl << "You should call UpdateLargestPossibleRegion() on " @@ -69,7 +70,7 @@ ImageKernelOperator::GenerateCoefficients() -> C { if (m_ImageKernel->GetLargestPossibleRegion().GetSize()[i] % 2 == 0) { - itkExceptionMacro(<< "ImageKernelOperator requires an input image " + itkExceptionMacro("ImageKernelOperator requires an input image " << "whose size is odd in all dimensions. The provided " << "image has size " << m_ImageKernel->GetLargestPossibleRegion().GetSize()); } diff --git a/Modules/Core/Common/include/itkImageSink.hxx b/Modules/Core/Common/include/itkImageSink.hxx index b120476a70f..adea32cfe9d 100644 --- a/Modules/Core/Common/include/itkImageSink.hxx +++ b/Modules/Core/Common/include/itkImageSink.hxx @@ -236,8 +236,9 @@ ImageSink::VerifyInputInformation() ITKv5_CONST << " Direction: " << inputPtrN->GetDirection() << std::endl; directionString << "\tTolerance: " << this->m_DirectionTolerance << std::endl; } - itkExceptionMacro(<< "Inputs do not occupy the same physical space! " << std::endl - << originString.str() << spacingString.str() << directionString.str()); + itkExceptionMacro("Inputs do not occupy the same physical space! " << std::endl + << originString.str() << spacingString.str() + << directionString.str()); } } } diff --git a/Modules/Core/Common/include/itkImageSource.hxx b/Modules/Core/Common/include/itkImageSource.hxx index 2ba5afc3a4e..cd937b9c7e0 100644 --- a/Modules/Core/Common/include/itkImageSource.hxx +++ b/Modules/Core/Common/include/itkImageSource.hxx @@ -112,7 +112,7 @@ ImageSource::GraftOutput(const DataObjectIdentifierType & key, Dat { if (!graft) { - itkExceptionMacro(<< "Requested to graft output that is a nullptr pointer"); + itkExceptionMacro("Requested to graft output that is a nullptr pointer"); } // we use the process object method since all out output may not be @@ -129,8 +129,8 @@ ImageSource::GraftNthOutput(unsigned int idx, DataObject * graft) { if (idx >= this->GetNumberOfIndexedOutputs()) { - itkExceptionMacro(<< "Requested to graft output " << idx << " but this filter only has " - << this->GetNumberOfIndexedOutputs() << " indexed Outputs."); + itkExceptionMacro("Requested to graft output " << idx << " but this filter only has " + << this->GetNumberOfIndexedOutputs() << " indexed Outputs."); } this->GraftOutput(this->MakeNameFromOutputIndex(idx), graft); } diff --git a/Modules/Core/Common/include/itkImageToImageFilter.hxx b/Modules/Core/Common/include/itkImageToImageFilter.hxx index 8b028a19e74..975ac8057fd 100644 --- a/Modules/Core/Common/include/itkImageToImageFilter.hxx +++ b/Modules/Core/Common/include/itkImageToImageFilter.hxx @@ -215,8 +215,9 @@ ImageToImageFilter::VerifyInputInformation() ITKv5_CO << " Direction: " << inputPtrN->GetDirection() << std::endl; directionString << "\tTolerance: " << this->m_DirectionTolerance << std::endl; } - itkExceptionMacro(<< "Inputs do not occupy the same physical space! " << std::endl - << originString.str() << spacingString.str() << directionString.str()); + itkExceptionMacro("Inputs do not occupy the same physical space! " << std::endl + << originString.str() << spacingString.str() + << directionString.str()); } } } diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index ced301f412c..28c7da9d20c 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -551,7 +551,7 @@ OutputWindowDisplayDebugText(const char *); /** The itkExceptionMacro macro is used to print error information (i.e., usually * a condition that results in program failure). Example usage looks like: - * itkExceptionMacro(<< "this is error info" << this->SomeVariable); */ + * itkExceptionMacro("this is error info" << this->SomeVariable); */ #define itkExceptionMacro(x) \ itkSpecializedMessageExceptionMacro(ExceptionObject, << this->GetNameOfClass() << '(' << this << "): " x) @@ -894,7 +894,7 @@ compilers. itkDynamicCastInDebugMode(this->ProcessObject::GetInput(#name)); \ if (input == nullptr) \ { \ - itkExceptionMacro(<< "input" #name " is not set"); \ + itkExceptionMacro("input" #name " is not set"); \ } \ return input->Get(); \ } \ @@ -1313,7 +1313,7 @@ compilers. itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(#name)); \ if (output == nullptr) \ { \ - itkExceptionMacro(<< "output" #name " is not set"); \ + itkExceptionMacro("output" #name " is not set"); \ } \ return output->Get(); \ } \ diff --git a/Modules/Core/Common/include/itkPointSet.hxx b/Modules/Core/Common/include/itkPointSet.hxx index 81c9e8b6b9a..0aed6b93cae 100644 --- a/Modules/Core/Common/include/itkPointSet.hxx +++ b/Modules/Core/Common/include/itkPointSet.hxx @@ -291,8 +291,8 @@ PointSet::CopyInformation(const DataObject if (!pointSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::PointSet::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(PointSet *).name()); + itkExceptionMacro("itk::PointSet::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(PointSet *).name()); } m_MaximumNumberOfRegions = pointSet->GetMaximumNumberOfRegions(); @@ -315,8 +315,8 @@ PointSet::Graft(const DataObject * data) if (!pointSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::PointSet::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::PointSet::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->SetPoints(pointSet->m_PointsContainer); @@ -379,14 +379,14 @@ PointSet::VerifyRequestedRegion() // Are we asking for more regions than we can get? if (m_RequestedNumberOfRegions > m_MaximumNumberOfRegions) { - itkExceptionMacro(<< "Cannot break object into " << m_RequestedNumberOfRegions << ". The limit is " - << m_MaximumNumberOfRegions); + itkExceptionMacro("Cannot break object into " << m_RequestedNumberOfRegions << ". The limit is " + << m_MaximumNumberOfRegions); } if (m_RequestedRegion >= m_RequestedNumberOfRegions || m_RequestedRegion < 0) { - itkExceptionMacro(<< "Invalid update region " << m_RequestedRegion << ". Must be between 0 and " - << m_RequestedNumberOfRegions - 1); + itkExceptionMacro("Invalid update region " << m_RequestedRegion << ". Must be between 0 and " + << m_RequestedNumberOfRegions - 1); } return retval; diff --git a/Modules/Core/Common/include/itkSobelOperator.hxx b/Modules/Core/Common/include/itkSobelOperator.hxx index f88a4fa52ca..a163ecc4a73 100644 --- a/Modules/Core/Common/include/itkSobelOperator.hxx +++ b/Modules/Core/Common/include/itkSobelOperator.hxx @@ -70,8 +70,8 @@ SobelOperator::Fill(const CoefficientVector & co } else { - itkExceptionMacro(<< "The ND version of the Sobel operator is not yet implemented. Currently only the 2D and 3D " - "versions are available."); + itkExceptionMacro("The ND version of the Sobel operator is not yet implemented. Currently only the 2D and 3D " + "versions are available."); } } @@ -204,8 +204,8 @@ SobelOperator::GenerateCoefficients() -> Coeffic } else { - itkExceptionMacro(<< "The ND version of the Sobel operator has not been implemented. Currently only 2D and 3D " - "versions are available."); + itkExceptionMacro("The ND version of the Sobel operator has not been implemented. Currently only 2D and 3D " + "versions are available."); } return coeff; diff --git a/Modules/Core/Common/include/itkStreamingImageFilter.hxx b/Modules/Core/Common/include/itkStreamingImageFilter.hxx index bfbebfd2a5e..4db5e1c8131 100644 --- a/Modules/Core/Common/include/itkStreamingImageFilter.hxx +++ b/Modules/Core/Common/include/itkStreamingImageFilter.hxx @@ -117,8 +117,8 @@ StreamingImageFilter::UpdateOutputData(DataObject * i const itk::ProcessObject::DataObjectPointerArraySizeType ninputs = this->GetNumberOfValidRequiredInputs(); if (ninputs < this->GetNumberOfRequiredInputs()) { - itkExceptionMacro(<< "At least " << this->GetNumberOfRequiredInputs() << " inputs are required but only " << ninputs - << " are specified."); + itkExceptionMacro("At least " << this->GetNumberOfRequiredInputs() << " inputs are required but only " << ninputs + << " are specified."); } /** diff --git a/Modules/Core/Common/include/itkVectorImage.hxx b/Modules/Core/Common/include/itkVectorImage.hxx index 86778e7f8f0..2ff98e10c50 100644 --- a/Modules/Core/Common/include/itkVectorImage.hxx +++ b/Modules/Core/Common/include/itkVectorImage.hxx @@ -39,7 +39,7 @@ VectorImage::Allocate(const bool UseDefaultConstructor) { if (m_VectorLength == 0) { - itkExceptionMacro(<< "Cannot allocate VectorImage with VectorLength = 0"); + itkExceptionMacro("Cannot allocate VectorImage with VectorLength = 0"); } SizeValueType num; @@ -127,8 +127,8 @@ VectorImage::Graft(const DataObject * data) if (imgData == nullptr) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::VectorImage::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(const Self *).name()); + itkExceptionMacro("itk::VectorImage::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(const Self *).name()); } // Copy from VectorImage< TPixel, dim > // Now copy anything remaining that is needed diff --git a/Modules/Core/Common/src/itkPlatformMultiThreader.cxx b/Modules/Core/Common/src/itkPlatformMultiThreader.cxx index 13f440ebfa6..56668ffabc0 100644 --- a/Modules/Core/Common/src/itkPlatformMultiThreader.cxx +++ b/Modules/Core/Common/src/itkPlatformMultiThreader.cxx @@ -95,7 +95,7 @@ PlatformMultiThreader::SetMultipleMethod(ThreadIdType index, ThreadFunctionType // You can only set the method for 0 through NumberOfWorkUnits-1 if (index >= m_NumberOfWorkUnits) { - itkExceptionMacro(<< "Can't set method " << index << " with a thread count of " << m_NumberOfWorkUnits); + itkExceptionMacro("Can't set method " << index << " with a thread count of " << m_NumberOfWorkUnits); } else { @@ -113,7 +113,7 @@ PlatformMultiThreader::SingleMethodExecute() if (!m_SingleMethod) { - itkExceptionMacro(<< "No single method set!"); + itkExceptionMacro("No single method set!"); } // obey the global maximum number of threads limit @@ -228,7 +228,7 @@ PlatformMultiThreader::SingleMethodExecute() } else { - itkExceptionMacro(<< "Exception occurred during SingleMethodExecute" << std::endl << exceptionDetails); + itkExceptionMacro("Exception occurred during SingleMethodExecute" << std::endl << exceptionDetails); } } } diff --git a/Modules/Core/Common/src/itkPlatformMultiThreaderPosix.cxx b/Modules/Core/Common/src/itkPlatformMultiThreaderPosix.cxx index 25d03aca4b7..843826bd219 100644 --- a/Modules/Core/Common/src/itkPlatformMultiThreaderPosix.cxx +++ b/Modules/Core/Common/src/itkPlatformMultiThreaderPosix.cxx @@ -54,7 +54,7 @@ PlatformMultiThreader::MultipleMethodExecute() { if (m_MultipleMethod[thread_loop] == (ThreadFunctionType) nullptr) { - itkExceptionMacro(<< "No multiple method set for: " << thread_loop); + itkExceptionMacro("No multiple method set for: " << thread_loop); } } @@ -86,7 +86,7 @@ PlatformMultiThreader::MultipleMethodExecute() ((void *)(&m_ThreadInfoArray[thread_loop]))); if (threadError != 0) { - itkExceptionMacro(<< "Unable to create a thread. pthread_create() returned " << threadError); + itkExceptionMacro("Unable to create a thread. pthread_create() returned " << threadError); } } @@ -128,7 +128,7 @@ PlatformMultiThreader::SpawnThread(ThreadFunctionType f, void * UserData) if (id >= ITK_MAX_THREADS) { - itkExceptionMacro(<< "You have too many active threads!"); + itkExceptionMacro("You have too many active threads!"); } m_SpawnedThreadInfoArray[id].UserData = UserData; @@ -149,7 +149,7 @@ PlatformMultiThreader::SpawnThread(ThreadFunctionType f, void * UserData) ((void *)(&m_SpawnedThreadInfoArray[id]))); if (threadError != 0) { - itkExceptionMacro(<< "Unable to create a thread. pthread_create() returned " << threadError); + itkExceptionMacro("Unable to create a thread. pthread_create() returned " << threadError); } return id; @@ -180,7 +180,7 @@ PlatformMultiThreader::SpawnWaitForSingleMethodThread(ThreadProcessIdType thread // Using POSIX threads if (pthread_join(threadHandle, nullptr)) { - itkExceptionMacro(<< "Unable to join thread."); + itkExceptionMacro("Unable to join thread."); } } @@ -201,7 +201,7 @@ PlatformMultiThreader::SpawnDispatchSingleMethodThread(PlatformMultiThreader::Wo &threadHandle, &attr, reinterpret_cast(this->SingleMethodProxy), reinterpret_cast(threadInfo)); if (threadError != 0) { - itkExceptionMacro(<< "Unable to create a thread. pthread_create() returned " << threadError); + itkExceptionMacro("Unable to create a thread. pthread_create() returned " << threadError); } return threadHandle; } diff --git a/Modules/Core/Common/src/itkPlatformMultiThreaderSingle.cxx b/Modules/Core/Common/src/itkPlatformMultiThreaderSingle.cxx index 1ff097e964e..ea8bb0400a0 100644 --- a/Modules/Core/Common/src/itkPlatformMultiThreaderSingle.cxx +++ b/Modules/Core/Common/src/itkPlatformMultiThreaderSingle.cxx @@ -48,7 +48,7 @@ PlatformMultiThreader::MultipleMethodExecute() { if (m_MultipleMethod[thread_loop] == (ThreadFunctionType)0) { - itkExceptionMacro(<< "No multiple method set for: " << thread_loop); + itkExceptionMacro("No multiple method set for: " << thread_loop); } } @@ -63,7 +63,7 @@ PlatformMultiThreader::SpawnThread(ThreadFunctionType itkNotUsed(f), void * User { // There is no multi threading, so there is only one thread. // This won't work - so give an error message. - itkExceptionMacro(<< "Cannot spawn thread in a single threaded environment!"); + itkExceptionMacro("Cannot spawn thread in a single threaded environment!"); return -1; } @@ -72,7 +72,7 @@ PlatformMultiThreader::TerminateThread(ThreadIdType WorkUnitID) { // There is no multi threading, so there is only one thread. // This won't work - so give an error message. - itkExceptionMacro(<< "Cannot terminate thread in single threaded environment!"); + itkExceptionMacro("Cannot terminate thread in single threaded environment!"); } #endif diff --git a/Modules/Core/Common/src/itkPlatformMultiThreaderWindows.cxx b/Modules/Core/Common/src/itkPlatformMultiThreaderWindows.cxx index 47496a30bed..66c03c64606 100644 --- a/Modules/Core/Common/src/itkPlatformMultiThreaderWindows.cxx +++ b/Modules/Core/Common/src/itkPlatformMultiThreaderWindows.cxx @@ -53,7 +53,7 @@ PlatformMultiThreader::MultipleMethodExecute() { if (m_MultipleMethod[threadCount] == nullptr) { - itkExceptionMacro(<< "No multiple method set for: " << threadCount); + itkExceptionMacro("No multiple method set for: " << threadCount); } } // Using _beginthreadex on a PC @@ -126,7 +126,7 @@ PlatformMultiThreader::SpawnThread(ThreadFunctionType f, void * UserData) if (id >= ITK_MAX_THREADS) { - itkExceptionMacro(<< "You have too many active threads!"); + itkExceptionMacro("You have too many active threads!"); } m_SpawnedThreadInfoArray[id].UserData = UserData; diff --git a/Modules/Core/Common/src/itkPoolMultiThreader.cxx b/Modules/Core/Common/src/itkPoolMultiThreader.cxx index 7b7aa360549..516ebf0bb8c 100644 --- a/Modules/Core/Common/src/itkPoolMultiThreader.cxx +++ b/Modules/Core/Common/src/itkPoolMultiThreader.cxx @@ -124,7 +124,7 @@ PoolMultiThreader::SingleMethodExecute() if (!m_SingleMethod) { - itkExceptionMacro(<< "No single method set!"); + itkExceptionMacro("No single method set!"); } // obey the global maximum number of threads limit diff --git a/Modules/Core/Common/src/itkProcessObject.cxx b/Modules/Core/Common/src/itkProcessObject.cxx index b64dc0f9d90..3753456e615 100644 --- a/Modules/Core/Common/src/itkProcessObject.cxx +++ b/Modules/Core/Common/src/itkProcessObject.cxx @@ -1091,14 +1091,14 @@ ProcessObject::MakeIndexFromName(const DataObjectIdentifierType & name) const if (name.size() <= baseSize || name.substr(0, baseSize) != baseName) { itkDebugMacro("MakeIndexFromName(" << name << ") -> exception bad base name"); - itkExceptionMacro(<< "Not an indexed data object: " << name); + itkExceptionMacro("Not an indexed data object: " << name); } DataObjectIdentifierType idxStr = name.substr(baseSize); DataObjectPointerArraySizeType idx; if (!(std::istringstream(idxStr) >> idx)) { itkDebugMacro("MakeIndexFromName(" << name << ") -> exception not an index"); - itkExceptionMacro(<< "Not an indexed data object: " << name); + itkExceptionMacro("Not an indexed data object: " << name); } itkDebugMacro("MakeIndexFromName(" << name << ") -> " << idx); return idx; @@ -1336,7 +1336,7 @@ ProcessObject::VerifyPreconditions() ITKv5_CONST { if (this->GetInput(requiredInputName) == nullptr) { - itkExceptionMacro(<< "Input " << requiredInputName << " is required but not set."); + itkExceptionMacro("Input " << requiredInputName << " is required but not set."); } } @@ -1348,8 +1348,8 @@ ProcessObject::VerifyPreconditions() ITKv5_CONST { if (this->GetInput(*i) == nullptr) { - itkExceptionMacro(<< "Required Input " << *i << "is not specified!" - << " The required inputs are expected to be the first inputs."); + itkExceptionMacro("Required Input " << *i << "is not specified!" + << " The required inputs are expected to be the first inputs."); } ++i; } @@ -1361,10 +1361,10 @@ ProcessObject::VerifyPreconditions() ITKv5_CONST if (validIndexedInputs < this->m_NumberOfRequiredInputs) { - itkExceptionMacro(<< "At least " << this->m_NumberOfRequiredInputs << " of the first " - << this->m_NumberOfRequiredInputs << " indexed inputs are required but only " - << validIndexedInputs << " are specified." - << " The required inputs are expected to be the first inputs."); + itkExceptionMacro("At least " << this->m_NumberOfRequiredInputs << " of the first " + << this->m_NumberOfRequiredInputs << " indexed inputs are required but only " + << validIndexedInputs << " are specified." + << " The required inputs are expected to be the first inputs."); } } diff --git a/Modules/Core/Common/src/itkStreamingProcessObject.cxx b/Modules/Core/Common/src/itkStreamingProcessObject.cxx index 32a02b0057f..c70ab967ae8 100644 --- a/Modules/Core/Common/src/itkStreamingProcessObject.cxx +++ b/Modules/Core/Common/src/itkStreamingProcessObject.cxx @@ -139,8 +139,8 @@ StreamingProcessObject::UpdateOutputData(DataObject * itkNotUsed(output)) const DataObjectPointerArraySizeType ninputs = this->GetNumberOfValidRequiredInputs(); if (ninputs < this->GetNumberOfRequiredInputs()) { - itkExceptionMacro(<< "At least " << this->GetNumberOfRequiredInputs() << " inputs are required but only " << ninputs - << " are specified."); + itkExceptionMacro("At least " << this->GetNumberOfRequiredInputs() << " inputs are required but only " << ninputs + << " are specified."); } this->SetAbortGenerateData(false); diff --git a/Modules/Core/Common/src/itkTBBMultiThreader.cxx b/Modules/Core/Common/src/itkTBBMultiThreader.cxx index 3304975610a..07c1d4c4750 100644 --- a/Modules/Core/Common/src/itkTBBMultiThreader.cxx +++ b/Modules/Core/Common/src/itkTBBMultiThreader.cxx @@ -71,7 +71,7 @@ TBBMultiThreader::SingleMethodExecute() { if (!m_SingleMethod) { - itkExceptionMacro(<< "No single method set!"); + itkExceptionMacro("No single method set!"); } // Construct TBB static context with only m_MaximumNumberOfThreads threads diff --git a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx index a8b2c0fe850..be376f64439 100644 --- a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx @@ -36,7 +36,7 @@ DenseFiniteDifferenceImageFilter::CopyInputToOutput() if (!input || !output) { - itkExceptionMacro(<< "Either input and/or output is nullptr."); + itkExceptionMacro("Either input and/or output is nullptr."); } // Check if we are doing in-place filtering diff --git a/Modules/Core/GPUCommon/include/itkGPUImage.hxx b/Modules/Core/GPUCommon/include/itkGPUImage.hxx index eacc9e44c1c..a77719489a6 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImage.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUImage.hxx @@ -205,8 +205,8 @@ GPUImage::Graft(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::GPUImage::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(const Self *).name()); + itkExceptionMacro("itk::GPUImage::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(const Self *).name()); } } diff --git a/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx b/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx index a0f88c84c59..df57643c801 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx @@ -79,8 +79,8 @@ GPUImageToImageFilter::GraftOutpu } else { - itkExceptionMacro(<< "itk::GPUImageToImageFilter::GraftOutput() cannot cast " << typeid(output).name() << " to " - << typeid(GPUOutputImage *).name()); + itkExceptionMacro("itk::GPUImageToImageFilter::GraftOutput() cannot cast " << typeid(output).name() << " to " + << typeid(GPUOutputImage *).name()); } } @@ -109,8 +109,8 @@ GPUImageToImageFilter::GraftOutpu } else { - itkExceptionMacro(<< "itk::GPUImageToImageFilter::GraftOutput() cannot cast " << typeid(output).name() << " to " - << typeid(GPUOutputImage *).name()); + itkExceptionMacro("itk::GPUImageToImageFilter::GraftOutput() cannot cast " << typeid(output).name() << " to " + << typeid(GPUOutputImage *).name()); } } diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.hxx b/Modules/Core/GPUCommon/include/itkGPUReduction.hxx index b314a471dc3..9a4600d4994 100644 --- a/Modules/Core/GPUCommon/include/itkGPUReduction.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUReduction.hxx @@ -119,7 +119,7 @@ GPUReduction::GetReductionKernel(int whichKernel, int blockSize, int i { if (whichKernel != 5 && whichKernel != 6) { - itkExceptionMacro(<< "Reduction kernel undefined!"); + itkExceptionMacro("Reduction kernel undefined!"); } std::ostringstream defines; diff --git a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx index 1bb9d88441a..78f930c792b 100644 --- a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx +++ b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx @@ -101,8 +101,8 @@ ImageAdaptor::Graft(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::ImageAdaptor::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(const Self *).name()); + itkExceptionMacro("itk::ImageAdaptor::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(const Self *).name()); } } } diff --git a/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx b/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx index 5f5eda9c51b..041531ac564 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx +++ b/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx @@ -168,7 +168,7 @@ BSplineDecompositionImageFilter::SetPoles() break; default: // SplineOrder not implemented yet. - itkExceptionMacro(<< "SplineOrder must be between 0 and 5. Requested spline order has not been implemented yet."); + itkExceptionMacro("SplineOrder must be between 0 and 5. Requested spline order has not been implemented yet."); break; } } diff --git a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx index b34f127aca2..57013c2c517 100644 --- a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx @@ -41,7 +41,7 @@ CovarianceImageFunction::EvaluateAtIndex(const IndexType if (!this->GetInputImage()) { - itkExceptionMacro(<< "No image connected to CovarianceImageFunction"); + itkExceptionMacro("No image connected to CovarianceImageFunction"); } const unsigned int VectorDimension = this->GetInputImage()->GetNumberOfComponentsPerPixel(); diff --git a/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx b/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx index 58307a9db45..57421c519dc 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx @@ -191,7 +191,7 @@ GaussianBlurImageFunction::RecomputeGaussianKernel() { if (this->GetInputImage()->GetSpacing()[direction] == 0.0) { - itkExceptionMacro(<< "Pixel spacing cannot be zero"); + itkExceptionMacro("Pixel spacing cannot be zero"); } else { @@ -375,7 +375,7 @@ GaussianBlurImageFunction::RecomputeContinuousGaussianKern { if (this->GetInputImage()->GetSpacing()[direction] == 0.0) { - itkExceptionMacro(<< "Pixel spacing cannot be zero"); + itkExceptionMacro("Pixel spacing cannot be zero"); } else { diff --git a/Modules/Core/Mesh/include/itkMesh.hxx b/Modules/Core/Mesh/include/itkMesh.hxx index 3b0cda639e0..4a32f6b6828 100644 --- a/Modules/Core/Mesh/include/itkMesh.hxx +++ b/Modules/Core/Mesh/include/itkMesh.hxx @@ -171,7 +171,7 @@ Mesh::CreateCell(int cellType, CellAutoPoin cellPointer.TakeOwnership(new OutputQuadraticTriangleCellType); break; default: - itkExceptionMacro(<< "Unknown mesh cell"); + itkExceptionMacro("Unknown mesh cell"); } return; @@ -1073,8 +1073,8 @@ Mesh::CopyInformation(const DataObject * da if (!mesh) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::Mesh::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::Mesh::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } // Copy here specific elements of the Mesh @@ -1091,8 +1091,8 @@ Mesh::Graft(const DataObject * data) if (!mesh) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::Mesh::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::Mesh::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->ReleaseCellsMemory(); diff --git a/Modules/Core/Mesh/include/itkMeshSource.hxx b/Modules/Core/Mesh/include/itkMeshSource.hxx index 4399e2cd52d..049af514e9f 100644 --- a/Modules/Core/Mesh/include/itkMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkMeshSource.hxx @@ -85,7 +85,7 @@ MeshSource::GraftOutput(const DataObjectIdentifierType & key, DataO { if (!graft) { - itkExceptionMacro(<< "Requested to graft output that is a nullptr pointer"); + itkExceptionMacro("Requested to graft output that is a nullptr pointer"); } // we use the process object method since all out output may not be @@ -102,8 +102,8 @@ MeshSource::GraftNthOutput(unsigned int idx, DataObject * graft) { if (idx >= this->GetNumberOfIndexedOutputs()) { - itkExceptionMacro(<< "Requested to graft output " << idx << " but this filter only has " - << this->GetNumberOfIndexedOutputs() << " indexed Outputs."); + itkExceptionMacro("Requested to graft output " << idx << " but this filter only has " + << this->GetNumberOfIndexedOutputs() << " indexed Outputs."); } this->GraftOutput(this->MakeNameFromOutputIndex(idx), graft); } diff --git a/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx b/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx index fdba7cb1e91..eb3d735befd 100644 --- a/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx @@ -56,12 +56,12 @@ ParametricSpaceToImageSpaceMeshFilter::GenerateData() if (!inputMesh) { - itkExceptionMacro(<< "Missing Input Mesh"); + itkExceptionMacro("Missing Input Mesh"); } if (!outputMesh) { - itkExceptionMacro(<< "Missing Output Mesh"); + itkExceptionMacro("Missing Output Mesh"); } outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); diff --git a/Modules/Core/Mesh/include/itkSimplexMesh.hxx b/Modules/Core/Mesh/include/itkSimplexMesh.hxx index 33ab7514c93..0fe9221c08b 100644 --- a/Modules/Core/Mesh/include/itkSimplexMesh.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMesh.hxx @@ -66,8 +66,8 @@ SimplexMesh::CopyInformation(const DataObje if (mesh == nullptr) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::Mesh::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Superclass *).name()); + itkExceptionMacro("itk::Mesh::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Superclass *).name()); } this->m_MaximumNumberOfRegions = mesh->GetMaximumNumberOfRegions(); diff --git a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx index df5f26119b3..9ec5615b73a 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx @@ -73,7 +73,7 @@ SimplexMeshToTriangleMeshFilter::CreateTriangles() if (!(b1 && b2 && b3)) { - itkExceptionMacro(<< "Assertion failed for test of GetElementIfIndexExists()"); + itkExceptionMacro("Assertion failed for test of GetElementIfIndexExists()"); } ++pointsIt; @@ -107,7 +107,7 @@ SimplexMeshToTriangleMeshFilter::FindCellId(CellIdentif if (cellIt == cells1.end()) { - itkExceptionMacro(<< "Cell was not found, although it should be there"); + itkExceptionMacro("Cell was not found, although it should be there"); } return *cellIt; diff --git a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx index 645519d7509..631dd70b17e 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx @@ -85,7 +85,7 @@ SimplexMeshVolumeCalculator::FindCellId(IdentifierType id1, Identifi if (cellIt == cells1.end()) { - itkExceptionMacro(<< "Cell was not found, although it should be there"); + itkExceptionMacro("Cell was not found, although it should be there"); } return *cellIt; @@ -239,7 +239,7 @@ SimplexMeshVolumeCalculator::Compute() if (!(b1 && b2 && b3)) { - itkExceptionMacro(<< "Assertion failed for test of GetElementIfIndexExists()"); + itkExceptionMacro("Assertion failed for test of GetElementIfIndexExists()"); } else { diff --git a/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx b/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx index 0a828f7b7ae..becb3a15894 100644 --- a/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx @@ -63,17 +63,17 @@ TransformMeshFilter::GenerateData() if (!inputMesh) { - itkExceptionMacro(<< "Missing Input Mesh"); + itkExceptionMacro("Missing Input Mesh"); } if (!outputMesh) { - itkExceptionMacro(<< "Missing Output Mesh"); + itkExceptionMacro("Missing Output Mesh"); } if (!m_Transform) { - itkExceptionMacro(<< "Missing Input Transform"); + itkExceptionMacro("Missing Input Transform"); } outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx index 1a997bec26c..776de90443f 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx @@ -143,7 +143,7 @@ TriangleMeshToBinaryImageFilter::GenerateData() { if (m_Size[0] == 0 || m_Size[1] == 0 || m_Size[2] == 0) { - itkExceptionMacro(<< "Must Set Image Size"); + itkExceptionMacro("Must Set Image Size"); } const typename OutputImageType::RegionType region(m_Index, m_Size); @@ -396,7 +396,7 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() } break; default: - itkExceptionMacro(<< "Need Triangle or Polygon cells ONLY"); + itkExceptionMacro("Need Triangle or Polygon cells ONLY"); } ++cellIt; } diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx b/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx index 551198832bd..99880a827df 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx +++ b/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx @@ -49,7 +49,7 @@ VTKPolyDataReader::GenerateData() if (m_FileName.empty()) { - itkExceptionMacro(<< "No input FileName"); + itkExceptionMacro("No input FileName"); } // @@ -59,7 +59,7 @@ VTKPolyDataReader::GenerateData() if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open file\n" + itkExceptionMacro("Unable to open file\n" << "inputFilename= " << m_FileName); } @@ -71,7 +71,7 @@ VTKPolyDataReader::GenerateData() std::getline(inputFile, m_Version, '\n'); if (inputFile.fail()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read first line."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read first line."); } if (m_Version.find("# vtk DataFile Version ") == std::string::npos) { @@ -84,19 +84,19 @@ VTKPolyDataReader::GenerateData() std::getline(inputFile, m_Header, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read header."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read header."); } // Next is the file format std::getline(inputFile, line, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to file format."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to file format."); } if (line.find("ASCII") == std::string::npos) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFile format is " << line - << " but only ASCII files can be read."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFile format is " << line + << " but only ASCII files can be read."); } bool foundPoints = false; @@ -113,7 +113,7 @@ VTKPolyDataReader::GenerateData() if (!foundPoints) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding POINTS."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding POINTS."); } itkDebugMacro("POINTS line" << line); @@ -125,16 +125,16 @@ VTKPolyDataReader::GenerateData() if (sscanf(pointLine.c_str(), "%ld", &numberOfPoints) != 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read numberOfPoints.\n" - << " pointLine= " << pointLine); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read numberOfPoints.\n" + << " pointLine= " << pointLine); } itkDebugMacro("numberOfPoints= " << numberOfPoints); if (numberOfPoints < 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "numberOfPoints < 1" - << " numberOfPoints line= " << numberOfPoints); + itkExceptionMacro("Error reading file: " << m_FileName << "numberOfPoints < 1" + << " numberOfPoints line= " << numberOfPoints); } outputMesh->GetPoints()->Reserve(itk::Math::CastWithRangeCheck(numberOfPoints)); @@ -150,12 +150,12 @@ VTKPolyDataReader::GenerateData() inputFile >> point; if (inputFile.eof()) { - itkExceptionMacro(<< "Error while reading file: " << m_FileName - << "\nUnexpected end-of-file trying to read points."); + itkExceptionMacro("Error while reading file: " << m_FileName + << "\nUnexpected end-of-file trying to read points."); } if (inputFile.fail()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nInput could not be interpreted as a point."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nInput could not be interpreted as a point."); } outputMesh->SetPoint(i, point); } @@ -174,7 +174,7 @@ VTKPolyDataReader::GenerateData() if (!foundPolygons) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding POLYGONS."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding POLYGONS."); } itkDebugMacro("POLYGONS line" << line); @@ -192,8 +192,8 @@ VTKPolyDataReader::GenerateData() if (sscanf(polygonLine.c_str(), "%ld %ld", &numberOfPolygons, &numberOfIndices) != 2) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read numberOfPolygons from subline2" - << "\npolygonLine = " << polygonLine); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read numberOfPolygons from subline2" + << "\npolygonLine = " << polygonLine); } itkDebugMacro("numberOfPolygons " << numberOfPolygons); @@ -201,15 +201,15 @@ VTKPolyDataReader::GenerateData() if (numberOfPolygons < 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nnumberOfPolygons < 1\nnumberOfPolygons= " << numberOfPolygons); + itkExceptionMacro("Error reading file: " << m_FileName + << "\nnumberOfPolygons < 1\nnumberOfPolygons= " << numberOfPolygons); } if (numberOfIndices < numberOfPolygons) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nnumberOfIndices < numberOfPolygons\n" - << "numberOfIndices= " << numberOfIndices << '\n' - << "numberOfPolygons= " << numberOfPolygons); + itkExceptionMacro("Error reading file: " << m_FileName << "\nnumberOfIndices < numberOfPolygons\n" + << "numberOfIndices= " << numberOfIndices << '\n' + << "numberOfPolygons= " << numberOfPolygons); } // @@ -224,44 +224,45 @@ VTKPolyDataReader::GenerateData() std::getline(inputFile, line, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read " << numberOfPolygons - << " polygons before the end of file." - << " Only read " << i + 1); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read " << numberOfPolygons + << " polygons before the end of file." + << " Only read " << i + 1); } if (line.find("DATA") != std::string::npos) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nRead keyword DATA"); + itkExceptionMacro("Error reading file: " << m_FileName << "\nRead keyword DATA"); } int got; if ((got = sscanf(line.c_str(), "%ld %ld %ld %ld", &numberOfCellPoints, &ids[0], &ids[1], &ids[2])) != 4) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nError parsing POLYGON cell. Expected 4 items but got " << got << std::endl + itkExceptionMacro("Error reading file: " + << m_FileName << "\nError parsing POLYGON cell. Expected 4 items but got " << got << std::endl << "Line is: " << line); } if (numberOfCellPoints != 3) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nnumberOfCellPoints != 3\n" - << "numberOfCellPoints= " << numberOfCellPoints - << ". VTKPolyDataReader can only read triangles"); + itkExceptionMacro("Error reading file: " << m_FileName << "\nnumberOfCellPoints != 3\n" + << "numberOfCellPoints= " << numberOfCellPoints + << ". VTKPolyDataReader can only read triangles"); } if ((ids[0] < 0) || (ids[1] < 0) || (ids[2] < 0)) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "point ids must be >= 0.\n" - "ids=" - << ids[0] << ' ' << ids[1] << ' ' << ids[2]); + itkExceptionMacro("Error reading file: " << m_FileName + << "point ids must be >= 0.\n" + "ids=" + << ids[0] << ' ' << ids[1] << ' ' << ids[2]); } const auto signedNumberOfPoints = itk::Math::CastWithRangeCheck(numberOfPoints); if (ids[0] >= signedNumberOfPoints || ids[1] >= signedNumberOfPoints || ids[2] >= signedNumberOfPoints) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "Point ids must be < number of points: " - << numberOfPoints << "\nids= " << ids[0] << ' ' << ids[1] << ' ' << ids[2]); + itkExceptionMacro("Error reading file: " << m_FileName + << "Point ids must be < number of points: " << numberOfPoints + << "\nids= " << ids[0] << ' ' << ids[1] << ' ' << ids[2]); } CellAutoPointer cell; @@ -304,8 +305,8 @@ VTKPolyDataReader::GenerateData() } else { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nUnexpected end-of-file while trying to read POINT_DATA."); + itkExceptionMacro("Error reading file: " << m_FileName + << "\nUnexpected end-of-file while trying to read POINT_DATA."); } if (!inputFile.eof()) { @@ -313,8 +314,8 @@ VTKPolyDataReader::GenerateData() } else { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nUnexpected end-of-file while trying to read POINT_DATA."); + itkExceptionMacro("Error reading file: " << m_FileName + << "\nUnexpected end-of-file while trying to read POINT_DATA."); } double pointData; @@ -323,9 +324,9 @@ VTKPolyDataReader::GenerateData() { if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nUnexpected end-of-file while trying to read POINT_DATA." - << "Failed while trying to reading point data for id: " << pid); + itkExceptionMacro("Error reading file: " << m_FileName + << "\nUnexpected end-of-file while trying to read POINT_DATA." + << "Failed while trying to reading point data for id: " << pid); } inputFile >> pointData; outputMesh->SetPointData(pid, pointData); diff --git a/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx b/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx index bd70291065e..750c2e5c6e2 100644 --- a/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx @@ -79,12 +79,12 @@ WarpMeshFilter::GenerateData() if (!inputMesh) { - itkExceptionMacro(<< "Missing Input Mesh"); + itkExceptionMacro("Missing Input Mesh"); } if (!outputMesh) { - itkExceptionMacro(<< "Missing Output Mesh"); + itkExceptionMacro("Missing Output Mesh"); } outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); diff --git a/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx b/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx index dca8ad21423..c39f08b4bec 100644 --- a/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx +++ b/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx @@ -106,12 +106,12 @@ MeshSourceGraftOutputFilter::GenerateData() if (!inputMesh) { - itkExceptionMacro(<< "Missing Input Mesh"); + itkExceptionMacro("Missing Input Mesh"); } if (!outputMesh) { - itkExceptionMacro(<< "Missing Output Mesh"); + itkExceptionMacro("Missing Output Mesh"); } // Declare the type for the filter diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx index 46d27930d74..6a5e5ece172 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx @@ -80,8 +80,8 @@ QuadEdgeMesh::Graft(const DataObject * data) if (!mesh) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::QuadEdgeMesh::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::QuadEdgeMesh::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->m_FreePointIndexes = mesh->m_FreePointIndexes; diff --git a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx index ad5fcc52f59..774924be6b9 100644 --- a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx @@ -149,7 +149,7 @@ ArrowSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetDirectionInObjectSpace(this->GetDirectionInObjectSpace()); rval->SetPositionInObjectSpace(this->GetPositionInObjectSpace()); diff --git a/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx index fa2c3ec50e0..a2a4865f415 100644 --- a/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx @@ -46,7 +46,7 @@ BlobSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; } diff --git a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx index 8704b3f1531..36b91a34984 100644 --- a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx @@ -85,7 +85,7 @@ BoxSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetSizeInObjectSpace(this->GetSizeInObjectSpace()); rval->SetPositionInObjectSpace(this->GetPositionInObjectSpace()); diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx index 4fb8489e6ab..14fce8125bb 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx @@ -141,7 +141,7 @@ ContourSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetInterpolationMethod(this->GetInterpolationMethod()); rval->SetInterpolationFactor(this->GetInterpolationFactor()); @@ -184,7 +184,7 @@ ContourSpatialObject::Update() case InterpolationMethodEnum::BEZIER_INTERPOLATION: // TODO: Implement bezier interpolation { - itkExceptionMacro(<< "Bezier interpolation type not yet defined."); + itkExceptionMacro("Bezier interpolation type not yet defined."); } break; case InterpolationMethodEnum::LINEAR_INTERPOLATION: diff --git a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.hxx index 26b26c5f77e..69276c1c714 100644 --- a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.hxx @@ -39,7 +39,7 @@ DTITubeSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; diff --git a/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx index 8fd31bcfb33..3c39f906e96 100644 --- a/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx @@ -121,7 +121,7 @@ EllipseSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "Downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("Downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetRadiusInObjectSpace(this->GetRadiusInObjectSpace()); rval->SetCenterInObjectSpace(this->GetCenterInObjectSpace()); diff --git a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx index 5f807fd2f7e..9d762266ada 100644 --- a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx @@ -174,7 +174,7 @@ GaussianSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetMaximum(this->GetMaximum()); rval->SetRadiusInObjectSpace(this->GetRadiusInObjectSpace()); diff --git a/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.hxx index b7e739badcf..ec3d9e12c59 100644 --- a/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.hxx @@ -39,7 +39,7 @@ GroupSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx index 240fac42e5c..a2229d18b77 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx @@ -122,7 +122,7 @@ ImageMaskSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx index 8a259218c84..424a19c731f 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx @@ -176,7 +176,7 @@ ImageSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetImage(this->GetImage()->Clone()); rval->SetSliceNumber(this->GetSliceNumber()); diff --git a/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx index 2cb3b6ccf26..d5403a3dece 100644 --- a/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx @@ -46,7 +46,7 @@ LandmarkSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; diff --git a/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx index 514756324ee..22a0d6922ca 100644 --- a/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx @@ -43,7 +43,7 @@ LineSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; diff --git a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx index 8cab9f0345b..79ce7f153f0 100644 --- a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx @@ -144,7 +144,7 @@ MeshSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetMesh(this->GetMesh()->Clone()); rval->SetIsInsidePrecisionInObjectSpace(this->GetIsInsidePrecisionInObjectSpace()); diff --git a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx index c8afc9172ea..6816b79ce2f 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx @@ -37,7 +37,7 @@ MetaArrowConverter::MetaObjectToSpatialObject(const MetaObjectType * const auto * metaArrow = dynamic_cast(mo); if (metaArrow == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaArrow"); + itkExceptionMacro("Can't convert MetaObject to MetaArrow"); } ArrowSpatialObjectPointer arrowSO = ArrowSpatialObjectType::New(); @@ -77,7 +77,7 @@ MetaArrowConverter::SpatialObjectToMetaObject(const SpatialObjectTyp ArrowSpatialObjectConstPointer arrowSO = dynamic_cast(spatialObject); if (arrowSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to ArrowSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to ArrowSpatialObject"); } auto * mo = new MetaArrow(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx index a93f79014ac..d974c0f16b0 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx @@ -37,7 +37,7 @@ MetaBlobConverter::MetaObjectToSpatialObject(const MetaObjectType * const auto * Blob = dynamic_cast(mo); if (Blob == nullptr) { - itkExceptionMacro(<< "Can't downcast MetaObject to BlobMetaObject"); + itkExceptionMacro("Can't downcast MetaObject to BlobMetaObject"); } auto blob = BlobSpatialObjectType::New(); @@ -90,7 +90,7 @@ MetaBlobConverter::SpatialObjectToMetaObject(const SpatialObjectType BlobSpatialObjectConstPointer blobSO = dynamic_cast(spatialObject); if (blobSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to BlobSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to BlobSpatialObject"); } auto * Blob = new MetaBlob(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx index c6128d774d0..60600f6cea3 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx @@ -37,7 +37,7 @@ MetaContourConverter::MetaObjectToSpatialObject(const MetaObjectType const auto * contourMO = dynamic_cast(mo); if (contourMO == nullptr) { - itkExceptionMacro(<< "Can't downcast MetaObject to MetaContour"); + itkExceptionMacro("Can't downcast MetaObject to MetaContour"); } ContourSpatialObjectPointer contourSO = ContourSpatialObjectType::New(); @@ -135,7 +135,7 @@ MetaContourConverter::SpatialObjectToMetaObject(const SpatialObjectT ContourSpatialObjectConstPointer contourSO = dynamic_cast(so); if (contourSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to ContourSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to ContourSpatialObject"); } auto * contourMO = new MetaContour(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx index a1b1778c0f0..34426001466 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx @@ -38,7 +38,7 @@ MetaDTITubeConverter::MetaObjectToSpatialObject(const MetaObjectType const auto * tube = dynamic_cast(mo); if (tube == nullptr) { - itkExceptionMacro(<< "Can't downcast MetaObject to MetaDTITube"); + itkExceptionMacro("Can't downcast MetaObject to MetaDTITube"); } DTITubeSpatialObjectPointer tubeSO = DTITubeSpatialObjectType::New(); @@ -183,7 +183,7 @@ MetaDTITubeConverter::SpatialObjectToMetaObject(const SpatialObjectT DTITubeSpatialObjectConstPointer DTITubeSO = dynamic_cast(spatialObject); if (DTITubeSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to DTITubeSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to DTITubeSpatialObject"); } auto * tube = new MetaDTITube(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx index fe5658249dd..2a353edb567 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx @@ -37,7 +37,7 @@ MetaEllipseConverter::MetaObjectToSpatialObject(const MetaObjectType const auto * ellipseMO = dynamic_cast(mo); if (ellipseMO == nullptr) { - itkExceptionMacro(<< "Can't downcast MetaObject to EllipseMetaObject"); + itkExceptionMacro("Can't downcast MetaObject to EllipseMetaObject"); } EllipseSpatialObjectPointer ellipseSO = EllipseSpatialObjectType::New(); @@ -68,7 +68,7 @@ MetaEllipseConverter::SpatialObjectToMetaObject(const SpatialObjectT EllipseSpatialObjectConstPointer ellipseSO = dynamic_cast(so); if (ellipseSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to EllipseSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to EllipseSpatialObject"); } auto * ellipseMO = new EllipseMetaObjectType(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx index e8ce1a83357..43fdb33b897 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx @@ -37,7 +37,7 @@ MetaGaussianConverter::MetaObjectToSpatialObject(const MetaObjectTyp const auto * metaGaussian = dynamic_cast(mo); if (metaGaussian == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaGaussian"); + itkExceptionMacro("Can't convert MetaObject to MetaGaussian"); } GaussianSpatialObjectPointer gaussianSO = GaussianSpatialObjectType::New(); @@ -65,7 +65,7 @@ MetaGaussianConverter::SpatialObjectToMetaObject(const SpatialObject auto * metaGaussian = new GaussianMetaObjectType; if (gaussianSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to GaussianSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to GaussianSpatialObject"); } if (gaussianSO->GetParent()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx index 8e41f387587..9c129f2df63 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx @@ -36,7 +36,7 @@ MetaGroupConverter::MetaObjectToSpatialObject(const MetaObjectType * const auto * group = dynamic_cast(mo); if (group == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaGroup"); + itkExceptionMacro("Can't convert MetaObject to MetaGroup"); } GroupSpatialObjectPointer groupSO = GroupSpatialObjectType::New(); @@ -59,7 +59,7 @@ MetaGroupConverter::SpatialObjectToMetaObject(const SpatialObjectTyp GroupSpatialObjectConstPointer groupSO = dynamic_cast(so); if (groupSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to GroupSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to GroupSpatialObject"); } auto * group = new GroupMetaObjectType(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx index f5e75cc331d..6545e047d44 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx @@ -82,7 +82,7 @@ MetaImageConverter::MetaObjectToSpati if (imageMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaImage"); + itkExceptionMacro("Can't convert MetaObject to MetaImage"); } ImageSpatialObjectPointer imageSO = ImageSpatialObjectType::New(); @@ -115,7 +115,7 @@ MetaImageConverter::SpatialObjectToMe if (imageSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to ImageSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to ImageSpatialObject"); } using ImageConstPointer = typename ImageType::ConstPointer; diff --git a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx index 6de122a7985..f86166fa4f2 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx @@ -37,7 +37,7 @@ MetaLandmarkConverter::MetaObjectToSpatialObject(const MetaObjectTyp const auto * landmarkMO = dynamic_cast(mo); if (landmarkMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaLandmark"); + itkExceptionMacro("Can't convert MetaObject to MetaLandmark"); } LandmarkSpatialObjectPointer landmarkSO = LandmarkSpatialObjectType::New(); @@ -89,7 +89,7 @@ MetaLandmarkConverter::SpatialObjectToMetaObject(const SpatialObject if (landmarkSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to LandmarkSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to LandmarkSpatialObject"); } auto * landmarkMO = new MetaLandmark(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx index c3571c1e315..10c19da82cb 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx @@ -37,7 +37,7 @@ MetaLineConverter::MetaObjectToSpatialObject(const MetaObjectType * const auto * lineMO = dynamic_cast(mo); if (lineMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaLine"); + itkExceptionMacro("Can't convert MetaObject to MetaLine"); } LineSpatialObjectPointer lineSO = LineSpatialObjectType::New(); @@ -98,7 +98,7 @@ MetaLineConverter::SpatialObjectToMetaObject(const SpatialObjectType LineSpatialObjectConstPointer lineSO = dynamic_cast(spatialObject); if (lineSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to LineSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to LineSpatialObject"); } auto * lineMO = new MetaLine(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx index d50d6254f29..387eb6f1f7f 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx @@ -43,7 +43,7 @@ MetaMeshConverter::MetaObjectToSpatialObject const auto * _mesh = dynamic_cast(mo); if (_mesh == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaMesh"); + itkExceptionMacro("Can't convert MetaObject to MetaMesh"); } auto meshSO = MeshSpatialObjectType::New(); @@ -210,7 +210,7 @@ MetaMeshConverter::SpatialObjectToMetaObject if (meshSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to MeshSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to MeshSpatialObject"); } auto * metamesh = new MeshMetaObjectType(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx index 945e0b39a63..17892b4905f 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx @@ -36,7 +36,7 @@ MetaSurfaceConverter::MetaObjectToSpatialObject(const MetaObjectType const auto * surfaceMO = dynamic_cast(mo); if (surfaceMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaSurface"); + itkExceptionMacro("Can't convert MetaObject to MetaSurface"); } auto surfaceSO = SurfaceSpatialObjectType::New(); @@ -95,7 +95,7 @@ MetaSurfaceConverter::SpatialObjectToMetaObject(const SpatialObjectT if (surfaceSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to SurfaceSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to SurfaceSpatialObject"); } auto * surfaceMO = new MetaSurface(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx index 448b371b857..18d44ca2fd4 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx @@ -36,7 +36,7 @@ MetaTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * const auto * tubeMO = dynamic_cast(mo); if (tubeMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaTube"); + itkExceptionMacro("Can't convert MetaObject to MetaTube"); } auto tubeSO = TubeSpatialObjectType::New(); @@ -128,7 +128,7 @@ MetaTubeConverter::SpatialObjectToMetaObject(const SpatialObjectType TubeSpatialObjectConstPointer tubeSO = dynamic_cast(spatialObject); if (tubeSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to TubeSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to TubeSpatialObject"); } auto * tubeMO = new MetaTube(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx index 7e1ec7fc220..9a80ec6bb7b 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx @@ -37,7 +37,7 @@ MetaVesselTubeConverter::MetaObjectToSpatialObject(const MetaObjectT const auto * vesselTubeMO = dynamic_cast(mo); if (vesselTubeMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaVesselTube"); + itkExceptionMacro("Can't convert MetaObject to MetaVesselTube"); } auto vesselTubeSO = VesselTubeSpatialObjectType::New(); @@ -141,7 +141,7 @@ MetaVesselTubeConverter::SpatialObjectToMetaObject(const SpatialObje if (vesselTubeSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to VesselTubeSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to VesselTubeSpatialObject"); } auto * vesselTubeMO = new MetaVesselTube(VDimension); diff --git a/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx index af11091339c..5d245a05f58 100644 --- a/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx @@ -94,7 +94,7 @@ PointBasedSpatialObject::ClosestPointInObje if (it == itend) { - itkExceptionMacro(<< "SpatialObject: ClosestPoint called using an empty point list"); + itkExceptionMacro("SpatialObject: ClosestPoint called using an empty point list"); } SpatialObjectPointType closestPoint; @@ -123,7 +123,7 @@ PointBasedSpatialObject::ClosestPointInWorl if (it == itend) { - itkExceptionMacro(<< "SpatialObject: ClosestPoint called using an empty point list"); + itkExceptionMacro("SpatialObject: ClosestPoint called using an empty point list"); } SpatialObjectPointType closestPoint; @@ -216,7 +216,7 @@ PointBasedSpatialObject::InternalClone() co typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetPoints(this->GetPoints()); diff --git a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx index 8c897cba40e..58e37688495 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx @@ -298,7 +298,7 @@ PolygonSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetIsClosed(this->GetIsClosed()); rval->SetThicknessInObjectSpace(this->GetThicknessInObjectSpace()); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx index 890d1967273..3162b933926 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx @@ -91,7 +91,7 @@ SpatialObject::DerivativeAtInObjectSpace(const PointType & { if (!IsEvaluableAtInObjectSpace(point, depth, name)) { - itkExceptionMacro(<< "This spatial object is not evaluable at the point"); + itkExceptionMacro("This spatial object is not evaluable at the point"); } if (order == 0) @@ -347,7 +347,7 @@ SpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetTypeName(this->GetTypeName()); @@ -495,7 +495,7 @@ SpatialObject::SetObjectToParentTransform(const TransformType * tran { if (!transform->GetInverse(m_ObjectToParentTransformInverse)) { - itkExceptionMacro(<< "Transform must be invertible."); + itkExceptionMacro("Transform must be invertible."); } m_ObjectToParentTransform->SetFixedParameters(transform->GetFixedParameters()); @@ -528,7 +528,7 @@ SpatialObject::ProtectedComputeObjectToWorldTransform() if (!m_ObjectToWorldTransform->GetInverse(m_ObjectToWorldTransformInverse)) { - itkExceptionMacro(<< "Transform must be invertible."); + itkExceptionMacro("Transform must be invertible."); } // Propagate the changes to the children @@ -548,7 +548,7 @@ SpatialObject::SetObjectToWorldTransform(const TransformType * trans { if (!transform->GetInverse(m_ObjectToWorldTransformInverse)) { - itkExceptionMacro(<< "Transform must be invertible."); + itkExceptionMacro("Transform must be invertible."); } m_ObjectToWorldTransform->SetFixedParameters(transform->GetFixedParameters()); @@ -585,13 +585,13 @@ SpatialObject::ComputeObjectToParentTransform() } else { - itkExceptionMacro(<< "Parent's ObjectToWorldTransform not invertible."); + itkExceptionMacro("Parent's ObjectToWorldTransform not invertible."); } } if (!m_ObjectToParentTransform->GetInverse(m_ObjectToParentTransformInverse)) { - itkExceptionMacro(<< "ObjectToParentTransform not invertible."); + itkExceptionMacro("ObjectToParentTransform not invertible."); } ProtectedComputeObjectToWorldTransform(); } @@ -1233,8 +1233,8 @@ SpatialObject::SetRequestedRegion(const DataObject * data) } else { - itkExceptionMacro(<< "SpatialObject::SetRequestedRegion(const DataObject *) cannot cast " << typeid(data).name() - << " to " << typeid(SpatialObject *).name()); + itkExceptionMacro("SpatialObject::SetRequestedRegion(const DataObject *) cannot cast " + << typeid(data).name() << " to " << typeid(SpatialObject *).name()); } } @@ -1277,8 +1277,8 @@ SpatialObject::CopyInformation(const DataObject * data) if (soData == nullptr) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::SpatialObject::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(SpatialObject *).name()); + itkExceptionMacro("itk::SpatialObject::CopyInformation() cannot cast " + << typeid(data).name() << " to " << typeid(SpatialObject *).name()); } // Copy the meta data for this data type diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx index 7083b3d6c31..3863bb96989 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx @@ -57,7 +57,7 @@ SpatialObjectDuplicator::Update() { if (!m_Input) { - itkExceptionMacro(<< "Input SpatialObject has not been connected"); + itkExceptionMacro("Input SpatialObject has not been connected"); } // Update only if the input SpatialObject has been modified diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx index 123db6f0f36..7114539a14d 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx @@ -55,7 +55,7 @@ SpatialObjectPoint::SetPositionInWorldSpace(const PointType & p { if (m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } m_PositionInObjectSpace = m_SpatialObject->GetObjectToWorldTransform()->GetInverseTransform()->TransformPoint(point); @@ -67,7 +67,7 @@ SpatialObjectPoint::GetPositionInWorldSpace() const -> PointTyp { if (m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } return m_SpatialObject->GetObjectToWorldTransform()->TransformPoint(m_PositionInObjectSpace); diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx index bd33198e270..9e85aff4893 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx @@ -59,7 +59,7 @@ SurfaceSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } return loPtr; diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx index 2238341def0..222e0ca8f54 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx @@ -48,7 +48,7 @@ SurfaceSpatialObjectPoint::SetNormalInWorldSpace(const Covarian { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } m_NormalInObjectSpace = @@ -68,7 +68,7 @@ SurfaceSpatialObjectPoint::GetNormalInWorldSpace() const -> con { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } return Superclass::m_SpatialObject->GetObjectToWorldTransform()->TransformCovariantVector(m_NormalInObjectSpace); diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx index d7782e51176..030869d3b67 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx @@ -66,8 +66,8 @@ TubeSpatialObject::CopyInformation(const DataObject if (soData == nullptr) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::TubeSpatialObject::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(TubeSpatialObject *).name()); + itkExceptionMacro("itk::TubeSpatialObject::CopyInformation() cannot cast " + << typeid(data).name() << " to " << typeid(TubeSpatialObject *).name()); } // check if we are the same type @@ -95,7 +95,7 @@ TubeSpatialObject::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetEndRounded(this->GetEndRounded()); diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx index cf62fdbb532..cf75d3c34ee 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx @@ -69,7 +69,7 @@ TubeSpatialObjectPoint::GetRadiusInWorldSpace() const { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } CovariantVectorType cVect; @@ -90,7 +90,7 @@ TubeSpatialObjectPoint::SetRadiusInWorldSpace(double newR) { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } CovariantVectorType cVect; @@ -111,7 +111,7 @@ TubeSpatialObjectPoint::GetTangentInWorldSpace() const -> const { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } return Superclass::m_SpatialObject->GetObjectToWorldTransform()->TransformVector(m_TangentInObjectSpace); @@ -123,7 +123,7 @@ TubeSpatialObjectPoint::SetTangentInWorldSpace(const VectorType { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } m_TangentInObjectSpace = @@ -136,7 +136,7 @@ TubeSpatialObjectPoint::GetNormal1InWorldSpace() const -> const { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } return Superclass::m_SpatialObject->GetObjectToWorldTransform()->TransformCovariantVector(m_Normal1InObjectSpace); @@ -148,7 +148,7 @@ TubeSpatialObjectPoint::SetNormal1InWorldSpace(const CovariantV { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } m_Normal1InObjectSpace = @@ -161,7 +161,7 @@ TubeSpatialObjectPoint::GetNormal2InWorldSpace() const -> const { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } return Superclass::m_SpatialObject->GetObjectToWorldTransform()->TransformCovariantVector(m_Normal2InObjectSpace); @@ -173,7 +173,7 @@ TubeSpatialObjectPoint::SetNormal2InWorldSpace(const CovariantV { if (this->m_SpatialObject == nullptr) { - itkExceptionMacro(<< "The SpatialObject must be set prior to calling."); + itkExceptionMacro("The SpatialObject must be set prior to calling."); } m_Normal2InObjectSpace = diff --git a/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx b/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx index daa6a777369..372dcf6ddb1 100644 --- a/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx @@ -165,7 +165,7 @@ class MetaDummyConverter : public MetaConverterBase const auto * dummyMO = dynamic_cast(mo); if (dummyMO == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaDummy"); + itkExceptionMacro("Can't convert MetaObject to MetaDummy"); } DummySpatialObjectPointer dummySO = DummySpatialObjectType::New(); dummySO->SetValue(dummyMO->GetValue()); @@ -188,7 +188,7 @@ class MetaDummyConverter : public MetaConverterBase DummySpatialObjectConstPointer dummySO = dynamic_cast(spatialObject); if (dummySO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to DummySpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to DummySpatialObject"); } auto * dummyMO = new MetaDummy; dummyMO->SetValue(dummySO->GetValue()); diff --git a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx index 7263dace7bd..f58c27c910e 100644 --- a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx @@ -123,7 +123,7 @@ ComparisonImageFilter::ThreadedGenerateData(const Out if (validImage->GetBufferedRegion() != testImage->GetBufferedRegion()) { - itkExceptionMacro(<< "Input images have different Buffered Regions."); + itkExceptionMacro("Input images have different Buffered Regions."); } // Create a radius of pixels. diff --git a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h index 7e2d6d456cf..2e3c293156e 100644 --- a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h +++ b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h @@ -192,7 +192,7 @@ class ITK_TEMPLATE_EXPORT ExtractSliceImageFilter : public ImageSourcem_DirectionCollaspeStrategy = choosenStrategy; diff --git a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx index d1a9ac0cc9b..cc4db743c0b 100644 --- a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx @@ -131,7 +131,7 @@ ExtractSliceImageFilter::GenerateOutputInformation() if (phyData == nullptr) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::ExtractSliceImageFilter::GenerateOutputInformation " + itkExceptionMacro("itk::ExtractSliceImageFilter::GenerateOutputInformation " << "cannot cast input to " << typeid(ImageBase *).name()); } // Copy what we can from the image from spacing and origin of the input @@ -210,7 +210,7 @@ ExtractSliceImageFilter::GenerateOutputInformation() { if (vnl_determinant(outputDirection.GetVnlMatrix()) == 0.0) { - itkExceptionMacro(<< "Invalid submatrix extracted for collapsed direction."); + itkExceptionMacro("Invalid submatrix extracted for collapsed direction."); } } break; diff --git a/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx index 70178b0b8c3..614f43db434 100644 --- a/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx @@ -58,7 +58,7 @@ StretchIntensityImageFilter::BeforeThreadedGenerateDa { if (m_OutputMinimum > m_OutputMaximum) { - itkExceptionMacro(<< "Minimum output value cannot be greater than Maximum output value."); + itkExceptionMacro("Minimum output value cannot be greater than Maximum output value."); } const TInputImage * inputImage = this->GetInput(); diff --git a/Modules/Core/Transform/include/itkBSplineBaseTransform.h b/Modules/Core/Transform/include/itkBSplineBaseTransform.h index 751aa591e8b..471fe31e100 100644 --- a/Modules/Core/Transform/include/itkBSplineBaseTransform.h +++ b/Modules/Core/Transform/include/itkBSplineBaseTransform.h @@ -266,7 +266,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : public TransformGetNameOfClass()); } using Superclass::ComputeJacobianWithRespectToPosition; diff --git a/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx b/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx index 0fe4dca5263..5ddf3cf719e 100644 --- a/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx @@ -47,8 +47,8 @@ BSplineBaseTransform::SetParamet // expected number of parameters if (parameters.Size() != this->GetNumberOfParameters()) { - itkExceptionMacro(<< "Mismatch between parameters size " << parameters.Size() - << " and expected number of parameters " << this->GetNumberOfParameters() + itkExceptionMacro("Mismatch between parameters size " + << parameters.Size() << " and expected number of parameters " << this->GetNumberOfParameters() << (this->m_CoefficientImages[0]->GetLargestPossibleRegion().GetNumberOfPixels() == 0 ? ". \nSince the size of the grid region is 0, perhaps you forgot to " "SetGridRegion or SetFixedParameters before setting the Parameters." @@ -80,8 +80,8 @@ BSplineBaseTransform::SetParamet // expected number of parameters if (parameters.Size() != this->GetNumberOfParameters()) { - itkExceptionMacro(<< "Mismatched between parameters size " << parameters.size() << " and region size " - << this->GetNumberOfParameters()); + itkExceptionMacro("Mismatched between parameters size " << parameters.size() << " and region size " + << this->GetNumberOfParameters()); } // copy parameters to this->m_InternalParametersBuffer diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx index e560859fd51..0775758f296 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx @@ -348,14 +348,16 @@ BSplineDeformableTransform::SetF // with BSplines saved to disk from before image orientation was used. // Those transforms would no longer be valid with respect to images // with explicit directions. - itkExceptionMacro(<< "Mismatched between parameters size " << passedParameters.size() - << " and required number of fixed parameters " << this->m_FixedParameters.Size() + itkExceptionMacro("Mismatched between parameters size " + << passedParameters.size() << " and required number of fixed parameters " + << this->m_FixedParameters.Size() << ". Implicit setting of identity direction is no longer supported."); } else { - itkExceptionMacro(<< "Mismatched between parameters size " << passedParameters.size() - << " and the required number of fixed parameters " << this->m_FixedParameters.Size()); + itkExceptionMacro("Mismatched between parameters size " << passedParameters.size() + << " and the required number of fixed parameters " + << this->m_FixedParameters.Size()); } this->SetCoefficientImageInformationFromFixedParameters(); } @@ -388,7 +390,7 @@ BSplineDeformableTransform::SetC const SizeValueType numberOfPixels = images[j]->GetLargestPossibleRegion().GetNumberOfPixels(); if (numberOfPixels * SpaceDimension != totalParameters) { - itkExceptionMacro(<< "SetCoefficientImage() has array of images that are " + itkExceptionMacro("SetCoefficientImage() has array of images that are " << "not the correct size. " << numberOfPixels * SpaceDimension << " != " << totalParameters << " for image at index " << j << " \n" << images[j]); @@ -402,7 +404,7 @@ BSplineDeformableTransform::SetC } else { - itkExceptionMacro(<< "SetCoefficientImage() requires that an array of " + itkExceptionMacro("SetCoefficientImage() requires that an array of " << "correctly sized images be supplied."); } } diff --git a/Modules/Core/Transform/include/itkBSplineTransform.hxx b/Modules/Core/Transform/include/itkBSplineTransform.hxx index 409626966ed..b9313b9e55a 100644 --- a/Modules/Core/Transform/include/itkBSplineTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineTransform.hxx @@ -421,8 +421,9 @@ BSplineTransform::SetFixedParame } else { - itkExceptionMacro(<< "Mismatched between parameters size " << passedParameters.size() - << " and the required number of fixed parameters " << this->m_FixedParameters.Size()); + itkExceptionMacro("Mismatched between parameters size " << passedParameters.size() + << " and the required number of fixed parameters " + << this->m_FixedParameters.Size()); } @@ -443,7 +444,7 @@ BSplineTransform::SetCoefficient if (!validArrayOfImages) { - itkExceptionMacro(<< "SetCoefficientImage() requires that an array of " + itkExceptionMacro("SetCoefficientImage() requires that an array of " << "correctly sized images be supplied."); } @@ -458,7 +459,7 @@ BSplineTransform::SetCoefficient const SizeValueType numberOfPixels_j = images[j]->GetLargestPossibleRegion().GetNumberOfPixels(); if (numberOfPixels_j * SpaceDimension != totalParameters) { - itkExceptionMacro(<< "SetCoefficientImage() has array of images that are " + itkExceptionMacro("SetCoefficientImage() has array of images that are " << "not the correct size. " << numberOfPixels_j * SpaceDimension << " != " << totalParameters << " for image at index " << j << " \n" << images[j]); diff --git a/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx b/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx index 03728b0ed34..e3b7d14ed45 100644 --- a/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx +++ b/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx @@ -45,15 +45,15 @@ BSplineTransformInitializer::InitializeTransform() const { if (!this->m_Transform) { - itkExceptionMacro(<< "Transform has not been set."); + itkExceptionMacro("Transform has not been set."); } if (!this->m_Image) { - itkExceptionMacro(<< "Image has not been set."); + itkExceptionMacro("Image has not been set."); } if (TImage::GetImageDimension() != SpaceDimension) { - itkExceptionMacro(<< "Image dimensionality does not match the transform."); + itkExceptionMacro("Image dimensionality does not match the transform."); } OriginType transformDomainOrigin; diff --git a/Modules/Core/Transform/include/itkCompositeTransform.hxx b/Modules/Core/Transform/include/itkCompositeTransform.hxx index 09632a489af..21245caf74f 100644 --- a/Modules/Core/Transform/include/itkCompositeTransform.hxx +++ b/Modules/Core/Transform/include/itkCompositeTransform.hxx @@ -653,8 +653,8 @@ CompositeTransform::SetParameters(const Parame /* Verify proper input size. */ if (inputParameters.Size() != this->GetNumberOfParameters()) { - itkExceptionMacro(<< "Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " - << this->GetNumberOfParameters() << '.'); + itkExceptionMacro("Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " + << this->GetNumberOfParameters() << '.'); } if (transforms.size() == 1) @@ -736,8 +736,8 @@ CompositeTransform::SetFixedParameters(const F /* Verify proper input size. */ if (inputParameters.Size() != this->GetNumberOfFixedParameters()) { - itkExceptionMacro(<< "Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " - << this->GetNumberOfFixedParameters() << '.'); + itkExceptionMacro("Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " + << this->GetNumberOfFixedParameters() << '.'); } this->m_FixedParameters = inputParameters; @@ -993,7 +993,7 @@ CompositeTransform::InternalClone() const typename Self::Pointer clone = dynamic_cast(loPtr.GetPointer()); if (clone.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } auto tqIt = this->m_TransformQueue.begin(); diff --git a/Modules/Core/Transform/include/itkEuler3DTransform.hxx b/Modules/Core/Transform/include/itkEuler3DTransform.hxx index d1c16bb1768..5eb2ff463f3 100644 --- a/Modules/Core/Transform/include/itkEuler3DTransform.hxx +++ b/Modules/Core/Transform/include/itkEuler3DTransform.hxx @@ -131,8 +131,9 @@ Euler3DTransform::SetFixedParameters(const FixedParameters { if (parameters.size() < InputSpaceDimension) { - itkExceptionMacro(<< "Error setting fixed parameters: parameters array size (" << parameters.size() - << ") is less than expected (InputSpaceDimension = " << InputSpaceDimension << ')'); + itkExceptionMacro("Error setting fixed parameters: parameters array size (" + << parameters.size() << ") is less than expected (InputSpaceDimension = " << InputSpaceDimension + << ')'); } InputPointType c; diff --git a/Modules/Core/Transform/include/itkKernelTransform.h b/Modules/Core/Transform/include/itkKernelTransform.h index c00deba14d3..c0e728322aa 100644 --- a/Modules/Core/Transform/include/itkKernelTransform.h +++ b/Modules/Core/Transform/include/itkKernelTransform.h @@ -155,13 +155,13 @@ class ITK_TEMPLATE_EXPORT KernelTransform : public Transform::ComputeG(const InputVectorType &, GMatrixType & itkNotUsed(gmatrix)) const { - itkExceptionMacro(<< "ComputeG(vector,gmatrix) must be reimplemented" + itkExceptionMacro("ComputeG(vector,gmatrix) must be reimplemented" << " in subclasses of KernelTransform."); } @@ -359,7 +359,7 @@ KernelTransform::ComputeJacobianWithRespectToP // FIXME: TODO // The Jacobian should be computable in terms of the matrices // used to Transform points... - itkExceptionMacro(<< "Get[Local]Jacobian must be implemented in subclasses" + itkExceptionMacro("Get[Local]Jacobian must be implemented in subclasses" << " of KernelTransform."); } diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx index e450908359e..bcee7829555 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx @@ -459,8 +459,8 @@ MatrixOffsetTransformBaseGetNumberOfParameters() << '.'); + itkExceptionMacro("Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " + << this->GetNumberOfParameters() << '.'); } TransformQueueType transforms = this->GetTransformQueue(); @@ -172,8 +172,8 @@ MultiTransform::SetFixedParame /* Verify proper input size. */ if (inputParameters.Size() != this->GetNumberOfFixedParameters()) { - itkExceptionMacro(<< "Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " - << this->GetNumberOfFixedParameters() << '.'); + itkExceptionMacro("Input parameter list size is not expected size. " << inputParameters.Size() << " instead of " + << this->GetNumberOfFixedParameters() << '.'); } /* Assumes input params are concatenation of the parameters of the diff --git a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h index 57a75781a4c..c15049ca636 100644 --- a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h +++ b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : public Transform::SetMatrix(const MatrixType & matrix, con { if (!this->MatrixIsOrthogonal(matrix, tolerance)) { - itkExceptionMacro(<< "Attempting to set a non-orthogonal rotation matrix"); + itkExceptionMacro("Attempting to set a non-orthogonal rotation matrix"); } this->Superclass::SetMatrix(matrix); @@ -117,7 +117,7 @@ Rigid3DTransform::SetParameters(const ParametersType & par const TParametersValueType tolerance = MatrixOrthogonalityTolerance::GetTolerance(); if (!this->MatrixIsOrthogonal(matrix, tolerance)) { - itkExceptionMacro(<< "Attempting to set a non-orthogonal rotation matrix"); + itkExceptionMacro("Attempting to set a non-orthogonal rotation matrix"); } this->SetVarMatrix(matrix); diff --git a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx index 99102f84f71..3d7f813580f 100644 --- a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx @@ -230,7 +230,7 @@ template void ScaleSkewVersor3DTransform::ComputeMatrixParameters() { - itkExceptionMacro(<< "Setting the matrix of a ScaleSkewVersor3D transform is not supported at this time."); + itkExceptionMacro("Setting the matrix of a ScaleSkewVersor3D transform is not supported at this time."); } // Print self diff --git a/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx b/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx index 32cafb58ed5..7c88cbb22b4 100644 --- a/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx @@ -198,7 +198,7 @@ template void ScaleVersor3DTransform::ComputeMatrixParameters() { - itkExceptionMacro(<< "Setting the matrix of a ScaleVersor3D transform is not supported at this time."); + itkExceptionMacro("Setting the matrix of a ScaleVersor3D transform is not supported at this time."); } // Print self diff --git a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx index bdb1fee0417..b0e6d2ff805 100644 --- a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx @@ -152,7 +152,7 @@ Similarity2DTransform::ComputeMatrixParameters() // https://en.cppreference.com/w/cpp/types/numeric_limits/epsilon if (m_Scale < std::numeric_limits::min()) { - itkExceptionMacro(<< "Bad Rotation Matrix. Scale cannot be zero.\n" + itkExceptionMacro("Bad Rotation Matrix. Scale cannot be zero.\n" << "m_Scale : " << m_Scale); } @@ -165,7 +165,7 @@ Similarity2DTransform::ComputeMatrixParameters() if ((this->GetMatrix()[1][0] / m_Scale) - std::sin(this->GetAngle()) > 0.000001) { - itkExceptionMacro(<< "Bad Rotation Matrix"); + itkExceptionMacro("Bad Rotation Matrix"); } } diff --git a/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx index fcb1e606e1e..0d61e32329c 100644 --- a/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx @@ -86,7 +86,7 @@ Similarity3DTransform::SetMatrix(const MatrixType & matrix if (det == 0.0) { - itkExceptionMacro(<< "Attempting to set a matrix with a zero determinant"); + itkExceptionMacro("Attempting to set a matrix with a zero determinant"); } // @@ -102,7 +102,7 @@ Similarity3DTransform::SetMatrix(const MatrixType & matrix // if (s <= 0.0) { - itkExceptionMacro(<< "Attempting to set a matrix with a negative trace"); + itkExceptionMacro("Attempting to set a matrix with a negative trace"); } MatrixType testForOrthogonal = matrix; @@ -110,7 +110,7 @@ Similarity3DTransform::SetMatrix(const MatrixType & matrix if (!this->MatrixIsOrthogonal(testForOrthogonal, tolerance)) { - itkExceptionMacro(<< "Attempting to set a non-orthogonal matrix (after removing scaling)"); + itkExceptionMacro("Attempting to set a non-orthogonal matrix (after removing scaling)"); } using Baseclass = MatrixOffsetTransformBase; diff --git a/Modules/Core/Transform/include/itkTransform.hxx b/Modules/Core/Transform/include/itkTransform.hxx index 81173515766..36edafe4c37 100644 --- a/Modules/Core/Transform/include/itkTransform.hxx +++ b/Modules/Core/Transform/include/itkTransform.hxx @@ -55,7 +55,7 @@ Transform::InternalClon typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetFixedParameters(this->GetFixedParameters()); rval->SetParameters(this->GetParameters()); diff --git a/Modules/Core/Transform/include/itkTransformGeometryImageFilter.hxx b/Modules/Core/Transform/include/itkTransformGeometryImageFilter.hxx index 907b4d8c30b..75d73d63f30 100644 --- a/Modules/Core/Transform/include/itkTransformGeometryImageFilter.hxx +++ b/Modules/Core/Transform/include/itkTransformGeometryImageFilter.hxx @@ -44,7 +44,7 @@ TransformGeometryImageFilter::VerifyPreconditions() I if (!tx->IsLinear()) { - itkExceptionMacro(<< "Transform set to non-linear transform of type: " << tx->GetNameOfClass()); + itkExceptionMacro("Transform set to non-linear transform of type: " << tx->GetNameOfClass()); } } diff --git a/Modules/Core/Transform/include/itkTranslationTransform.hxx b/Modules/Core/Transform/include/itkTranslationTransform.hxx index fa1014e6148..2e18b14952f 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.hxx +++ b/Modules/Core/Transform/include/itkTranslationTransform.hxx @@ -46,8 +46,8 @@ TranslationTransform::SetParameters(const Para { if (parameters.Size() < SpaceDimension) { - itkExceptionMacro(<< "Error setting parameters: parameters array size (" << parameters.Size() - << ") is less than expected (SpaceDimension = " << SpaceDimension << ')'); + itkExceptionMacro("Error setting parameters: parameters array size (" + << parameters.Size() << ") is less than expected (SpaceDimension = " << SpaceDimension << ')'); } // Save parameters. Needed for proper operation of TransformUpdateParameters. diff --git a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx index 1993c5aba78..854fe674320 100644 --- a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx @@ -42,7 +42,7 @@ class Rigid3DTransformSurrogate : public Rigid3DTransform InverseTransformBasePointer GetInverseTransform() const override { - itkExceptionMacro(<< "This is never called."); + itkExceptionMacro("This is never called."); } private: diff --git a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx index 0e0db611175..eceea6789e5 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx @@ -66,17 +66,17 @@ MRIBiasEnergyFunction::GetValue(const Parameters { if (m_Image.IsNull()) { - itkExceptionMacro(<< "Image is null"); + itkExceptionMacro("Image is null"); } if (!m_InternalEnergyFunction) { - itkExceptionMacro(<< "EnergyFunction is null"); + itkExceptionMacro("EnergyFunction is null"); } if (m_BiasField == nullptr) { - itkExceptionMacro(<< "BiasField is null"); + itkExceptionMacro("BiasField is null"); } MeasureType total = 0.0; @@ -417,7 +417,7 @@ MRIBiasFieldCorrectionFilter::Initialize( // Initialize the energy function if (m_TissueClassMeans.Size() < 1) { - itkExceptionMacro(<< "Tissue Class Means is empty"); + itkExceptionMacro("Tissue Class Means is empty"); } if (!m_EnergyFunction) @@ -757,17 +757,17 @@ MRIBiasFieldCorrectionFilter::SetTissueCl if (meanSize == 0) { - itkExceptionMacro(<< "arrays of Means is empty"); + itkExceptionMacro("arrays of Means is empty"); } if (sigmaSize == 0) { - itkExceptionMacro(<< "arrays of Sigmas is empty"); + itkExceptionMacro("arrays of Sigmas is empty"); } if (meanSize != sigmaSize) { - itkExceptionMacro(<< "arrays of Means and Sigmas have different lengths"); + itkExceptionMacro("arrays of Means and Sigmas have different lengths"); } m_TissueClassMeans = means; diff --git a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx index 9040c65175e..d084069d2f7 100644 --- a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx @@ -592,7 +592,7 @@ MaskedFFTNormalizedCorrelationImageFilter } else { - itkExceptionMacro(<< "Precision tolerance not defined for the input image pixel type."); + itkExceptionMacro("Precision tolerance not defined for the input image pixel type."); } return precisionTolerance; diff --git a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.hxx b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.hxx index 45aea0f1378..65811cad426 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.hxx @@ -53,7 +53,7 @@ BinaryMinMaxCurvatureFlowImageFilter::InitializeItera if (!f) { - itkExceptionMacro(<< "DifferenceFunction not of type BinaryMinMaxCurvatureFlowFunction"); + itkExceptionMacro("DifferenceFunction not of type BinaryMinMaxCurvatureFlowFunction"); } f->SetThreshold(m_Threshold); diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx index e054acfa86b..ee457796223 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx @@ -53,7 +53,7 @@ CurvatureFlowImageFilter::InitializeIteration() if (!f) { - itkExceptionMacro(<< "DifferenceFunction not of type CurvatureFlowFunction"); + itkExceptionMacro("DifferenceFunction not of type CurvatureFlowFunction"); } f->SetTimeStep(m_TimeStep); diff --git a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.hxx b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.hxx index 48a7be74fb9..b01de7ea389 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.hxx @@ -54,7 +54,7 @@ MinMaxCurvatureFlowImageFilter::InitializeIteration() if (!f) { - itkExceptionMacro(<< "DifferenceFunction not of type MinMaxCurvatureFlowFunction"); + itkExceptionMacro("DifferenceFunction not of type MinMaxCurvatureFlowFunction"); } f->SetStencilRadius(m_StencilRadius); diff --git a/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h b/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h index 918402541d5..9a632147b12 100644 --- a/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h +++ b/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h @@ -52,7 +52,7 @@ class DeconvolutionIterationCommand : public itk::Command const auto * filter = static_cast(object); if (filter->GetCurrentEstimate() == nullptr) { - itkExceptionMacro(<< "CurrentEstimate is nullptr, but should not be."); + itkExceptionMacro("CurrentEstimate is nullptr, but should not be."); } } diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx index bdc0b3750b8..ebd136d5169 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx @@ -79,8 +79,8 @@ PatchBasedDenoisingImageFilter::SetThreadData(int thr } else { - itkExceptionMacro(<< "Invalid thread id " << threadId << " or SetThreadData called before m_ThreadData (size=" - << m_ThreadData.size() << ") was initialized."); + itkExceptionMacro("Invalid thread id " << threadId << " or SetThreadData called before m_ThreadData (size=" + << m_ThreadData.size() << ") was initialized."); } } @@ -94,8 +94,8 @@ PatchBasedDenoisingImageFilter::GetThreadData(int thr } else { - itkExceptionMacro(<< "Invalid thread id " << threadId << " or GetThreadData called before m_ThreadData (size=" - << m_ThreadData.size() << ") was initialized."); + itkExceptionMacro("Invalid thread id " << threadId << " or GetThreadData called before m_ThreadData (size=" + << m_ThreadData.size() << ") was initialized."); } } @@ -122,7 +122,7 @@ PatchBasedDenoisingImageFilter::CopyInputToOutput() { if (!this->m_InputImage || !this->m_OutputImage) { - itkExceptionMacro(<< "Input or Output image is nullptr."); + itkExceptionMacro("Input or Output image is nullptr."); } InputImageRegionConstIteratorType inputIt(this->m_InputImage, this->m_InputImage->GetRequestedRegion()); @@ -228,7 +228,7 @@ PatchBasedDenoisingImageFilter::Initialize() { // The image needs to be at least as big as a single patch // throw an exception when this isn't the case - itkExceptionMacro(<< "Patch is larger than the entire image (in at least one dimension)." + itkExceptionMacro("Patch is larger than the entire image (in at least one dimension)." << "\nImage region: " << largestRegion << "\nPatch length (2*radius + 1): " << this->GetPatchDiameterInVoxels() << "\nUse a smaller patch for this image.\n"); } @@ -336,8 +336,8 @@ PatchBasedDenoisingImageFilter::Initialize() // Check that the set kernel sigma is valid if (m_KernelBandwidthSigma[ic] <= m_MinSigma) { - itkExceptionMacro(<< "Gaussian kernel sigma (" << m_KernelBandwidthSigma[ic] << ") must be larger than " - << m_MinSigma); + itkExceptionMacro("Gaussian kernel sigma (" << m_KernelBandwidthSigma[ic] << ") must be larger than " + << m_MinSigma); } } } @@ -388,7 +388,7 @@ PatchBasedDenoisingImageFilter::EnforceConstraints() { if (m_ImageMax[ic] <= m_ImageMin[ic]) { - itkExceptionMacro(<< "Each image component must be nonconstant. " + itkExceptionMacro("Each image component must be nonconstant. " << "Component " << ic << " has the constant value " << m_ImageMax[ic] << ".\n"); } } @@ -401,7 +401,7 @@ PatchBasedDenoisingImageFilter::EnforceConstraints() { if (m_ImageMin[ic] < NumericTraits::ZeroValue()) { - itkExceptionMacro(<< "When using POISSON or RICIAN noise models, " + itkExceptionMacro("When using POISSON or RICIAN noise models, " << "all components of all pixels in the image must " << "be >= 0. The smallest value for component " << ic << " in the image is " << m_ImageMin[ic] << ".\n"); @@ -569,8 +569,8 @@ PatchBasedDenoisingImageFilter::InitializePatchWeight { if (centerWeight <= 0.0) { - itkExceptionMacro(<< "Center pixel's weight (" << patchWeights[(this->GetPatchLengthInVoxels() - 1) / 2] - << ") must be greater than 0.0 "); + itkExceptionMacro("Center pixel's weight (" << patchWeights[(this->GetPatchLengthInVoxels() - 1) / 2] + << ") must be greater than 0.0 "); } // Normalize to the center weight to guarantee that the center weight == 1.0 @@ -2092,7 +2092,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU } default: { - itkExceptionMacro(<< "Unexpected noise model " << this->GetNoiseModel() << " specified."); + itkExceptionMacro("Unexpected noise model " << this->GetNoiseModel() << " specified."); break; } } diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h index 77136ddc6a4..64ee6dd7489 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h @@ -226,7 +226,7 @@ class ITK_TEMPLATE_EXPORT DiffusionTensor3DReconstructionImageFilter if (m_GradientImageTypeEnumeration == DiffusionTensor3DReconstructionImageFilterEnums::GradientImageFormat::GradientIsInASingleImage) { - itkExceptionMacro(<< "Cannot call both methods:" + itkExceptionMacro("Cannot call both methods:" << "AddGradientImage and SetGradientImage. Please call only one of them."); } @@ -249,7 +249,7 @@ class ITK_TEMPLATE_EXPORT DiffusionTensor3DReconstructionImageFilter { if (idx >= m_NumberOfGradientDirections) { - itkExceptionMacro(<< "Gradient direction " << idx << " does not exist"); + itkExceptionMacro("Gradient direction " << idx << " does not exist"); } return m_GradientDirectionContainer->ElementAt(idx); } diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx index 2e1ad310614..fca461b1be0 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx @@ -78,7 +78,7 @@ DiffusionTensor3DReconstructionImageFilterProcessObject::GetInput(0)->GetNameOfClass()); if (strcmp(gradientImageClassName.c_str(), "VectorImage") != 0) { - itkExceptionMacro(<< "There is only one Gradient image. I expect that to be a VectorImage. " + itkExceptionMacro("There is only one Gradient image. I expect that to be a VectorImage. " << "But its of type: " << gradientImageClassName); } } @@ -132,7 +132,7 @@ DiffusionTensor3DReconstructionImageFilter(this->ProcessObject::GetInput(i + 1)); if (gradientImagePointer.IsNull()) { - itkExceptionMacro(<< "Invalid dynamic_cast"); + itkExceptionMacro("Invalid dynamic_cast"); } auto * git = new GradientIteratorType(gradientImagePointer, outputRegionForThread); @@ -469,7 +469,7 @@ DiffusionTensor3DReconstructionImageFilterm_NumberOfBaselineImages == 0) { - itkExceptionMacro(<< "Number of baseline images is null"); + itkExceptionMacro("Number of baseline images is null"); } if (this->m_NumberOfGradientDirections < 6) { - itkExceptionMacro(<< "Not enough gradient directions supplied. Need to supply at least 6"); + itkExceptionMacro("Not enough gradient directions supplied. Need to supply at least 6"); } } diff --git a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx index a3f23e892fb..ce8e3cae8cb 100644 --- a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx @@ -190,7 +190,7 @@ BSplineSmoothingOnUpdateDisplacementFieldTransform(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } // diff --git a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx index 382f298c037..972da71c0e2 100644 --- a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx @@ -337,7 +337,7 @@ ConstantVelocityFieldTransform::InternalClone( typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } // set the fixed/moving parameters. diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx index c4ad74efe23..41946edaf47 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx @@ -151,7 +151,7 @@ DisplacementFieldJacobianDeterminantFilter { if (static_cast(this->GetInput()->GetSpacing()[i]) == 0.0) { - itkExceptionMacro(<< "Image spacing in dimension " << i << " is zero."); + itkExceptionMacro("Image spacing in dimension " << i << " is zero."); } m_DerivativeWeights[i] = static_cast(1.0 / static_cast(this->GetInput()->GetSpacing()[i])); m_HalfDerivativeWeights[i] = 0.5 * m_DerivativeWeights[i]; diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx index aa4be19498c..f10ff333fe8 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx @@ -225,7 +225,7 @@ GaussianSmoothingOnUpdateDisplacementFieldTransform(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } // diff --git a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx index b18eb3f9e5d..ef3fade263c 100644 --- a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx @@ -265,7 +265,7 @@ VelocityFieldTransform::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } // set the fixed/moving parameters. @@ -306,7 +306,7 @@ VelocityFieldTransform::InternalClone() const dynamic_cast(this->m_VelocityFieldInterpolator->CreateAnother().GetPointer()); if (newInterp.IsNull()) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } // interpolator needs to know about the velocity field diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx index 1fd554734d4..d3daff4926f 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx @@ -378,7 +378,7 @@ IsoContourDistanceImageFilter::ComputeValue(const Inp } else { - itkExceptionMacro(<< "Gradient norm is lower than pixel precision"); + itkExceptionMacro("Gradient norm is lower than pixel precision"); } } // end if (sign != signNeigh) } // end for n diff --git a/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx index 47ae5c1604d..0f52e4cd3cf 100644 --- a/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx @@ -48,7 +48,8 @@ VnlComplexToComplexFFTImageFilter::BeforeThreadedGene { if (!VnlFFTCommon::IsDimensionSizeLegal(imageSize[ii])) { - itkExceptionMacro(<< "Cannot compute FFT of image with size " << imageSize + itkExceptionMacro("Cannot compute FFT of image with size " + << imageSize << ". VnlComplexToComplexFFTImageFilter operates only on images whose size in each dimension " "has only a combination of 2,3, and 5 as prime factors."); } diff --git a/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx index f61034da862..a822ca5ae11 100644 --- a/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx @@ -52,7 +52,8 @@ VnlForwardFFTImageFilter::GenerateData() { if (!VnlFFTCommon::IsDimensionSizeLegal(inputSize[i])) { - itkExceptionMacro(<< "Cannot compute FFT of image with size " << inputSize + itkExceptionMacro("Cannot compute FFT of image with size " + << inputSize << ". VnlForwardFFTImageFilter operates only on images whose size in each dimension has only a " "combination of 2,3, and 5 as prime factors."); } diff --git a/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx index 883ed75df41..80509d81ac9 100644 --- a/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx @@ -55,7 +55,8 @@ VnlHalfHermitianToRealInverseFFTImageFilter::Generate { if (!VnlFFTCommon::IsDimensionSizeLegal(outputSize[i])) { - itkExceptionMacro(<< "Cannot compute FFT of image with size " << outputSize + itkExceptionMacro("Cannot compute FFT of image with size " + << outputSize << ". VnlHalfHermitianToRealInverseFFTImageFilter operates only on images whose size in each " "dimension has only a combination of 2,3, and 5 as prime factors."); } diff --git a/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx index 80d8d147ef6..ec44d6486a1 100644 --- a/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx @@ -54,7 +54,8 @@ VnlInverseFFTImageFilter::GenerateData() { if (!VnlFFTCommon::IsDimensionSizeLegal(outputSize[i])) { - itkExceptionMacro(<< "Cannot compute FFT of image with size " << outputSize + itkExceptionMacro("Cannot compute FFT of image with size " + << outputSize << ". VnlInverseFFTImageFilter operates only on images whose size in each dimension has only a " "combination of 2,3, and 5 as prime factors."); } diff --git a/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx index 59361f6d8f4..f0b51503d0e 100644 --- a/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx @@ -51,8 +51,8 @@ VnlRealToHalfHermitianForwardFFTImageFilter::Generate { if (!VnlFFTCommon::IsDimensionSizeLegal(inputSize[i])) { - itkExceptionMacro(<< "Cannot compute FFT of image with size " << inputSize - << ". VnlRealToHalfHermitianForwardFFTImageFilter operates " + itkExceptionMacro("Cannot compute FFT of image with size " + << inputSize << ". VnlRealToHalfHermitianForwardFFTImageFilter operates " << "only on images whose size in each dimension has a prime " << "factorization consisting of only 2s, 3s, or 5s."); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx index 698e9fa593f..7d4e3455911 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx @@ -68,19 +68,19 @@ FastMarchingBase::Initialize(OutputDomainType * oDomain) { if (m_TrialPoints.IsNull()) { - itkExceptionMacro(<< "No Trial Nodes"); + itkExceptionMacro("No Trial Nodes"); } if (m_StoppingCriterion.IsNull()) { - itkExceptionMacro(<< "No Stopping Criterion Set"); + itkExceptionMacro("No Stopping Criterion Set"); } if (m_NormalizationFactor < itk::Math::eps) { - itkExceptionMacro(<< "Normalization Factor is null or negative"); + itkExceptionMacro("Normalization Factor is null or negative"); } if (m_SpeedConstant < itk::Math::eps) { - itkExceptionMacro(<< "SpeedConstant is null or negative"); + itkExceptionMacro("SpeedConstant is null or negative"); } if (m_CollectPoints) { diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx index c1f1ac0b8ce..7714af3247a 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx @@ -116,22 +116,22 @@ FastMarchingExtensionImageFilterGetAlivePoints() && !m_AuxAliveValues) { - itkExceptionMacro(<< "in Initialize(): Null pointer for AuxAliveValues"); + itkExceptionMacro("in Initialize(): Null pointer for AuxAliveValues"); } if (m_AuxAliveValues && m_AuxAliveValues->Size() != (this->GetAlivePoints())->Size()) { - itkExceptionMacro(<< "in Initialize(): AuxAliveValues is the wrong size"); + itkExceptionMacro("in Initialize(): AuxAliveValues is the wrong size"); } if (this->GetTrialPoints() && !m_AuxTrialValues) { - itkExceptionMacro(<< "in Initialize(): Null pointer for AuxTrialValues"); + itkExceptionMacro("in Initialize(): Null pointer for AuxTrialValues"); } if (m_AuxTrialValues && m_AuxTrialValues->Size() != (this->GetTrialPoints())->Size()) { - itkExceptionMacro(<< "in Initialize(): AuxTrialValues is the wrong size"); + itkExceptionMacro("in Initialize(): AuxTrialValues is the wrong size"); } // allocate memory for the auxiliary outputs diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx index 05ef160c233..db9a555cba2 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx @@ -114,20 +114,20 @@ FastMarchingExtensionImageFilterBase: if (!m_AuxiliaryAliveValues) { - itkExceptionMacro(<< "in Initialize(): Null pointer for AuxAliveValues"); + itkExceptionMacro("in Initialize(): Null pointer for AuxAliveValues"); } if (m_AuxiliaryAliveValues->size() != (this->m_AlivePoints->size())) { - itkExceptionMacro(<< "in Initialize(): AuxAliveValues is the wrong size"); + itkExceptionMacro("in Initialize(): AuxAliveValues is the wrong size"); } if (!m_AuxiliaryTrialValues) { - itkExceptionMacro(<< "in Initialize(): Null pointer for AuxTrialValues"); + itkExceptionMacro("in Initialize(): Null pointer for AuxTrialValues"); } if (m_AuxiliaryTrialValues->size() != this->m_TrialPoints->size()) { - itkExceptionMacro(<< "in Initialize(): AuxTrialValues is the wrong size"); + itkExceptionMacro("in Initialize(): AuxTrialValues is the wrong size"); } // allocate memory for the auxiliary outputs diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 8e5cb0eec71..ee240933ea4 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -317,7 +317,7 @@ FastMarchingImageFilterBase::Solve(OutputImageType * if (discrim < itk::Math::eps) { // Discriminant of quadratic eqn. is negative - itkExceptionMacro(<< "Discriminant of quadratic equation is negative"); + itkExceptionMacro("Discriminant of quadratic equation is negative"); } oSolution = (std::sqrt(discrim) + bb) / aa; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h index a2dc24ae98a..ca4ddcf57f2 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h @@ -212,7 +212,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingReachedTargetNodesStoppingCriterion } if (m_NumberOfTargetsToBeReached < 1) { - itkExceptionMacro(<< "Number of target nodes to be reached is null"); + itkExceptionMacro("Number of target nodes to be reached is null"); } if (m_NumberOfTargetsToBeReached > m_TargetNodes.size()) { diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h index 971cdbf7160..d54a5b16a80 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h @@ -293,15 +293,15 @@ class ITK_TEMPLATE_EXPORT FastMarchingUpwindGradientImageFilter : public FastMar if (!targetPointsExist) { - itkExceptionMacro(<< "No target point set. Cannot set the target reached mode."); + itkExceptionMacro("No target point set. Cannot set the target reached mode."); } else { SizeValueType availableNumberOfTargets = m_TargetPoints->Size(); if (targetModeMinPoints > availableNumberOfTargets) { - itkExceptionMacro(<< "Not enough target points: Available: " << availableNumberOfTargets - << "; Requested: " << targetModeMinPoints); + itkExceptionMacro("Not enough target points: Available: " << availableNumberOfTargets + << "; Requested: " << targetModeMinPoints); } } } diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx index 98dd50ac319..86e880b85fd 100644 --- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx +++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx @@ -225,7 +225,7 @@ GPUNeighborhoodOperatorImageFilter::ValueType >::is_signed ) { - itkExceptionMacro(<< "This filter can only create images of signed data type."); + itkExceptionMacro("This filter can only create images of signed data type."); } // Allocate output diff --git a/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx b/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx index f0fa94fc785..fb62dafeaea 100644 --- a/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx +++ b/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx @@ -170,7 +170,7 @@ GPUDiscreteGaussianImageFilter::GPUGenerateData() { if (localInput->GetSpacing()[i] == 0.0) { - itkExceptionMacro(<< "Pixel spacing cannot be zero"); + itkExceptionMacro("Pixel spacing cannot be zero"); } else { diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx index 5be05f364c9..dba5d687444 100644 --- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx @@ -105,7 +105,7 @@ GPUBinaryThresholdImageFilter::GPUGenerateData() if (lowerThreshold->Get() > upperThreshold->Get()) { - itkExceptionMacro(<< "Lower threshold cannot be greater than upper threshold."); + itkExceptionMacro("Lower threshold cannot be greater than upper threshold."); } // Setup up the functor diff --git a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h index a1b347e57cd..4f671a2cf78 100644 --- a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h @@ -184,7 +184,7 @@ class ITK_TEMPLATE_EXPORT STAPLEImageFilter : public ImageToImageFilter this->GetNumberOfIndexedInputs()) { - itkExceptionMacro(<< "Array reference out of bounds."); + itkExceptionMacro("Array reference out of bounds."); } return m_Sensitivity[i]; } @@ -196,7 +196,7 @@ class ITK_TEMPLATE_EXPORT STAPLEImageFilter : public ImageToImageFilter this->GetNumberOfIndexedInputs()) { - itkExceptionMacro(<< "Array reference out of bounds."); + itkExceptionMacro("Array reference out of bounds."); } return m_Specificity[i]; } diff --git a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.hxx b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.hxx index 830135412f0..aeac7ba736c 100644 --- a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.hxx +++ b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.hxx @@ -90,7 +90,7 @@ STAPLEImageFilter::GenerateData() { if (this->GetInput(i)->GetRequestedRegion() != W->GetRequestedRegion()) { - itkExceptionMacro(<< "One or more input images do not contain matching RequestedRegions"); + itkExceptionMacro("One or more input images do not contain matching RequestedRegions"); } in = IteratorType(this->GetInput(i), W->GetRequestedRegion()); diff --git a/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx b/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx index d84d1c8400c..5625cc9d8dc 100644 --- a/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx +++ b/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx @@ -90,7 +90,7 @@ ComposeImageFilter::BeforeThreadedGenerateData() auto * input = itkDynamicCastInDebugMode(this->ProcessObject::GetInput(i)); if (!input) { - itkExceptionMacro(<< "Input " << i << " not set!"); + itkExceptionMacro("Input " << i << " not set!"); } if (i == 0) { @@ -98,7 +98,7 @@ ComposeImageFilter::BeforeThreadedGenerateData() } else if (input->GetLargestPossibleRegion() != region) { - itkExceptionMacro(<< "All Inputs must have the same dimensions."); + itkExceptionMacro("All Inputs must have the same dimensions."); } } } diff --git a/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx b/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx index 1ca11242da7..ceb4afc02bf 100644 --- a/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx +++ b/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx @@ -45,7 +45,7 @@ JoinSeriesImageFilter::VerifyInputInformation() ITKv5 if (image.IsNull()) { - itkExceptionMacro(<< "Input not set as expected!"); + itkExceptionMacro("Input not set as expected!"); } const unsigned int numComponents = image->GetNumberOfComponentsPerPixel(); @@ -66,8 +66,9 @@ JoinSeriesImageFilter::VerifyInputInformation() ITKv5 if (numComponents != image->GetNumberOfComponentsPerPixel()) { - itkExceptionMacro(<< "Primary input has " << numComponents << " numberOfComponents " - << "but input " << idx << " has " << image->GetNumberOfComponentsPerPixel() << '!'); + itkExceptionMacro("Primary input has " << numComponents << " numberOfComponents " + << "but input " << idx << " has " << image->GetNumberOfComponentsPerPixel() + << '!'); } } } @@ -164,7 +165,7 @@ JoinSeriesImageFilter::GenerateOutputInformation() else { // Pointer could not be cast back down - itkExceptionMacro(<< "itk::JoinSeriesImageFilter::GenerateOutputInformation " + itkExceptionMacro("itk::JoinSeriesImageFilter::GenerateOutputInformation " << "cannot cast input to " << typeid(ImageBase *).name()); } @@ -196,7 +197,7 @@ JoinSeriesImageFilter::GenerateInputRequestedRegion() { // Because DataObject::PropagateRequestedRegion() allows only // InvalidRequestedRegionError, it's impossible to write simply: - // itkExceptionMacro(<< "Missing input " << idx); + // itkExceptionMacro("Missing input " << idx); InvalidRequestedRegionError e(__FILE__, __LINE__); e.SetLocation(ITK_LOCATION); e.SetDescription("Missing input."); diff --git a/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx index 580e0feca30..a6071fbcd1a 100644 --- a/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx @@ -99,7 +99,7 @@ DerivativeImageFilter::GenerateData() { if (this->GetInput()->GetSpacing()[m_Direction] == 0.0) { - itkExceptionMacro(<< "Image spacing cannot be zero."); + itkExceptionMacro("Image spacing cannot be zero."); } else { diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx index 3a64c5ae238..9918c85774b 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx @@ -190,7 +190,7 @@ HoughTransform2DCirclesImageFilter::GenerateData() { if (this->GetInput()->GetSpacing()[i] == 0.0) { - itkExceptionMacro(<< "Image spacing cannot be zero"); + itkExceptionMacro("Image spacing cannot be zero"); } else { diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx index 5024dcc32a9..69121d08ad0 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx @@ -97,7 +97,7 @@ LaplacianSharpeningImageFilter::GenerateData() { if (this->GetInput()->GetSpacing()[i] == 0.0) { - itkExceptionMacro(<< "Image spacing cannot be zero"); + itkExceptionMacro("Image spacing cannot be zero"); } else { diff --git a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.hxx index 0d22a557707..44690d79fa9 100644 --- a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.hxx @@ -61,7 +61,7 @@ UnsharpMaskImageFilter::VerifyPre Superclass::VerifyPreconditions(); if (m_Threshold < 0.0) { - itkExceptionMacro(<< "Threshold must be non-negative!"); + itkExceptionMacro("Threshold must be non-negative!"); } } diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx index 7f85d8ed48d..354a7033542 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx @@ -77,7 +77,7 @@ BinaryFunctorImageFilter::G const auto * input = dynamic_cast(this->ProcessObject::GetInput(0)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 1 is not set"); + itkExceptionMacro("Constant 1 is not set"); } return input->Get(); } @@ -125,7 +125,7 @@ BinaryFunctorImageFilter::G const auto * input = dynamic_cast(this->ProcessObject::GetInput(1)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 2 is not set"); + itkExceptionMacro("Constant 2 is not set"); } return input->Get(); } diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx index 687b0197e2f..c68b9ea4691 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx @@ -75,7 +75,7 @@ BinaryGeneratorImageFilter::GetConstan const auto * input = dynamic_cast(this->ProcessObject::GetInput(0)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 1 is not set"); + itkExceptionMacro("Constant 1 is not set"); } return input->Get(); } @@ -121,7 +121,7 @@ BinaryGeneratorImageFilter::GetConstan const auto * input = dynamic_cast(this->ProcessObject::GetInput(1)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 2 is not set"); + itkExceptionMacro("Constant 2 is not set"); } return input->Get(); } diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx index 4b513820e72..85056607cd7 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx @@ -92,7 +92,7 @@ MovingHistogramImageFilterBase::SetKernel(co // verify that the kernel contain at least one point if (count == 0) { - itkExceptionMacro(<< "The kernel must contain at least one point."); + itkExceptionMacro("The kernel must contain at least one point."); } // no attribute should be modified before here to avoid setting the filter in diff --git a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx index cb7730a379a..e883a35da54 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx @@ -102,7 +102,7 @@ TernaryFunctorImageFilter(this->ProcessObject::GetInput(0)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 1 is not set"); + itkExceptionMacro("Constant 1 is not set"); } return input->Get(); } @@ -126,7 +126,7 @@ const typename TernaryGeneratorImageFilter(this->ProcessObject::GetInput(1)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 2 is not set"); + itkExceptionMacro("Constant 2 is not set"); } return input->Get(); } @@ -177,7 +177,7 @@ const typename TernaryGeneratorImageFilter(this->ProcessObject::GetInput(2)); if (input == nullptr) { - itkExceptionMacro(<< "Constant 3 is not set"); + itkExceptionMacro("Constant 3 is not set"); } return input->Get(); } diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx index e5ae4efc727..4b9464126e8 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx @@ -199,7 +199,7 @@ LabelMapContourOverlayImageFilter::Befor } else { - itkExceptionMacro(<< "Unsupported Type: " << m_Type); + itkExceptionMacro("Unsupported Type: " << m_Type); } // choose which labels will be on top of the others diff --git a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx index c1eada17843..4023840fb46 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx @@ -130,7 +130,7 @@ GradientImageFilterGetInput()->GetSpacing()[i] == 0.0) { - itkExceptionMacro(<< "Image spacing cannot be zero."); + itkExceptionMacro("Image spacing cannot be zero."); } else { diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx index b9ce1b1107e..5e3bcf4b86e 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx @@ -123,7 +123,7 @@ GradientMagnitudeImageFilter::DynamicThreadedGenerate { if (this->GetInput()->GetSpacing()[i] == 0.0) { - itkExceptionMacro(<< "Image spacing cannot be zero."); + itkExceptionMacro("Image spacing cannot be zero."); } else { diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h index e25b17c4467..1321337b627 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h @@ -438,8 +438,8 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter : public ImageToIma } else { - itkExceptionMacro(<< "Undefined condition. Cubic root solver returned " << numberOfDistinctRoots - << " distinct roots."); + itkExceptionMacro("Undefined condition. Cubic root solver returned " << numberOfDistinctRoots + << " distinct roots."); } return ans; diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx index 8b14896ca40..9e754dc552e 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx @@ -142,7 +142,7 @@ VectorGradientMagnitudeImageFilter::Before { if (m_ComponentWeights[i] < 0) { - itkExceptionMacro(<< "Component weights must be positive numbers"); + itkExceptionMacro("Component weights must be positive numbers"); } m_SqrtComponentWeights[i] = std::sqrt(m_ComponentWeights[i]); } @@ -156,7 +156,7 @@ VectorGradientMagnitudeImageFilter::Before { if (static_cast(this->GetInput()->GetSpacing()[i]) == 0.0) { - itkExceptionMacro(<< "Image spacing in dimension " << i << " is zero."); + itkExceptionMacro("Image spacing in dimension " << i << " is zero."); } m_DerivativeWeights[i] = static_cast(1.0 / static_cast(this->GetInput()->GetSpacing()[i])); } diff --git a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx index 43a2bf3a4ef..acbc67d2afe 100644 --- a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx @@ -96,7 +96,7 @@ ExpandImageFilter::BeforeThreadedGenerateData() { if (!m_Interpolator || !this->GetInput()) { - itkExceptionMacro(<< "Interpolator and/or Input not set"); + itkExceptionMacro("Interpolator and/or Input not set"); } // Connect input image to interpolator diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx index 77b42dd348b..a4162eafa9c 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx @@ -83,7 +83,7 @@ InterpolateImageFilter::BeforeThreadedGenerateData() { if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator not set"); + itkExceptionMacro("Interpolator not set"); } // Create intermediate image @@ -182,7 +182,7 @@ InterpolateImageFilter::DynamicThreadedGenerateData( else { // should never be in here - itkExceptionMacro(<< "Index not within the intermediate buffer"); + itkExceptionMacro("Index not within the intermediate buffer"); } progress.CompletedPixel(); diff --git a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx index f0446f2fd20..47b85ff564b 100644 --- a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx +++ b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx @@ -68,7 +68,7 @@ PadImageFilterBase::GenerateInputRequestedRegion() // Ask the boundary condition for the input requested region. if (!m_BoundaryCondition) { - itkExceptionMacro(<< "Boundary condition is nullptr so no request region can be generated."); + itkExceptionMacro("Boundary condition is nullptr so no request region can be generated."); } InputImageRegionType inputRequestedRegion = m_BoundaryCondition->GetInputRequestedRegion(inputLargestPossibleRegion, outputRequestedRegion); diff --git a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx index adea4425121..73917646a38 100644 --- a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx @@ -525,7 +525,7 @@ ResampleImageFilter::VerifyInputInformation() ITKv5_CONST if (image.IsNull()) { - itkExceptionMacro(<< "Input not set as expected!"); + itkExceptionMacro("Input not set as expected!"); } const unsigned int numComponents = image->GetNumberOfComponentsPerPixel(); @@ -391,8 +391,9 @@ TileImageFilter::VerifyInputInformation() ITKv5_CONST if (numComponents != image->GetNumberOfComponentsPerPixel()) { - itkExceptionMacro(<< "Primary input has " << numComponents << " numberOfComponents " - << "but input " << idx << " has " << image->GetNumberOfComponentsPerPixel() << '!'); + itkExceptionMacro("Primary input has " << numComponents << " numberOfComponents " + << "but input " << idx << " has " << image->GetNumberOfComponentsPerPixel() + << '!'); } } } diff --git a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx index f28a6043c38..4e9a624fc1d 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx @@ -119,7 +119,7 @@ WarpImageFilter::BeforeThreadedGe { if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator not set"); + itkExceptionMacro("Interpolator not set"); } const DisplacementFieldType * fieldPtr = this->GetDisplacementField(); diff --git a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx index a3d5f955e6a..d4dbcf2a6b9 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx @@ -127,7 +127,7 @@ WarpVectorImageFilter::BeforeThre { if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator not set"); + itkExceptionMacro("Interpolator not set"); } // Connect input image to interpolator diff --git a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx index fcf0a463ad2..8e5303e2756 100644 --- a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx @@ -118,14 +118,14 @@ HistogramMatchingImageFilter:: { if (this->GetReferenceImage() == nullptr) { - itkExceptionMacro(<< "ReferenceImage required when GenerateReferenceHistogramFromImage is true."); + itkExceptionMacro("ReferenceImage required when GenerateReferenceHistogramFromImage is true."); } } else { if (this->GetReferenceHistogram() == nullptr) { - itkExceptionMacro(<< "ReferenceHistogram required when GenerateReferenceHistogramFromImage is false."); + itkExceptionMacro("ReferenceHistogram required when GenerateReferenceHistogramFromImage is false."); } } } @@ -146,7 +146,7 @@ HistogramMatchingImageFilter:: InputImageConstPointer reference = this->GetReferenceImage(); if (reference.IsNull()) { - itkExceptionMacro(<< "ERROR: ReferenceImage required when GenerateReferenceHistogramFromImage is true.\n"); + itkExceptionMacro("ERROR: ReferenceImage required when GenerateReferenceHistogramFromImage is true.\n"); } this->ComputeMinMaxMean(reference, m_ReferenceMinValue, m_ReferenceMaxValue, referenceMeanValue); if (m_ThresholdAtMeanIntensity) @@ -173,7 +173,7 @@ HistogramMatchingImageFilter:: const HistogramType * const referenceHistogram = this->GetReferenceHistogram(); if (referenceHistogram == nullptr) { - itkExceptionMacro(<< "ERROR: ReferenceHistogram required when GenerateReferenceHistogramFromImage is false.\n"); + itkExceptionMacro("ERROR: ReferenceHistogram required when GenerateReferenceHistogramFromImage is false.\n"); } // If the reference histogram is provided, then extract summary statistics diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h index 63bdcfcbd57..5d2f575c6f5 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h @@ -284,8 +284,8 @@ class ITK_TEMPLATE_EXPORT MaskImageFilter : public BinaryGeneratorImageFilterGetFunctor().GetOutsideValue().GetSize() != this->GetOutput()->GetVectorLength()) { - itkExceptionMacro(<< "Number of components in OutsideValue: " << this->GetFunctor().GetOutsideValue().GetSize() - << " is not the same as the " + itkExceptionMacro("Number of components in OutsideValue: " + << this->GetFunctor().GetOutsideValue().GetSize() << " is not the same as the " << "number of components in the image: " << this->GetOutput()->GetVectorLength()); } } diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h index 1ef3fa85431..2a626864f43 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h @@ -285,8 +285,8 @@ class ITK_TEMPLATE_EXPORT MaskNegatedImageFilter } else if (this->GetFunctor().GetOutsideValue().GetSize() != this->GetOutput()->GetVectorLength()) { - itkExceptionMacro(<< "Number of components in OutsideValue: " << this->GetFunctor().GetOutsideValue().GetSize() - << " is not the same as the " + itkExceptionMacro("Number of components in OutsideValue: " + << this->GetFunctor().GetOutsideValue().GetSize() << " is not the same as the " << "number of components in the image: " << this->GetOutput()->GetVectorLength()); } } diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx index 92d67af9898..e06d03bc7fd 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx @@ -98,7 +98,7 @@ PolylineMask2DImageFilter::GenerateData() const auto tmpIndex = outputImagePtr->TransformPhysicalPointToIndex(tmpVertex); if (!outputImagePtr->GetBufferedRegion().IsInside(tmpIndex)) { - itkExceptionMacro(<< "Polyline vertex is out of bounds (Vertex,Index): " << tmpVertex << ", " << tmpIndex); + itkExceptionMacro("Polyline vertex is out of bounds (Vertex,Index): " << tmpVertex << ", " << tmpIndex); } ++piter; } diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx index e51acb642d0..207e5d9a3c6 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx @@ -46,14 +46,14 @@ PolylineMaskImageFilter::Polyline // throw an exception otherwise. if ((TInputImage::ImageDimension != 3) || (TOutputImage::ImageDimension != 3)) { - itkExceptionMacro(<< "PolylineMaskImageFilter must be templated over " + itkExceptionMacro("PolylineMaskImageFilter must be templated over " << "input and output images of dimension 3"); } // View vectors must be of dimension 3 if (TVector::Length != 3) { - itkExceptionMacro(<< "PolylineMaskImageFilter must be templated over " + itkExceptionMacro("PolylineMaskImageFilter must be templated over " << "a view vector of length 3"); } } @@ -288,7 +288,7 @@ PolylineMaskImageFilter::Generate if (!boundingBox->ComputeBoundingBox()) { - itkExceptionMacro(<< "Bounding box computation error"); + itkExceptionMacro("Bounding box computation error"); } const BoundingBoxType::BoundsArrayType & bounds = boundingBox->GetBounds(); @@ -480,7 +480,7 @@ PolylineMaskImageFilter::Generate if (!projectionImagePtr->GetBufferedRegion().IsInside(projectionImageIndex)) { - itkExceptionMacro(<< "Projection Image index out of bound:" << projectionImageIndex); + itkExceptionMacro("Projection Image index out of bound:" << projectionImageIndex); } if (projectionImagePtr->GetPixel(projectionImageIndex) == f_val) diff --git a/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.hxx index dd5c2074698..863eb3d97bb 100644 --- a/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.hxx @@ -50,7 +50,7 @@ RescaleIntensityImageFilter::BeforeThreadedGenerateDa { if (this->m_OutputMinimum > this->m_OutputMaximum) { - itkExceptionMacro(<< "Minimum output value cannot be greater than Maximum output value."); + itkExceptionMacro("Minimum output value cannot be greater than Maximum output value."); } using CalculatorType = MinimumMaximumImageCalculator; diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx index 3f2695a0969..c613cb92741 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx @@ -98,7 +98,7 @@ VectorExpandImageFilter::BeforeThreadedGenerateData() { if (!m_Interpolator || !this->GetInput()) { - itkExceptionMacro(<< "Interpolator and/or Input not set"); + itkExceptionMacro("Interpolator and/or Input not set"); } // Connect input image to interpolator @@ -154,7 +154,7 @@ VectorExpandImageFilter::DynamicThreadedGenerateData( } else { - itkExceptionMacro(<< "Interpolator outside buffer should never occur "); + itkExceptionMacro("Interpolator outside buffer should never occur "); } progress.CompletedPixel(); } diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h index 822b2b4699d..727cf2c8d17 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h @@ -161,8 +161,8 @@ class VectorIndexSelectionCastImageFilter if (index >= numberOfComponents) { - itkExceptionMacro(<< "Selected index = " << index - << " is greater than the number of components = " << numberOfComponents); + itkExceptionMacro("Selected index = " << index + << " is greater than the number of components = " << numberOfComponents); } } }; diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx index 1733a9e5845..82351a4f353 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx @@ -47,7 +47,7 @@ VectorRescaleIntensityImageFilter::BeforeThreadedGene { if (m_OutputMaximumMagnitude < NumericTraits::ZeroValue()) { - itkExceptionMacro(<< "Maximum output value cannot be negative. You are passing " << m_OutputMaximumMagnitude); + itkExceptionMacro("Maximum output value cannot be negative. You are passing " << m_OutputMaximumMagnitude); } InputImagePointer inputImage = this->GetInput(); diff --git a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx index 7acc9d0c01a..3ec3851b561 100644 --- a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx +++ b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx @@ -81,7 +81,7 @@ PeakSignalToNoiseRatioCalculator::GetOutput() const { if (!m_Valid) { - itkExceptionMacro(<< "GetOutput() invoked, but the output have not been computed. Call Compute() first."); + itkExceptionMacro("GetOutput() invoked, but the output have not been computed. Call Compute() first."); } return m_Output; } diff --git a/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.hxx index e294d46ff70..b0767ce61f3 100644 --- a/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.hxx @@ -139,8 +139,8 @@ AccumulateImageFilter::GenerateData() { if (m_AccumulateDimension >= TInputImage::ImageDimension) { - itkExceptionMacro(<< "AccumulateImageFilter: invalid dimension to accumulate. AccumulateDimension = " - << m_AccumulateDimension); + itkExceptionMacro( + "AccumulateImageFilter: invalid dimension to accumulate. AccumulateDimension = " << m_AccumulateDimension); } using OutputPixelType = typename TOutputImage::PixelType; diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx index ad5dd2237bc..53a57e6c9f8 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx @@ -183,7 +183,7 @@ ImageMomentsCalculator::GetTotalMass() const -> ScalarType { if (!m_Valid) { - itkExceptionMacro(<< "GetTotalMass() invoked, but the moments have not been computed. Call Compute() first."); + itkExceptionMacro("GetTotalMass() invoked, but the moments have not been computed. Call Compute() first."); } return m_M0; } @@ -196,7 +196,7 @@ ImageMomentsCalculator::GetFirstMoments() const -> VectorType { if (!m_Valid) { - itkExceptionMacro(<< "GetFirstMoments() invoked, but the moments have not been computed. Call Compute() first."); + itkExceptionMacro("GetFirstMoments() invoked, but the moments have not been computed. Call Compute() first."); } return m_M1; } @@ -209,7 +209,7 @@ ImageMomentsCalculator::GetSecondMoments() const -> MatrixType { if (!m_Valid) { - itkExceptionMacro(<< "GetSecondMoments() invoked, but the moments have not been computed. Call Compute() first."); + itkExceptionMacro("GetSecondMoments() invoked, but the moments have not been computed. Call Compute() first."); } return m_M2; } @@ -222,7 +222,7 @@ ImageMomentsCalculator::GetCenterOfGravity() const -> VectorType { if (!m_Valid) { - itkExceptionMacro(<< "GetCenterOfGravity() invoked, but the moments have not been computed. Call Compute() first."); + itkExceptionMacro("GetCenterOfGravity() invoked, but the moments have not been computed. Call Compute() first."); } return m_Cg; } @@ -235,7 +235,7 @@ ImageMomentsCalculator::GetCentralMoments() const -> MatrixType { if (!m_Valid) { - itkExceptionMacro(<< "GetCentralMoments() invoked, but the moments have not been computed. Call Compute() first."); + itkExceptionMacro("GetCentralMoments() invoked, but the moments have not been computed. Call Compute() first."); } return m_Cm; } @@ -262,7 +262,7 @@ ImageMomentsCalculator::GetPrincipalAxes() const -> MatrixType { if (!m_Valid) { - itkExceptionMacro(<< "GetPrincipalAxes() invoked, but the moments have not been computed. Call Compute() first."); + itkExceptionMacro("GetPrincipalAxes() invoked, but the moments have not been computed. Call Compute() first."); } return m_Pa; } diff --git a/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx index 41b558d0077..5ce0515155a 100644 --- a/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx @@ -41,8 +41,8 @@ ProjectionImageFilter::GenerateOutputIn if (m_ProjectionDimension >= TInputImage::ImageDimension) { - itkExceptionMacro(<< "Invalid ProjectionDimension. ProjectionDimension is " << m_ProjectionDimension - << " but input ImageDimension is " << TInputImage::ImageDimension); + itkExceptionMacro("Invalid ProjectionDimension. ProjectionDimension is " + << m_ProjectionDimension << " but input ImageDimension is " << TInputImage::ImageDimension); } typename TInputImage::IndexType inputIndex; @@ -131,8 +131,8 @@ ProjectionImageFilter::GenerateInputReq if (m_ProjectionDimension >= TInputImage::ImageDimension) { - itkExceptionMacro(<< "Invalid ProjectionDimension " << m_ProjectionDimension << " but ImageDimension is " - << TInputImage::ImageDimension); + itkExceptionMacro("Invalid ProjectionDimension " << m_ProjectionDimension << " but ImageDimension is " + << TInputImage::ImageDimension); } Superclass::GenerateInputRequestedRegion(); @@ -206,8 +206,8 @@ ProjectionImageFilter::DynamicThreadedG { if (m_ProjectionDimension >= TInputImage::ImageDimension) { - itkExceptionMacro(<< "Invalid ProjectionDimension " << m_ProjectionDimension << " but ImageDimension is " - << TInputImage::ImageDimension); + itkExceptionMacro("Invalid ProjectionDimension " << m_ProjectionDimension << " but ImageDimension is " + << TInputImage::ImageDimension); } using OutputPixelType = typename TOutputImage::PixelType; diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx index 0f779800239..56211024c8b 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx @@ -119,10 +119,10 @@ BinaryImageToLabelMapFilter::GenerateData() // check for overflow exception here if (m_NumberOfObjects > static_cast(NumericTraits::max())) { - itkExceptionMacro(<< "Number of objects (" << m_NumberOfObjects << ") greater than maximum of output pixel type (" - << static_cast::PrintType>( - NumericTraits::max()) - << ")."); + itkExceptionMacro("Number of objects (" << m_NumberOfObjects << ") greater than maximum of output pixel type (" + << static_cast::PrintType>( + NumericTraits::max()) + << ")."); } for (SizeValueType thisIdx = 0; thisIdx < linecount; ++thisIdx) diff --git a/Modules/Filtering/LabelMap/include/itkLabelMap.hxx b/Modules/Filtering/LabelMap/include/itkLabelMap.hxx index ad29ca5a432..f9f8a02f7ed 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMap.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMap.hxx @@ -107,8 +107,8 @@ LabelMap::Graft(const DataObject * data) if (imgData == nullptr) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LabelMap::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(const Self *).name()); + itkExceptionMacro("itk::LabelMap::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(const Self *).name()); } this->Graft(imgData); } @@ -120,14 +120,14 @@ LabelMap::GetLabelObject(const LabelType & label) -> LabelObjectTy { if (m_BackgroundValue == label) { - itkExceptionMacro(<< "Label " << static_cast::PrintType>(label) - << " is the background label."); + itkExceptionMacro("Label " << static_cast::PrintType>(label) + << " is the background label."); } auto it = m_LabelObjectContainer.find(label); if (it == m_LabelObjectContainer.end()) { - itkExceptionMacro(<< "No label object with label " - << static_cast::PrintType>(label) << '.'); + itkExceptionMacro("No label object with label " << static_cast::PrintType>(label) + << '.'); } return it->second; @@ -140,14 +140,14 @@ LabelMap::GetLabelObject(const LabelType & label) const -> const L { if (m_BackgroundValue == label) { - itkExceptionMacro(<< "Label " << static_cast::PrintType>(label) - << " is the background label."); + itkExceptionMacro("Label " << static_cast::PrintType>(label) + << " is the background label."); } auto it = m_LabelObjectContainer.find(label); if (it == m_LabelObjectContainer.end()) { - itkExceptionMacro(<< "No label object with label " - << static_cast::PrintType>(label) << '.'); + itkExceptionMacro("No label object with label " << static_cast::PrintType>(label) + << '.'); } return it->second; @@ -193,8 +193,9 @@ LabelMap::GetNthLabelObject(const SizeValueType & pos) -> LabelObj } ++i; } - itkExceptionMacro(<< "Can't access to label object at position " << pos << ". The label map has only " - << this->GetNumberOfLabelObjects() << " label objects registered."); + itkExceptionMacro("Can't access to label object at position " << pos << ". The label map has only " + << this->GetNumberOfLabelObjects() + << " label objects registered."); } @@ -212,8 +213,9 @@ LabelMap::GetNthLabelObject(const SizeValueType & pos) const -> co } ++i; } - itkExceptionMacro(<< "Can't access to label object at position " << pos << ". The label map has only " - << this->GetNumberOfLabelObjects() << " label objects registered."); + itkExceptionMacro("Can't access to label object at position " << pos << ". The label map has only " + << this->GetNumberOfLabelObjects() + << " label objects registered."); } @@ -379,7 +381,7 @@ LabelMap::GetLabelObject(const IndexType & idx) const -> LabelObje return it->second.GetPointer(); } } - itkExceptionMacro(<< "No label object at index " << idx << '.'); + itkExceptionMacro("No label object at index " << idx << '.'); // return nullptr; } @@ -449,7 +451,7 @@ LabelMap::PushLabelObject(LabelObjectType * labelObject) } if (label == lastLabel) { - itkExceptionMacro(<< "Can't push the label object: the label map is full."); + itkExceptionMacro("Can't push the label object: the label map is full."); } } } @@ -474,8 +476,8 @@ LabelMap::RemoveLabel(const LabelType & label) { if (m_BackgroundValue == label) { - itkExceptionMacro(<< "Label " << static_cast::PrintType>(label) - << " is the background label."); + itkExceptionMacro("Label " << static_cast::PrintType>(label) + << " is the background label."); } m_LabelObjectContainer.erase(label); this->Modified(); diff --git a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx index 9540439da57..48d08ae0044 100644 --- a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx @@ -60,7 +60,7 @@ MergeLabelMapFilter::GenerateData() } default: { - itkExceptionMacro(<< "No such method: " << this->m_Method); + itkExceptionMacro("No such method: " << this->m_Method); } } } @@ -137,9 +137,9 @@ MergeLabelMapFilter::MergeWithStrict() } else { - itkExceptionMacro(<< "Label " - << static_cast::PrintType>(newLo->GetLabel()) - << " from input " << i << " is already in use."); + itkExceptionMacro( + "Label " << static_cast::PrintType>(newLo->GetLabel()) + << " from input " << i << " is already in use."); } } else diff --git a/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.hxx index 7a61153e5c6..11c5f301e76 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.hxx @@ -41,7 +41,7 @@ ShapeKeepNObjectsLabelMapFilter::GenerateData() { switch (m_Attribute) { - itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro(<< "Unknown attribute type"); + itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro("Unknown attribute type"); break; } } diff --git a/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.hxx index ac90cecd8c3..560f2b4972e 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.hxx @@ -40,7 +40,7 @@ ShapeOpeningLabelMapFilter::GenerateData() { switch (m_Attribute) { - itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro(<< "Unknown attribute type"); + itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro("Unknown attribute type"); break; } } diff --git a/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.hxx index fb2737d8910..e3b880320a5 100644 --- a/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.hxx @@ -45,7 +45,7 @@ ShapePositionLabelMapFilter::ThreadedProcessLabelObject(LabelObjectType break; } default: - itkExceptionMacro(<< "Unknown attribute type"); + itkExceptionMacro("Unknown attribute type"); break; } } diff --git a/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.hxx index cd01916f495..67490d3a91f 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.hxx @@ -35,7 +35,7 @@ ShapeRelabelLabelMapFilter::GenerateData() { switch (m_Attribute) { - itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro(<< "Unknown attribute type"); + itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro("Unknown attribute type"); break; } } diff --git a/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.hxx index 8f119cc8aa8..8ea732643fb 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.hxx @@ -35,7 +35,7 @@ ShapeUniqueLabelMapFilter::GenerateData() { switch (m_Attribute) { - itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro(<< "Unknown attribute type"); + itkShapeLabelMapFilterDispatchMacro() default : itkExceptionMacro("Unknown attribute type"); break; } } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx index 4cad1fd4a9d..77c191224bd 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx @@ -128,7 +128,7 @@ GrayscaleDilateImageFilter::SetAlgorithm(Alg } else { - itkExceptionMacro(<< "Invalid algorithm"); + itkExceptionMacro("Invalid algorithm"); } m_Algorithm = algo; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx index 588ff143c82..4a221313ff8 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx @@ -128,7 +128,7 @@ GrayscaleErodeImageFilter::SetAlgorithm(Algo } else { - itkExceptionMacro(<< "Invalid algorithm"); + itkExceptionMacro("Invalid algorithm"); } m_Algorithm = algo; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx index 924aa9e5edc..c259e5a4c49 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx @@ -114,7 +114,7 @@ GrayscaleMorphologicalClosingImageFilter::Se } else { - itkExceptionMacro(<< "Invalid algorithm"); + itkExceptionMacro("Invalid algorithm"); } m_Algorithm = algo; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx index 294f7e112d6..e3518da0ad5 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx @@ -111,7 +111,7 @@ GrayscaleMorphologicalOpeningImageFilter::Se } else { - itkExceptionMacro(<< "Invalid algorithm"); + itkExceptionMacro("Invalid algorithm"); } m_Algorithm = algo; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx index 6b830a6e51e..bdcd24e1f31 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx @@ -110,7 +110,7 @@ MorphologicalGradientImageFilter::SetAlgorit } else { - itkExceptionMacro(<< "Invalid algorithm"); + itkExceptionMacro("Invalid algorithm"); } m_Algorithm = algo; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx index 70dd995d319..226a0e6a07a 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx @@ -86,7 +86,7 @@ ReconstructionImageFilter::GenerateData() // mask and marker must have the same size if (this->GetMarkerImage()->GetRequestedRegion().GetSize() != this->GetMaskImage()->GetRequestedRegion().GetSize()) { - itkExceptionMacro(<< "Marker and mask must have the same size."); + itkExceptionMacro("Marker and mask must have the same size."); } // create padded versions of the marker image and the mask image @@ -190,11 +190,11 @@ ReconstructionImageFilter::GenerateData() { if (compare(0, 1)) { - itkExceptionMacro(<< "Marker pixels must be <= mask pixels."); + itkExceptionMacro("Marker pixels must be <= mask pixels."); } else { - itkExceptionMacro(<< "Marker pixels must be >= mask pixels."); + itkExceptionMacro("Marker pixels must be >= mask pixels."); } } diff --git a/Modules/Filtering/Path/include/itkParametricPath.hxx b/Modules/Filtering/Path/include/itkParametricPath.hxx index 3f929b1ed81..a4de923a56c 100644 --- a/Modules/Filtering/Path/include/itkParametricPath.hxx +++ b/Modules/Filtering/Path/include/itkParametricPath.hxx @@ -79,7 +79,7 @@ ParametricPath::IncrementInput(InputType & input) const -> OffsetTyp { if (iterationCount++ > 10000) { - itkExceptionMacro(<< "Too many iterations"); + itkExceptionMacro("Too many iterations"); } nextImageIndex = this->EvaluateToIndex(input + inputStepSize); diff --git a/Modules/Filtering/Path/include/itkPathToImageFilter.hxx b/Modules/Filtering/Path/include/itkPathToImageFilter.hxx index 95f6ca34c76..13fa04279d2 100644 --- a/Modules/Filtering/Path/include/itkPathToImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkPathToImageFilter.hxx @@ -230,7 +230,7 @@ PathToImageFilter::GenerateData() } else { - itkExceptionMacro(<< "Currently, the user MUST specify an image size"); + itkExceptionMacro("Currently, the user MUST specify an image size"); // region.SetSize( size ); } region.SetIndex({ { 0 } }); @@ -258,7 +258,7 @@ PathToImageFilter::GenerateData() } else { - itkExceptionMacro(<< "Currently, the user MUST specify an image spacing"); + itkExceptionMacro("Currently, the user MUST specify an image spacing"); // OutputImage->SetSpacing(InputObject->GetIndexToObjectTransform()->GetScaleComponent()); // // set spacing } diff --git a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx index 08d3acd7a32..b8bbb4bb1fb 100644 --- a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx @@ -91,7 +91,7 @@ RecursiveGaussianImageFilter::SetUp(ScalarRealType sp if (spacing < spacingTolerance) { - itkExceptionMacro(<< "The spacing " << spacing << "is suspiciosly small in this image"); + itkExceptionMacro("The spacing " << spacing << "is suspiciosly small in this image"); } const ScalarRealType sigmad = m_Sigma / spacing; @@ -200,7 +200,7 @@ RecursiveGaussianImageFilter::SetUp(ScalarRealType sp } default: { - itkExceptionMacro(<< "Unknown Order"); + itkExceptionMacro("Unknown Order"); } } } diff --git a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx index 98b7c0133d9..24218b4c933 100644 --- a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx @@ -218,7 +218,7 @@ BinaryThresholdImageFilter::BeforeThreadedGenerateDat if (lowerThreshold->Get() > upperThreshold->Get()) { - itkExceptionMacro(<< "Lower threshold cannot be greater than upper threshold."); + itkExceptionMacro("Lower threshold cannot be greater than upper threshold."); } // Set up the functor diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h index 80ada7b7a15..4862f55b9a2 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h @@ -105,7 +105,7 @@ class HistogramThresholdCalculator : public ProcessObject { if (this->GetNumberOfOutputs() < 1) { - itkExceptionMacro(<< "No output available."); + itkExceptionMacro("No output available."); } return static_cast(this->ProcessObject::GetOutput(0))->Get(); } diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h index c9f8135d22d..607b20a9ebf 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h @@ -206,7 +206,7 @@ class ITK_TEMPLATE_EXPORT HistogramThresholdImageFilter : public ImageToImageFil Superclass::VerifyPreconditions(); if (m_Calculator.IsNull()) { - itkExceptionMacro(<< "No threshold calculator set."); + itkExceptionMacro("No threshold calculator set."); } } diff --git a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx index 43d464ed377..a303e207c85 100644 --- a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx @@ -35,7 +35,7 @@ HuangThresholdCalculator::GenerateData() TotalAbsoluteFrequencyType total = histogram->GetTotalFrequency(); if (total == NumericTraits::ZeroValue()) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } m_Size = histogram->GetSize(0); ProgressReporter progress(this, 0, m_Size); diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx index d0051cc641c..45e77193145 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx @@ -53,7 +53,7 @@ IntermodesThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } SizeValueType size = histogram->GetSize(0); diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h index e2b1f5e8013..6df032c5959 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h @@ -123,7 +123,7 @@ class ITK_TEMPLATE_EXPORT IntermodesThresholdImageFilter Superclass::VerifyPreconditions(); if (dynamic_cast(Superclass::GetCalculator()) == nullptr) { - itkExceptionMacro(<< "Invalid IntermodesCalculator."); + itkExceptionMacro("Invalid IntermodesCalculator."); } } diff --git a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx index dd1c4f64bff..0e968ffae4f 100644 --- a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx @@ -33,7 +33,7 @@ IsoDataThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } SizeValueType size = histogram->GetSize(0); ProgressReporter progress(this, 0, size); diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx index 6a0fb82055c..7e96d9152c4 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx @@ -105,7 +105,7 @@ KappaSigmaThresholdImageCalculator::GetOutput() const - { if (!this->m_Valid) { - itkExceptionMacro(<< "GetOutput() invoked, but the output have not been computed. Call Compute() first."); + itkExceptionMacro("GetOutput() invoked, but the output have not been computed. Call Compute() first."); } return this->m_Output; } diff --git a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx index 543b2e49176..6f333d6c7d3 100644 --- a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx @@ -102,7 +102,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } SizeValueType size = histogram->GetSize(0); ProgressReporter progress(this, 0, size); @@ -193,7 +193,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() } else { - itkExceptionMacro(<< "KittlerIllingworthThresholdCalculator failed to lookup threshold"); + itkExceptionMacro("KittlerIllingworthThresholdCalculator failed to lookup threshold"); } } else @@ -222,7 +222,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() } else { - itkExceptionMacro(<< "KittlerIllingworthThresholdCalculator failed to lookup threshold"); + itkExceptionMacro("KittlerIllingworthThresholdCalculator failed to lookup threshold"); } } } diff --git a/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx index 8bf33041f1a..e19c533be00 100644 --- a/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx @@ -34,7 +34,7 @@ LiThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } ProgressReporter progress(this, 0, histogram->GetSize(0)); if (histogram->GetSize(0) == 1) diff --git a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx index 3d09c62114e..a666b9f35cb 100644 --- a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx @@ -33,7 +33,7 @@ MaximumEntropyThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } ProgressReporter progress(this, 0, histogram->GetSize(0)); if (histogram->GetSize(0) == 1) diff --git a/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx index 96584e1976d..4fe0ded8420 100644 --- a/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx @@ -33,7 +33,7 @@ MomentsThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } ProgressReporter progress(this, 0, histogram->GetSize(0)); if (histogram->GetSize(0) == 1) diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx index bcdf27b2b0f..3d258355f2e 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx @@ -143,7 +143,7 @@ OtsuMultipleThresholdsCalculator::Compute() // and the user could specify the dimension to apply the algorithm to. if (histogram->GetSize().Size() != 1) { - itkExceptionMacro(<< "Histogram must be 1-dimensional."); + itkExceptionMacro("Histogram must be 1-dimensional."); } // Compute global mean diff --git a/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h index 95da2e6b574..1829ceda417 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT OtsuThresholdImageFilter Superclass::VerifyPreconditions(); if (dynamic_cast(Superclass::GetCalculator()) == nullptr) { - itkExceptionMacro(<< "Invalid OtsuThresholdCalculator."); + itkExceptionMacro("Invalid OtsuThresholdCalculator."); } } diff --git a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx index 9174e7bbb77..65a417ea6b7 100644 --- a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx @@ -34,7 +34,7 @@ RenyiEntropyThresholdCalculator::GenerateData() TotalAbsoluteFrequencyType total = histogram->GetTotalFrequency(); if (total == NumericTraits::ZeroValue()) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } m_Size = histogram->GetSize(0); ProgressReporter progress(this, 0, m_Size); diff --git a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx index 738c6bfc536..564e3343834 100644 --- a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx @@ -33,7 +33,7 @@ ShanbhagThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } ProgressReporter progress(this, 0, histogram->GetSize(0)); if (histogram->GetSize(0) == 1) diff --git a/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx index 620d4f03404..780a84f400a 100644 --- a/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx @@ -79,7 +79,7 @@ ThresholdImageFilter::ThresholdOutside(const PixelType & lower, const Pi { if (lower > upper) { - itkExceptionMacro(<< "Lower threshold cannot be greater than upper threshold."); + itkExceptionMacro("Lower threshold cannot be greater than upper threshold."); } if (Math::NotExactlyEquals(m_Lower, lower) || Math::NotExactlyEquals(m_Upper, upper)) diff --git a/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.hxx index 39f06c3638c..62bed06168a 100644 --- a/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.hxx @@ -51,7 +51,7 @@ ThresholdLabelerImageFilter::BeforeThreadedGenerateDa { if (m_Thresholds[i - 1] > m_Thresholds[i]) { - itkExceptionMacro(<< "Thresholds must be sorted."); + itkExceptionMacro("Thresholds must be sorted."); } } diff --git a/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx index 99419c18a02..53b5e5968d8 100644 --- a/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx @@ -34,7 +34,7 @@ TriangleThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } ProgressReporter progress(this, 0, histogram->GetSize(0)); if (histogram->GetSize(0) == 1) diff --git a/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx index 0c2900b38c7..4769b1c7896 100644 --- a/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx @@ -33,7 +33,7 @@ YenThresholdCalculator::GenerateData() if (histogram->GetTotalFrequency() == 0) { - itkExceptionMacro(<< "Histogram is empty"); + itkExceptionMacro("Histogram is empty"); } ProgressReporter progress(this, 0, histogram->GetSize(0)); if (histogram->GetSize(0) == 1) diff --git a/Modules/IO/BMP/src/itkBMPImageIO.cxx b/Modules/IO/BMP/src/itkBMPImageIO.cxx index 12d67902743..1200a2d8693 100644 --- a/Modules/IO/BMP/src/itkBMPImageIO.cxx +++ b/Modules/IO/BMP/src/itkBMPImageIO.cxx @@ -392,7 +392,7 @@ BMPImageIO::ReadImageInformation() // error checking if ((infoSize != 40) && (infoSize != 12)) { - itkExceptionMacro(<< "Unknown file type! " << m_FileName.c_str() << " is not a Windows BMP file!"); + itkExceptionMacro("Unknown file type! " << m_FileName.c_str() << " is not a Windows BMP file!"); } // there are two different types of BMP files @@ -424,7 +424,7 @@ BMPImageIO::ReadImageInformation() // error checking if ((infoSize != 40) && (infoSize != 12)) { - itkExceptionMacro(<< "Unknown file type! " << m_FileName.c_str() << " is not a Windows BMP file!"); + itkExceptionMacro("Unknown file type! " << m_FileName.c_str() << " is not a Windows BMP file!"); } // there are two different types of BMP files @@ -649,7 +649,7 @@ BMPImageIO::SwapBytesIfNecessary(void * buffer, SizeValueType numberOfPixels) break; } default: - itkExceptionMacro(<< "Pixel Type Unknown"); + itkExceptionMacro("Pixel Type Unknown"); } } @@ -703,16 +703,16 @@ BMPImageIO::Write(const void * buffer) if (nDims != 2) { - itkExceptionMacro(<< "BMPImageIO cannot write images with a dimension != 2"); + itkExceptionMacro("BMPImageIO cannot write images with a dimension != 2"); } if (this->GetComponentType() != IOComponentEnum::UCHAR) { - itkExceptionMacro(<< "BMPImageIO supports unsigned char only"); + itkExceptionMacro("BMPImageIO supports unsigned char only"); } if ((this->m_NumberOfComponents != 1) && (this->m_NumberOfComponents != 3) && (this->m_NumberOfComponents != 4)) { - itkExceptionMacro(<< "BMPImageIO supports 1,3 or 4 components only"); + itkExceptionMacro("BMPImageIO supports 1,3 or 4 components only"); } this->OpenFileForWriting(m_Ofstream, m_FileName); @@ -819,7 +819,7 @@ BMPImageIO::Write(const void * buffer) numberOfBitsPerPixel = 8; break; default: - itkExceptionMacro(<< "Number of components not supported."); + itkExceptionMacro("Number of components not supported."); } this->Write16BitsInteger(numberOfBitsPerPixel); diff --git a/Modules/IO/BioRad/src/itkBioRadImageIO.cxx b/Modules/IO/BioRad/src/itkBioRadImageIO.cxx index 37f4c57e953..9f02ae29ef2 100644 --- a/Modules/IO/BioRad/src/itkBioRadImageIO.cxx +++ b/Modules/IO/BioRad/src/itkBioRadImageIO.cxx @@ -182,8 +182,8 @@ BioRadImageIO::Read(void * buffer) if (!this->ReadBufferAsBinary(file, buffer, this->GetImageSizeInBytes())) { - itkExceptionMacro(<< "Read failed: Wanted " << this->GetImageSizeInBytes() << " bytes, but read " << file.gcount() - << " bytes."); + itkExceptionMacro("Read failed: Wanted " << this->GetImageSizeInBytes() << " bytes, but read " << file.gcount() + << " bytes."); } // byte swapping depending on pixel type: @@ -208,7 +208,7 @@ BioRadImageIO::InternalReadImageInformation(std::ifstream & file) p = &h; if (sizeof(h) != BIORAD_HEADER_LENGTH) { - itkExceptionMacro(<< "Problem of alignement on your platform"); + itkExceptionMacro("Problem of alignement on your platform"); } file.seekg(0, std::ios::beg); file.read((char *)p, BIORAD_HEADER_LENGTH); @@ -272,7 +272,7 @@ BioRadImageIO::InternalReadImageInformation(std::ifstream & file) else { SetComponentType(IOComponentEnum::UNKNOWNCOMPONENTTYPE); - itkExceptionMacro(<< "Cannot read requested file"); + itkExceptionMacro("Cannot read requested file"); } } int punt(0); @@ -405,7 +405,7 @@ BioRadImageIO::Write(const void * buffer) unsigned int numDims = this->GetNumberOfDimensions(); if (numDims != 3 && numDims != 2) { - itkExceptionMacro(<< "BioRad Writer can only write 2 or 3-dimensional images"); + itkExceptionMacro("BioRad Writer can only write 2 or 3-dimensional images"); } // Write the BioRad header information @@ -413,7 +413,7 @@ BioRadImageIO::Write(const void * buffer) p = &header; if (sizeof(header) != BIORAD_HEADER_LENGTH) { - itkExceptionMacro(<< "Problem of alignement on your platform"); + itkExceptionMacro("Problem of alignement on your platform"); } memset(p, 0, BIORAD_HEADER_LENGTH); // Set everything to zero // In particular `notes' needs to be set to zero to indicate there is no notes @@ -452,7 +452,7 @@ BioRadImageIO::Write(const void * buffer) header.ramp2_max = 65535; break; default: - itkExceptionMacro(<< "Component type not supported."); + itkExceptionMacro("Component type not supported."); } // write the actual header ByteSwapper::SwapRangeFromSystemToLittleEndian(reinterpret_cast(p), diff --git a/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx b/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx index 1f02e5f42cc..83cf39585ed 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx +++ b/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx @@ -45,7 +45,7 @@ CSVArray2DDataObject::GetRowIndexByName(const std::string & row_name) con { if (!this->m_HasRowHeaders) { - itkExceptionMacro(<< "The dataset does not contain any row headers!"); + itkExceptionMacro("The dataset does not contain any row headers!"); } const auto it = std::find(this->m_RowHeaders.begin(), this->m_RowHeaders.end(), row_name); @@ -53,7 +53,7 @@ CSVArray2DDataObject::GetRowIndexByName(const std::string & row_name) con if (it == this->m_RowHeaders.end()) { - itkExceptionMacro(<< "The row name " << row_name << " does not exist. "); + itkExceptionMacro("The row name " << row_name << " does not exist. "); } return index; } @@ -64,7 +64,7 @@ CSVArray2DDataObject::GetColumnIndexByName(const std::string & column_nam { if (!this->m_HasColumnHeaders) { - itkExceptionMacro(<< "The dataset does not contain any column headers!"); + itkExceptionMacro("The dataset does not contain any column headers!"); } const auto it = std::find(this->m_ColumnHeaders.begin(), this->m_ColumnHeaders.end(), column_name); @@ -72,7 +72,7 @@ CSVArray2DDataObject::GetColumnIndexByName(const std::string & column_nam if (it == this->m_ColumnHeaders.end()) { - itkExceptionMacro(<< "The column name " << column_name << " does not exist."); + itkExceptionMacro("The column name " << column_name << " does not exist."); } return index; } @@ -85,7 +85,7 @@ CSVArray2DDataObject::GetRow(const unsigned int row_index) const -> Numer unsigned int max_rows = this->m_Matrix.rows() - 1; if (row_index > max_rows) { - itkExceptionMacro(<< " Row index: " << row_index << " exceeds matrix dimension: " << max_rows); + itkExceptionMacro(" Row index: " << row_index << " exceeds matrix dimension: " << max_rows); } unsigned int vector_size = this->m_Matrix.cols(); for (unsigned int i = 0; i < vector_size; ++i) @@ -113,7 +113,7 @@ CSVArray2DDataObject::GetColumn(const unsigned int column_index) const -> unsigned int max_columns = this->m_Matrix.columns() - 1; if (column_index > max_columns) { - itkExceptionMacro(<< "Column index: " << column_index << " exceeds matrix dimension: " << max_columns); + itkExceptionMacro("Column index: " << column_index << " exceeds matrix dimension: " << max_columns); } unsigned int vector_size = this->m_Matrix.rows(); for (unsigned int i = 0; i < vector_size; ++i) @@ -140,11 +140,11 @@ CSVArray2DDataObject::GetData(const unsigned int row, const unsigned int { if (row > this->m_Matrix.rows() - 1) { - itkExceptionMacro(<< " Row index: " << row << " exceeds row dimension: " << this->m_Matrix.rows() - 1); + itkExceptionMacro(" Row index: " << row << " exceeds row dimension: " << this->m_Matrix.rows() - 1); } else if (column > this->m_Matrix.cols() - 1) { - itkExceptionMacro(<< " Column index: " << column << " exceeds column dimension: " << this->m_Matrix.columns() - 1); + itkExceptionMacro(" Column index: " << column << " exceeds column dimension: " << this->m_Matrix.columns() - 1); } return this->m_Matrix[row][column]; } diff --git a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx index dd414aca70e..65937e3e873 100644 --- a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx +++ b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx @@ -95,13 +95,13 @@ CSVNumericObjectFileWriter::PrepareForWriting() // throw an exception if no filename is provided if (this->m_FileName.empty()) { - itkExceptionMacro(<< "A filename for writing was not specified!"); + itkExceptionMacro("A filename for writing was not specified!"); } // throw an exception if no input object is provided if (this->m_InputObject == nullptr) { - itkExceptionMacro(<< "An input object was not specified!"); + itkExceptionMacro("An input object was not specified!"); } // output a warning if the number of row headers and number of rows in the diff --git a/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx b/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx index cae6dc8ad40..e2295622a33 100644 --- a/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx +++ b/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx @@ -52,7 +52,7 @@ CSVFileReaderBase::PrepareForParsing() { if (this->m_FileName.empty()) { - itkExceptionMacro(<< "There is no file name provided!" + itkExceptionMacro("There is no file name provided!" << "Please provide a filename."); } @@ -63,7 +63,7 @@ CSVFileReaderBase::PrepareForParsing() if (this->m_UseStringDelimiterCharacter && this->m_FieldDelimiterCharacter == this->m_StringDelimiterCharacter) { - itkExceptionMacro(<< "The same character has been set for the string delimiter and the field delimiter character!"); + itkExceptionMacro("The same character has been set for the string delimiter and the field delimiter character!"); } } @@ -283,7 +283,7 @@ CSVFileReaderBase::GetNextField(std::string & str) // Alert the user if end of file is reached else { - itkExceptionMacro(<< "End of file reached. No more entries"); + itkExceptionMacro("End of file reached. No more entries"); } } diff --git a/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx b/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx index 2b1792582fa..9aebc33bd57 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx @@ -91,7 +91,7 @@ DCMTKImageIO::SetLogLevel(LogLevelEnum level) OFLog::configure(OFLogger::OFF_LOG_LEVEL); break; default: - itkExceptionMacro(<< "Unknown DCMTK Logging constant " << static_cast(level)); + itkExceptionMacro("Unknown DCMTK Logging constant " << static_cast(level)); } } @@ -264,7 +264,7 @@ DCMTKImageIO::OpenDicomImage() } if (this->m_DImage == nullptr) { - itkExceptionMacro(<< "Can't create DicomImage for " << this->m_FileName); + itkExceptionMacro("Can't create DicomImage for " << this->m_FileName); } } @@ -276,7 +276,7 @@ DCMTKImageIO::Read(void * buffer) this->OpenDicomImage(); if (m_DImage->getStatus() != EIS_Normal) { - itkExceptionMacro(<< "Error: cannot load DICOM image (" << DicomImage::getString(m_DImage->getStatus()) << ')'); + itkExceptionMacro("Error: cannot load DICOM image (" << DicomImage::getString(m_DImage->getStatus()) << ')'); } m_Dimensions[0] = static_cast(m_DImage->getWidth()); @@ -287,7 +287,7 @@ DCMTKImageIO::Read(void * buffer) case IOComponentEnum::UNKNOWNCOMPONENTTYPE: case IOComponentEnum::FLOAT: case IOComponentEnum::DOUBLE: - itkExceptionMacro(<< "Bad component type" << ImageIOBase::GetComponentTypeAsString(this->m_ComponentType)); + itkExceptionMacro("Bad component type" << ImageIOBase::GetComponentTypeAsString(this->m_ComponentType)); break; default: // scalarSize already set break; @@ -328,7 +328,7 @@ DCMTKImageIO::ReorderRGBValues(void * buffer, const void * data, size_t count, u ReorderRGBValues(buffer, data, count, voxel_size); break; default: - itkExceptionMacro(<< "Only unsigned integer pixel types are supported. Bad component type for color image" + itkExceptionMacro("Only unsigned integer pixel types are supported. Bad component type for color image" << ImageIOBase::GetComponentTypeAsString(this->m_ComponentType)); break; } @@ -459,7 +459,7 @@ DCMTKImageIO::ReadImageInformation() if (interData == nullptr) { - itkExceptionMacro(<< "Missing Image Data in " << this->m_FileName); + itkExceptionMacro("Missing Image Data in " << this->m_FileName); } EP_Representation pixelRep = this->m_DImage->getInterData()->getRepresentation(); diff --git a/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx b/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx index f9a9d8a541b..736912f3edd 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx @@ -43,7 +43,7 @@ DCMTKSeriesFileNames::SetInputDirectory(const char * name) { if (!name) { - itkExceptionMacro(<< "SetInputDirectory() received a nullptr string"); + itkExceptionMacro("SetInputDirectory() received a nullptr string"); } std::string fname = name; this->SetInputDirectory(fname); diff --git a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx index 65d11c29be2..dee53815ded 100644 --- a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx +++ b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx @@ -290,7 +290,7 @@ GDCMImageIO::Read(void * pointer) reader.SetFileName(m_FileName.c_str()); if (!reader.Read()) { - itkExceptionMacro(<< "Cannot read requested file"); + itkExceptionMacro("Cannot read requested file"); } gdcm::Image & image = reader.GetImage(); @@ -308,7 +308,7 @@ GDCMImageIO::Read(void * pointer) icts.SetTransferSyntax(gdcm::TransferSyntax::ImplicitVRLittleEndian); if (!icts.Change()) { - itkExceptionMacro(<< "Failed to change to Implicit Transfer Syntax"); + itkExceptionMacro("Failed to change to Implicit Transfer Syntax"); } image = icts.GetOutput(); } @@ -321,7 +321,7 @@ GDCMImageIO::Read(void * pointer) icpc.SetPlanarConfiguration(0); if (!icpc.Change()) { - itkExceptionMacro(<< "Failed to change to Planar Configuration"); + itkExceptionMacro("Failed to change to Planar Configuration"); } image = icpc.GetOutput(); } @@ -333,7 +333,7 @@ GDCMImageIO::Read(void * pointer) const size_t x = m_Dimensions[0] * m_Dimensions[1] * m_Dimensions[2]; if (x > len * 8) { - itkExceptionMacro(<< "Failed to load SINGLEBIT image, buffer size " << len); + itkExceptionMacro("Failed to load SINGLEBIT image, buffer size " << len); } len = x; } @@ -354,7 +354,7 @@ GDCMImageIO::Read(void * pointer) icpi.SetPhotometricInterpretation(gdcm::PhotometricInterpretation::MONOCHROME2); if (!icpi.Change()) { - itkExceptionMacro(<< "Failed to change to Photometric Interpretation"); + itkExceptionMacro("Failed to change to Photometric Interpretation"); } itkWarningMacro(<< "Converting from MONOCHROME1 to MONOCHROME2 may impact the meaning of DICOM attributes related " "to pixel values."); @@ -363,7 +363,7 @@ GDCMImageIO::Read(void * pointer) if (!image.GetBuffer((char *)pointer)) { - itkExceptionMacro(<< "Failed to get the buffer!"); + itkExceptionMacro("Failed to get the buffer!"); } if (m_SingleBit) @@ -422,7 +422,7 @@ GDCMImageIO::Read(void * pointer) { if (len % 3 != 0) { - itkExceptionMacro(<< "Buffer size " << len << " is not valid"); + itkExceptionMacro("Buffer size " << len << " is not valid"); } YCbCr_to_RGB(reinterpret_cast(pointer), static_cast(len)); } @@ -459,7 +459,7 @@ GDCMImageIO::InternalReadImageInformation() reader.SetFileName(m_FileName.c_str()); if (!reader.Read()) { - itkExceptionMacro(<< "Cannot read requested file"); + itkExceptionMacro("Cannot read requested file"); } const gdcm::Image & image = reader.GetImage(); const gdcm::File & f = reader.GetFile(); @@ -1179,7 +1179,7 @@ GDCMImageIO::Write(const void * buffer) pixeltype = gdcm::PixelFormat::FLOAT64; break; default: - itkExceptionMacro(<< "DICOM does not support this component type"); + itkExceptionMacro("DICOM does not support this component type"); } itkAssertInDebugAndIgnoreInReleaseMacro(pixeltype != gdcm::PixelFormat::UNKNOWN); gdcm::PhotometricInterpretation pi; @@ -1195,7 +1195,7 @@ GDCMImageIO::Write(const void * buffer) } else { - itkExceptionMacro(<< "DICOM does not support this component type"); + itkExceptionMacro("DICOM does not support this component type"); } pixeltype.SetSamplesPerPixel(static_cast(this->GetNumberOfComponents())); @@ -1211,14 +1211,14 @@ GDCMImageIO::Write(const void * buffer) outpixeltype.SetPixelRepresentation(static_cast(std::stoi(pixelRep.c_str()))); if (this->GetNumberOfComponents() != 1) { - itkExceptionMacro(<< "Sorry Dave I can't do that"); + itkExceptionMacro("Sorry Dave I can't do that"); } itkAssertInDebugAndIgnoreInReleaseMacro(outpixeltype != gdcm::PixelFormat::UNKNOWN); } else { - itkExceptionMacro(<< "A Floating point buffer was passed but the stored pixel type was not specified." - "This is currently not supported"); + itkExceptionMacro("A Floating point buffer was passed but the stored pixel type was not specified." + "This is currently not supported"); } } else if (this->GetInternalComponentType() != IOComponentEnum::UNKNOWNCOMPONENTTYPE) @@ -1252,7 +1252,7 @@ GDCMImageIO::Write(const void * buffer) outpixeltype = gdcm::PixelFormat::UINT32; break; default: - itkExceptionMacro(<< "DICOM does not support this component type"); + itkExceptionMacro("DICOM does not support this component type"); } } @@ -1325,13 +1325,13 @@ GDCMImageIO::Write(const void * buffer) } else { - itkExceptionMacro(<< "Unknown compression type"); + itkExceptionMacro("Unknown compression type"); } change.SetInput(image); bool b = change.Change(); if (!b) { - itkExceptionMacro(<< "Could not change the Transfer Syntax for Compression"); + itkExceptionMacro("Could not change the Transfer Syntax for Compression"); } writer.SetImage(change.GetOutput()); } @@ -1384,14 +1384,14 @@ GDCMImageIO::Write(const void * buffer) fef.SetFile(writer.GetFile()); if (!fef.Change()) { - itkExceptionMacro(<< "Failed to change to Explicit Transfer Syntax"); + itkExceptionMacro("Failed to change to Explicit Transfer Syntax"); } } writer.SetFileName(m_FileName.c_str()); if (!writer.Write()) { - itkExceptionMacro(<< "DICOM does not support this component type"); + itkExceptionMacro("DICOM does not support this component type"); } } diff --git a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx index eab0ddc9eb8..980740ef31a 100644 --- a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx +++ b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx @@ -38,7 +38,7 @@ GDCMSeriesFileNames::SetInputDirectory(const char * name) { if (!name) { - itkExceptionMacro(<< "SetInputDirectory() received a nullptr string"); + itkExceptionMacro("SetInputDirectory() received a nullptr string"); } std::string fname = name; this->SetInputDirectory(fname); diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index 53a3dda630d..7d39a8a5233 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -395,13 +395,13 @@ HDF5ImageIO::ReadScalar(const std::string & DataSetName) if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro(<< "Wrong # of dims for TransformType " + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } Space.getSimpleExtentDims(dim, nullptr); if (dim[0] != 1) { - itkExceptionMacro(<< "Elements > 1 for scalar type " + itkExceptionMacro("Elements > 1 for scalar type " << "in HDF5 File"); } TScalar scalar; @@ -466,7 +466,7 @@ HDF5ImageIO::ReadVector(const std::string & DataSetName) if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro(<< "Wrong # of dims for TransformType " + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } Space.getSimpleExtentDims(dim, nullptr); @@ -509,7 +509,7 @@ HDF5ImageIO::ReadDirections(const std::string & path) hsize_t dim[2]; if (dirSpace.getSimpleExtentNdims() != 2) { - itkExceptionMacro(<< " Wrong # of dims for Image Directions " + itkExceptionMacro(" Wrong # of dims for Image Directions " << "in HDF5 File"); } dirSpace.getSimpleExtentDims(dim, nullptr); @@ -910,8 +910,8 @@ HDF5ImageIO::ReadImageInformation() } catch (...) { - itkExceptionMacro(<< "Unspecified error occured during ReadImageInformation " << this->GetFileName() << " with " - << this->GetNameOfClass()); + itkExceptionMacro("Unspecified error occured during ReadImageInformation " << this->GetFileName() << " with " + << this->GetNameOfClass()); } } @@ -1258,8 +1258,8 @@ HDF5ImageIO::WriteImageInformation() } catch (...) { - itkExceptionMacro(<< "Unspecified error occured during WriteImageInformation: " << this->GetFileName() << " with " - << this->GetNameOfClass()); + itkExceptionMacro("Unspecified error occured during WriteImageInformation: " << this->GetFileName() << " with " + << this->GetNameOfClass()); } // // only write image information once. @@ -1318,8 +1318,8 @@ HDF5ImageIO::Write(const void * buffer) } catch (...) { - itkExceptionMacro(<< "Unspecified error occured during Write: " << this->GetFileName() << " with " - << this->GetNameOfClass()); + itkExceptionMacro("Unspecified error occured during Write: " << this->GetFileName() << " with " + << this->GetNameOfClass()); } // TODO: including this line allows the IO object to be re-used multiple times for writing, but // but causes the streaming tests for HDF5ImageIO to fail. diff --git a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx index 96ece2f4ccf..7f1035fb2bc 100644 --- a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx @@ -86,14 +86,14 @@ ImageFileWriter::Write() // Make sure input is available if (input == nullptr) { - itkExceptionMacro(<< "No input to writer!"); + itkExceptionMacro("No input to writer!"); } // Make sure that we can write the file given the name // if (m_FileName.empty()) { - itkExceptionMacro(<< "No filename was specified"); + itkExceptionMacro("No filename was specified"); } if (m_ImageIO.IsNull() || (m_FactorySpecifiedImageIO && !m_ImageIO->CanWriteFile(m_FileName.c_str()))) @@ -242,7 +242,7 @@ ImageFileWriter::Write() // largest region or not. if (!largestIORegion.IsInside(pasteIORegion)) { - itkExceptionMacro(<< "Largest possible region does not fully contain requested paste IO region. Paste IO region: " + itkExceptionMacro("Largest possible region does not fully contain requested paste IO region. Paste IO region: " << pasteIORegion << "Largest possible region: " << largestRegion); } diff --git a/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx b/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx index 6db8c79579a..865fe70aaf4 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx @@ -117,7 +117,7 @@ ImageSeriesReader::GenerateOutputInformation() const auto numberOfFiles = static_cast(m_FileNames.size()); if (numberOfFiles == 0) { - itkExceptionMacro(<< "At least one filename is required."); + itkExceptionMacro("At least one filename is required."); } const int firstFileName = (m_ReverseOrder ? numberOfFiles - 1 : 0); @@ -348,7 +348,8 @@ ImageSeriesReader::GenerateData() // check that the size of each slice is the same if (readerOutput->GetLargestPossibleRegion().GetSize() != validSize) { - itkExceptionMacro(<< "Size mismatch! The size of " << m_FileNames[iFileName].c_str() << " is " + itkExceptionMacro("Size mismatch! The size of " + << m_FileNames[iFileName].c_str() << " is " << readerOutput->GetLargestPossibleRegion().GetSize() << " and does not match the required size " << validSize << " from file " << m_FileNames[m_ReverseOrder ? numberOfFiles - 1 : 0].c_str()); diff --git a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx index d7512596e7f..003e169cd89 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx @@ -76,7 +76,7 @@ ImageSeriesWriter::Write() // Make sure input is available if (inputImage == nullptr) { - itkExceptionMacro(<< "No input to writer!"); + itkExceptionMacro("No input to writer!"); } // Make sure the data is up-to-date. @@ -120,7 +120,7 @@ ImageSeriesWriter::GenerateNumericFileNames() if (!inputImage) { - itkExceptionMacro(<< "Input image is nullptr"); + itkExceptionMacro("Input image is nullptr"); } m_FileNames.clear(); @@ -171,7 +171,7 @@ ImageSeriesWriter::WriteFiles() if (!inputImage) { - itkExceptionMacro(<< "Input image is nullptr"); + itkExceptionMacro("Input image is nullptr"); } // We need two regions. One for the input, one for the output. @@ -241,8 +241,8 @@ ImageSeriesWriter::WriteFiles() if (m_FileNames.size() != expectedNumberOfFiles) { - itkExceptionMacro(<< "The number of filenames passed is " << m_FileNames.size() << " but " << expectedNumberOfFiles - << " were expected "); + itkExceptionMacro("The number of filenames passed is " << m_FileNames.size() << " but " << expectedNumberOfFiles + << " were expected "); } itkDebugMacro(<< "Number of files to write = " << m_FileNames.size()); @@ -288,7 +288,7 @@ ImageSeriesWriter::WriteFiles() } else { - itkExceptionMacro(<< "Attempted to use a MetaDataDictionaryArray without specifying an ImageIO!"); + itkExceptionMacro("Attempted to use a MetaDataDictionaryArray without specifying an ImageIO!"); } } else diff --git a/Modules/IO/ImageBase/src/itkImageIOBase.cxx b/Modules/IO/ImageBase/src/itkImageIOBase.cxx index e67134e2f73..a51ea6ed546 100644 --- a/Modules/IO/ImageBase/src/itkImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkImageIOBase.cxx @@ -618,7 +618,7 @@ ImageIOBase::OpenFileForReading(std::ifstream & inputStream, const std::string & // Make sure that we have a file to if (filename.empty()) { - itkExceptionMacro(<< "A FileName must be specified."); + itkExceptionMacro("A FileName must be specified."); } // Close file from any previous image @@ -645,8 +645,8 @@ ImageIOBase::OpenFileForReading(std::ifstream & inputStream, const std::string & if (!inputStream.is_open() || inputStream.fail()) { - itkExceptionMacro(<< "Could not open file: " << filename << " for reading." << std::endl - << "Reason: " << itksys::SystemTools::GetLastSystemError()); + itkExceptionMacro("Could not open file: " << filename << " for reading." << std::endl + << "Reason: " << itksys::SystemTools::GetLastSystemError()); } } @@ -656,7 +656,7 @@ ImageIOBase::OpenFileForWriting(std::ofstream & outputStream, const std::string // Make sure that we have a file to if (filename.empty()) { - itkExceptionMacro(<< "A FileName must be specified."); + itkExceptionMacro("A FileName must be specified."); } // Close file from any previous image @@ -694,8 +694,8 @@ ImageIOBase::OpenFileForWriting(std::ofstream & outputStream, const std::string if (!outputStream.is_open() || outputStream.fail()) { - itkExceptionMacro(<< "Could not open file: " << filename << " for writing." << std::endl - << "Reason: " << itksys::SystemTools::GetLastSystemError()); + itkExceptionMacro("Could not open file: " << filename << " for writing." << std::endl + << "Reason: " << itksys::SystemTools::GetLastSystemError()); } } diff --git a/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx b/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx index 389c8cc5088..d161894b3dc 100644 --- a/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx +++ b/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx @@ -32,11 +32,11 @@ NumericSeriesFileNames::GetFileNames() // validate the indices if (m_StartIndex > m_EndIndex) { - itkExceptionMacro(<< "StartIndex " << m_StartIndex << " is greater than EndIndex " << m_EndIndex); + itkExceptionMacro("StartIndex " << m_StartIndex << " is greater than EndIndex " << m_EndIndex); } if (m_IncrementIndex == 0) { - itkExceptionMacro(<< "IncrementIndex is zero."); + itkExceptionMacro("IncrementIndex is zero."); } // clear the file names vector diff --git a/Modules/IO/ImageBase/src/itkRegularExpressionSeriesFileNames.cxx b/Modules/IO/ImageBase/src/itkRegularExpressionSeriesFileNames.cxx index 831e9d35dc8..8d1eaef9378 100644 --- a/Modules/IO/ImageBase/src/itkRegularExpressionSeriesFileNames.cxx +++ b/Modules/IO/ImageBase/src/itkRegularExpressionSeriesFileNames.cxx @@ -49,20 +49,20 @@ RegularExpressionSeriesFileNames::GetFileNames() // Validate the ivars if (m_Directory.empty()) { - itkExceptionMacro(<< "No directory defined!"); + itkExceptionMacro("No directory defined!"); } itksys::RegularExpression reg; if (!reg.compile(m_RegularExpression.c_str())) { - itkExceptionMacro(<< "Error compiling regular expression " << m_RegularExpression); + itkExceptionMacro("Error compiling regular expression " << m_RegularExpression); } // Process all files in the directory itksys::Directory fileDir; if (!fileDir.Load(m_Directory.c_str())) { - itkExceptionMacro(<< "Directory " << m_Directory.c_str() << " cannot be read!"); + itkExceptionMacro("Directory " << m_Directory.c_str() << " cannot be read!"); } std::vector> sortedBySubMatch; diff --git a/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx b/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx index a8f5367df9c..34a618835dd 100644 --- a/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx @@ -83,7 +83,7 @@ StreamingImageIOBase::StreamReadBufferAsBinary(std::istream & file, void * _buff if (file.fail()) { - itkExceptionMacro(<< "Fail reading"); + itkExceptionMacro("Fail reading"); } if (movingDirection == m_IORegion.GetImageDimension()) @@ -208,7 +208,7 @@ StreamingImageIOBase::StreamWriteBufferAsBinary(std::ostream & file, const void if (file.fail()) { - itkExceptionMacro(<< "Fail writing"); + itkExceptionMacro("Fail writing"); } if (movingDirection == m_IORegion.GetImageDimension()) diff --git a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx index 560b482ec64..9b791848dde 100644 --- a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx +++ b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx @@ -374,7 +374,7 @@ JPEGImageIO::ReadImageInformation() cinfo.output_components) > 0xffffffff) { jpeg_destroy_decompress(&cinfo); - itkExceptionMacro(<< "JPEG image is too big " << this->GetFileName()); + itkExceptionMacro("JPEG image is too big " << this->GetFileName()); } // pull out the width/height @@ -458,12 +458,12 @@ JPEGImageIO::Write(const void * buffer) // the IORegion is not required to be set so we must use GetNumberOfDimensions if (this->GetNumberOfDimensions() != 2) { - itkExceptionMacro(<< "JPEG Writer can only write 2-dimensional images"); + itkExceptionMacro("JPEG Writer can only write 2-dimensional images"); } if (this->GetComponentType() != IOComponentEnum::UCHAR) { - itkExceptionMacro(<< "JPEG supports unsigned char only"); + itkExceptionMacro("JPEG supports unsigned char only"); } this->WriteSlice(m_FileName, buffer); @@ -486,12 +486,12 @@ JPEGImageIO::WriteSlice(std::string & fileName, const void * const buffer) const SizeValueType height = m_Dimensions[1]; if (width > JPEG_MAX_DIMENSION || height > JPEG_MAX_DIMENSION) { - itkExceptionMacro(<< "JPEG: image is too large"); + itkExceptionMacro("JPEG: image is too large"); } const volatile int num_comp = this->GetNumberOfComponents(); if (num_comp > MAX_COMPONENTS) { - itkExceptionMacro(<< "JPEG: too many components"); + itkExceptionMacro("JPEG: too many components"); } auto * volatile row_pointers = new JSAMPROW[height]; @@ -505,7 +505,7 @@ JPEGImageIO::WriteSlice(std::string & fileName, const void * const buffer) { jpeg_destroy_compress(&cinfo); delete[] row_pointers; - itkExceptionMacro(<< "JPEG error, failed to write " << fileName); + itkExceptionMacro("JPEG error, failed to write " << fileName); } jpeg_create_compress(&cinfo); diff --git a/Modules/IO/LSM/src/itkLSMImageIO.cxx b/Modules/IO/LSM/src/itkLSMImageIO.cxx index 78bf96f6e5d..b1d467bcc1b 100644 --- a/Modules/IO/LSM/src/itkLSMImageIO.cxx +++ b/Modules/IO/LSM/src/itkLSMImageIO.cxx @@ -261,7 +261,7 @@ LSMImageIO::Write(const void * buffer) break; default: - itkExceptionMacro(<< "TIFF supports unsigned char and unsigned short"); + itkExceptionMacro("TIFF supports unsigned char and unsigned short"); } uint16_t predictor; @@ -387,7 +387,7 @@ LSMImageIO::Write(const void * buffer) rowLength = sizeof(unsigned short); break; default: - itkExceptionMacro(<< "TIFF supports unsigned char and unsigned short"); + itkExceptionMacro("TIFF supports unsigned char and unsigned short"); } rowLength *= this->GetNumberOfComponents(); @@ -398,7 +398,7 @@ LSMImageIO::Write(const void * buffer) { if (TIFFWriteScanline(tif, const_cast(outPtr), row, 0) < 0) { - itkExceptionMacro(<< "TIFFImageIO: error out of disk space"); + itkExceptionMacro("TIFFImageIO: error out of disk space"); } outPtr += rowLength; ++row; diff --git a/Modules/IO/MINC/src/itkMINCImageIO.cxx b/Modules/IO/MINC/src/itkMINCImageIO.cxx index 4f351acc62e..a6710ffe4f1 100644 --- a/Modules/IO/MINC/src/itkMINCImageIO.cxx +++ b/Modules/IO/MINC/src/itkMINCImageIO.cxx @@ -166,7 +166,7 @@ MINCImageIO::Read(void * buffer) if (miget_real_value_hyperslab(this->m_MINCPImpl->m_Volume, volume_data_type, start.get(), count.get(), buffer) < 0) { - itkExceptionMacro(<< " Can not get real value hyperslab!!\n"); + itkExceptionMacro(" Can not get real value hyperslab!!\n"); } } @@ -309,7 +309,7 @@ MINCImageIO::ReadImageInformation() if (miopen_volume(m_FileName.c_str(), MI2_OPEN_READ, &this->m_MINCPImpl->m_Volume) < 0) { // Error opening the volume - itkExceptionMacro(<< "Could not open file \"" << m_FileName.c_str() << "\"."); + itkExceptionMacro("Could not open file \"" << m_FileName.c_str() << "\"."); } // find out how many dimensions are there regularly sampled @@ -331,7 +331,7 @@ MINCImageIO::ReadImageInformation() this->m_MINCPImpl->m_NDims, this->m_MINCPImpl->m_MincFileDims) < 0) { - itkExceptionMacro(<< "Could not get dimension handles!"); + itkExceptionMacro("Could not get dimension handles!"); } for (int i = 0; i < this->m_MINCPImpl->m_NDims; ++i) @@ -342,7 +342,7 @@ MINCImageIO::ReadImageInformation() if (miget_dimension_name(this->m_MINCPImpl->m_MincFileDims[i], &name) < 0) { // Error getting dimension name - itkExceptionMacro(<< "Could not get dimension name!"); + itkExceptionMacro("Could not get dimension name!"); } if (miget_dimension_separation(this->m_MINCPImpl->m_MincFileDims[i], MI_ORDER_FILE, &_sep) == MI_NOERROR && @@ -385,7 +385,7 @@ MINCImageIO::ReadImageInformation() } else { - itkExceptionMacro(<< "Unsupported MINC dimension:" << name); + itkExceptionMacro("Unsupported MINC dimension:" << name); } } @@ -394,7 +394,7 @@ MINCImageIO::ReadImageInformation() this->m_MINCPImpl->m_MincFileDims, this->m_MINCPImpl->m_NDims, this->m_MINCPImpl->m_DimensionSize) < 0) { // Error getting dimension sizes - itkExceptionMacro(<< "Could not get dimension sizes!"); + itkExceptionMacro("Could not get dimension sizes!"); } if (miget_dimension_separations(this->m_MINCPImpl->m_MincFileDims, @@ -402,7 +402,7 @@ MINCImageIO::ReadImageInformation() this->m_MINCPImpl->m_NDims, this->m_MINCPImpl->m_DimensionStep) < 0) { - itkExceptionMacro(<< " Could not dimension sizes"); + itkExceptionMacro(" Could not dimension sizes"); } if (miget_dimension_starts(this->m_MINCPImpl->m_MincFileDims, @@ -410,13 +410,13 @@ MINCImageIO::ReadImageInformation() this->m_MINCPImpl->m_NDims, this->m_MINCPImpl->m_DimensionStart) < 0) { - itkExceptionMacro(<< " Could not dimension sizes"); + itkExceptionMacro(" Could not dimension sizes"); } mitype_t volume_data_type; if (miget_data_type(this->m_MINCPImpl->m_Volume, &volume_data_type) < 0) { - itkExceptionMacro(<< " Can not get volume data type!!\n"); + itkExceptionMacro(" Can not get volume data type!!\n"); } // find out whether the data has slice scaling @@ -425,7 +425,7 @@ MINCImageIO::ReadImageInformation() if (miget_slice_scaling_flag(this->m_MINCPImpl->m_Volume, &slice_scaling_flag) < 0) { - itkExceptionMacro(<< " Can not get slice scaling flag!!\n"); + itkExceptionMacro(" Can not get slice scaling flag!!\n"); } // voxel valid range @@ -433,7 +433,7 @@ MINCImageIO::ReadImageInformation() // get the voxel valid range if (miget_volume_valid_range(this->m_MINCPImpl->m_Volume, &valid_max, &valid_min) < 0) { - itkExceptionMacro(<< " Can not get volume valid range!!\n"); + itkExceptionMacro(" Can not get volume valid range!!\n"); } // real volume range, only awailable when slice scaling is off @@ -442,7 +442,7 @@ MINCImageIO::ReadImageInformation() { if (miget_volume_range(this->m_MINCPImpl->m_Volume, &volume_max, &volume_min) < 0) { - itkExceptionMacro(<< " Can not get volume range!!\n"); + itkExceptionMacro(" Can not get volume range!!\n"); } @@ -462,12 +462,12 @@ MINCImageIO::ReadImageInformation() if (spatial_dimension_count == 0) // sorry, this is metaphysical question { - itkExceptionMacro(<< " minc files without spatial dimensions are not supported!"); + itkExceptionMacro(" minc files without spatial dimensions are not supported!"); } if (this->m_MINCPImpl->m_DimensionIndices[0] != -1 && this->m_MINCPImpl->m_DimensionIndices[4] != -1) { - itkExceptionMacro(<< " 4D minc files vector dimension are not supported currently"); + itkExceptionMacro(" 4D minc files vector dimension are not supported currently"); } this->SetNumberOfDimensions(spatial_dimension_count); @@ -551,7 +551,7 @@ MINCImageIO::ReadImageInformation() if (miset_apparent_dimension_order( this->m_MINCPImpl->m_Volume, usable_dimensions, this->m_MINCPImpl->m_MincApparentDims) < 0) { - itkExceptionMacro(<< " Can't set apparent dimension order!"); + itkExceptionMacro(" Can't set apparent dimension order!"); } o_origin = dir_cos * origin; @@ -565,7 +565,7 @@ MINCImageIO::ReadImageInformation() if (miget_data_class(this->m_MINCPImpl->m_Volume, &volume_data_class) < 0) { - itkExceptionMacro(<< " Could not get data class"); + itkExceptionMacro(" Could not get data class"); } // set the file data type @@ -632,7 +632,7 @@ MINCImageIO::ReadImageInformation() this->SetComponentType(IOComponentEnum::DOUBLE); break; default: - itkExceptionMacro(<< "Bad data type "); + itkExceptionMacro("Bad data type "); } // end of switch } @@ -826,7 +826,7 @@ MINCImageIO::ReadImageInformation() } else { - itkExceptionMacro(<< " Error getting float attribute! "); + itkExceptionMacro(" Error getting float attribute! "); } } break; @@ -873,12 +873,12 @@ MINCImageIO::ReadImageInformation() } break; default: - itkExceptionMacro(<< "Unsupported Attribute data type "); + itkExceptionMacro("Unsupported Attribute data type "); } } else { - itkExceptionMacro(<< "Problem reading attribute info "); + itkExceptionMacro("Problem reading attribute info "); } } milist_finish(attlist); @@ -984,7 +984,7 @@ MINCImageIO::WriteImageInformation() if (nDims > 3) { MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); - itkExceptionMacro(<< "Unfortunately, only up to 3D volume are supported now."); + itkExceptionMacro("Unfortunately, only up to 3D volume are supported now."); } // allocating dimensions @@ -1068,7 +1068,7 @@ MINCImageIO::WriteImageInformation() break; default: MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); - itkExceptionMacro(<< "Could read datatype " << this->GetComponentType()); + itkExceptionMacro("Could read datatype " << this->GetComponentType()); } std::string storage_data_type; @@ -1200,7 +1200,7 @@ MINCImageIO::WriteImageInformation() if (minew_volume_props(&hprops) < 0) { MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); - itkExceptionMacro(<< "Could not allocate MINC properties"); + itkExceptionMacro("Could not allocate MINC properties"); } if (this->m_UseCompression) @@ -1209,14 +1209,14 @@ MINCImageIO::WriteImageInformation() { MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); mifree_volume_props(hprops); - itkExceptionMacro(<< "Could not set MINC compression"); + itkExceptionMacro("Could not set MINC compression"); } if (miset_props_zlib_compression(hprops, this->GetCompressionLevel()) < 0) { MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); mifree_volume_props(hprops); - itkExceptionMacro(<< "Could not set MINC compression level"); + itkExceptionMacro("Could not set MINC compression level"); } } else @@ -1225,7 +1225,7 @@ MINCImageIO::WriteImageInformation() { MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); mifree_volume_props(hprops); - itkExceptionMacro(<< "Could not set MINC compression"); + itkExceptionMacro("Could not set MINC compression"); } } @@ -1240,27 +1240,27 @@ MINCImageIO::WriteImageInformation() // Error opening the volume MINCIOFreeTmpDimHandle(minc_dimensions, this->m_MINCPImpl->m_MincApparentDims); mifree_volume_props(hprops); - itkExceptionMacro(<< "Could not open file \"" << m_FileName.c_str() << "\"."); + itkExceptionMacro("Could not open file \"" << m_FileName.c_str() << "\"."); } if (micreate_volume_image(this->m_MINCPImpl->m_Volume) < 0) { // Error opening the volume mifree_volume_props(hprops); - itkExceptionMacro(<< "Could not create image in file \"" << m_FileName.c_str() << "\"."); + itkExceptionMacro("Could not create image in file \"" << m_FileName.c_str() << "\"."); } if (miset_apparent_dimension_order( this->m_MINCPImpl->m_Volume, minc_dimensions, this->m_MINCPImpl->m_MincApparentDims) < 0) { mifree_volume_props(hprops); - itkExceptionMacro(<< " Can't set apparent dimension order!"); + itkExceptionMacro(" Can't set apparent dimension order!"); } if (miset_slice_scaling_flag(this->m_MINCPImpl->m_Volume, 0) < 0) { mifree_volume_props(hprops); - itkExceptionMacro(<< "Could not set slice scaling flag"); + itkExceptionMacro("Could not set slice scaling flag"); } double valid_min, valid_max; @@ -1442,7 +1442,7 @@ MINCImageIO::Write(const void * buffer) get_buffer_min_max(buffer, buffer_length, buffer_min, buffer_max); break; default: - itkExceptionMacro(<< "Could not read datatype " << this->GetComponentType()); + itkExceptionMacro("Could not read datatype " << this->GetComponentType()); } this->WriteImageInformation(); @@ -1475,7 +1475,7 @@ MINCImageIO::Write(const void * buffer) if (miset_real_value_hyperslab( this->m_MINCPImpl->m_Volume, volume_data_type, start.get(), count.get(), const_cast(buffer)) < 0) { - itkExceptionMacro(<< " Can not set real value hyperslab!!\n"); + itkExceptionMacro(" Can not set real value hyperslab!!\n"); } // TODO: determine what to do if we are streming this->CloseVolume(); diff --git a/Modules/IO/MRC/src/itkMRCImageIO.cxx b/Modules/IO/MRC/src/itkMRCImageIO.cxx index ac7a88f16e0..4b062a4f3f9 100644 --- a/Modules/IO/MRC/src/itkMRCImageIO.cxx +++ b/Modules/IO/MRC/src/itkMRCImageIO.cxx @@ -106,7 +106,7 @@ MRCImageIO::GetHeaderSize() const { if (m_MRCHeader.IsNull()) { - itkExceptionMacro(<< "Must read info first"); + itkExceptionMacro("Must read info first"); } return m_MRCHeader->GetExtendedHeaderSize() + m_MRCHeader->GetHeaderSize(); @@ -196,7 +196,7 @@ MRCImageIO::ReadImageInformation() } default: { - itkExceptionMacro(<< "Unrecognized mode"); + itkExceptionMacro("Unrecognized mode"); } } @@ -240,20 +240,20 @@ MRCImageIO::InternalReadImageInformation(std::ifstream & file) buffer = make_unique_for_overwrite(m_MRCHeader->GetHeaderSize()); if (!this->ReadBufferAsBinary(file, static_cast(buffer.get()), m_MRCHeader->GetHeaderSize())) { - itkExceptionMacro(<< "Header Read failed: Wanted " << m_MRCHeader->GetHeaderSize() << " bytes, but read " - << file.gcount() << " bytes."); + itkExceptionMacro("Header Read failed: Wanted " << m_MRCHeader->GetHeaderSize() << " bytes, but read " + << file.gcount() << " bytes."); } // convert the raw buffer into the header if (!m_MRCHeader->SetHeader(reinterpret_cast(buffer.get()))) { - itkExceptionMacro(<< "Unrecognized header"); + itkExceptionMacro("Unrecognized header"); } buffer = make_unique_for_overwrite(m_MRCHeader->GetExtendedHeaderSize()); if (!this->ReadBufferAsBinary(file, static_cast(buffer.get()), m_MRCHeader->GetExtendedHeaderSize())) { - itkExceptionMacro(<< "Extended Header Read failed."); + itkExceptionMacro("Extended Header Read failed."); } m_MRCHeader->SetExtendedHeader(buffer.get()); @@ -283,7 +283,7 @@ MRCImageIO::Read(void * buffer) if (file.fail()) { - itkExceptionMacro(<< "Failed seeking to data position"); + itkExceptionMacro("Failed seeking to data position"); } // read the image @@ -308,7 +308,7 @@ MRCImageIO::Read(void * buffer) this->GetImageSizeInComponents()); break; default: - itkExceptionMacro(<< "Unknown component size"); + itkExceptionMacro("Unknown component size"); } } @@ -349,7 +349,7 @@ MRCImageIO::UpdateHeaderFromImageIO() itkAssertOrThrowMacro(this->GetNumberOfDimensions() != 0, "Invalid Dimension for Writting"); if (this->GetNumberOfDimensions() > 3) { - itkExceptionMacro(<< "MRC Writer can not write more than 3-dimensional images"); + itkExceptionMacro("MRC Writer can not write more than 3-dimensional images"); } // magic number @@ -418,7 +418,8 @@ MRCImageIO::UpdateHeaderFromImageIO() if (header.mode == -1) { - itkExceptionMacro(<< "Unsupported pixel type: " << this->GetPixelTypeAsString(this->GetPixelType()) << ' ' + itkExceptionMacro("Unsupported pixel type: " + << this->GetPixelTypeAsString(this->GetPixelType()) << ' ' << this->GetComponentTypeAsString(this->GetComponentType()) << std::endl << "Supported pixel types include unsigned byte, unsigned short, short, float, rgb " "unsigned char, float complex"); @@ -441,7 +442,7 @@ MRCImageIO::UpdateHeaderFromImageIO() m_MRCHeader = MRCHeaderObject::New(); if (!m_MRCHeader->SetHeader(&header)) { - itkExceptionMacro(<< "Unexpected error setting header"); + itkExceptionMacro("Unexpected error setting header"); } } @@ -527,7 +528,7 @@ MRCImageIO::UpdateHeaderWithMinMaxMean(const void * bufferBegin) } default: { - itkExceptionMacro(<< "Unrecognized mode"); + itkExceptionMacro("Unrecognized mode"); } } } @@ -600,13 +601,13 @@ MRCImageIO::Write(const void * buffer) if (file.fail()) { - itkExceptionMacro(<< "Failed seeking to data position"); + itkExceptionMacro("Failed seeking to data position"); } // read the image if (!this->WriteBufferAsBinary(file, buffer, this->GetImageSizeInBytes())) { - itkExceptionMacro(<< "Could not write file: " << m_FileName); + itkExceptionMacro("Could not write file: " << m_FileName); } } } diff --git a/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx b/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx index b28959e81cd..313889692aa 100644 --- a/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx +++ b/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx @@ -71,7 +71,7 @@ BYUMeshIO::ReadMeshInformation() if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open input file " << this->m_FileName); + itkExceptionMacro("Unable to open input file " << this->m_FileName); } // Read the ASCII file information @@ -189,7 +189,7 @@ BYUMeshIO::ReadPoints(void * buffer) if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open input file " << this->m_FileName); + itkExceptionMacro("Unable to open input file " << this->m_FileName); } // Set the position to points start @@ -225,7 +225,7 @@ BYUMeshIO::ReadCells(void * buffer) if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open input file " << this->m_FileName); + itkExceptionMacro("Unable to open input file " << this->m_FileName); } // Set the position to current position @@ -406,7 +406,7 @@ BYUMeshIO::WritePoints(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point pixel component type" << std::endl); + itkExceptionMacro("Unknown point pixel component type" << std::endl); } } @@ -502,7 +502,7 @@ BYUMeshIO::WriteCells(void * buffer) } default: { - itkExceptionMacro(<< "Unknown cell pixel component type" << std::endl); + itkExceptionMacro("Unknown cell pixel component type" << std::endl); } } diff --git a/Modules/IO/MeshBase/include/itkMeshFileReader.hxx b/Modules/IO/MeshBase/include/itkMeshFileReader.hxx index c563dae29a9..b8908ab9571 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileReader.hxx +++ b/Modules/IO/MeshBase/include/itkMeshFileReader.hxx @@ -136,7 +136,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputVertexCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Vertex Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Vertex Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; auto * vertexCell = new OutputVertexCellType; @@ -155,7 +155,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints < 2) { - itkExceptionMacro(<< "Invalid Line Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Line Cell with number of points = " << numberOfPoints); } auto pointIDBuffer = static_cast(buffer[index++]); for (unsigned int jj = 1; jj < numberOfPoints; ++jj) @@ -175,7 +175,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints < 2) { - itkExceptionMacro(<< "Invalid Line Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Line Cell with number of points = " << numberOfPoints); } auto * polyLineCell = new OutputPolyLineCellType; OutputCellAutoPointer cell; @@ -195,7 +195,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputTriangleCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Triangle Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Triangle Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; @@ -214,7 +214,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputQuadrilateralCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Quadrilateral Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Quadrilateral Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; @@ -261,7 +261,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputTetrahedronCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Tetrahedron Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Tetrahedron Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; @@ -280,7 +280,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputHexahedronCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Hexahedron Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Hexahedron Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; @@ -299,7 +299,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputQuadraticEdgeCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Quadratic edge Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Quadratic edge Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; @@ -318,7 +318,7 @@ MeshFileReader::Re auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints != OutputQuadraticTriangleCellType::NumberOfPoints) { - itkExceptionMacro(<< "Invalid Quadratic triangle Cell with number of points = " << numberOfPoints); + itkExceptionMacro("Invalid Quadratic triangle Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; @@ -334,7 +334,7 @@ MeshFileReader::Re } default: { - itkExceptionMacro(<< "Unknown cell type"); + itkExceptionMacro("Unknown cell type"); } } } @@ -579,7 +579,7 @@ MeshFileReader::Ge case IOComponentEnum::UNKNOWNCOMPONENTTYPE: default: { - itkExceptionMacro(<< "Unknown point component type"); + itkExceptionMacro("Unknown point component type"); } } } @@ -657,7 +657,7 @@ MeshFileReader::Ge case IOComponentEnum::UNKNOWNCOMPONENTTYPE: default: { - itkExceptionMacro(<< "Unknown cell component type"); + itkExceptionMacro("Unknown cell component type"); } } } diff --git a/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx b/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx index 90ee757f848..35032702612 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx +++ b/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx @@ -77,7 +77,7 @@ MeshFileWriter::Write() // Make sure input is available if (input == nullptr) { - itkExceptionMacro(<< "No input to writer!"); + itkExceptionMacro("No input to writer!"); } // Make sure that we can write the file given the name @@ -385,7 +385,7 @@ MeshFileWriter::CopyCellsToBuffer(Output * data) data[index++] = static_cast(CellGeometryEnum::QUADRATIC_TRIANGLE_CELL); break; default: - itkExceptionMacro(<< "Unknown mesh cell"); + itkExceptionMacro("Unknown mesh cell"); } // The second element is number of points for each cell diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx index 21c74db0bc1..c7fcf359e3a 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx @@ -325,7 +325,7 @@ FreeSurferAsciiMeshIO::WritePoints(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point pixel component type" << std::endl); + itkExceptionMacro("Unknown point pixel component type" << std::endl); } } @@ -424,7 +424,7 @@ FreeSurferAsciiMeshIO::WriteCells(void * buffer) } default: { - itkExceptionMacro(<< "Unknown cell pixel component type" << std::endl); + itkExceptionMacro("Unknown cell pixel component type" << std::endl); } } diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx index f31dd02c99d..3f6eb2271d8 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx @@ -133,7 +133,7 @@ FreeSurferBinaryMeshIO::ReadMeshInformation() byte = m_InputFile.get(); if (byte == EOF) { - itkExceptionMacro(<< "Unexpected EOF"); + itkExceptionMacro("Unexpected EOF"); } } // Try to get the second '\n', but if the '\n' is not there, we put the byte @@ -143,7 +143,7 @@ FreeSurferBinaryMeshIO::ReadMeshInformation() { if (byte == EOF) { - itkExceptionMacro(<< "Unexpected EOF"); + itkExceptionMacro("Unexpected EOF"); } m_InputFile.unget(); } @@ -211,7 +211,7 @@ FreeSurferBinaryMeshIO::ReadMeshInformation() } else { - itkExceptionMacro(<< "Unvalid file type " << m_FileTypeIdentifier); + itkExceptionMacro("Unvalid file type " << m_FileTypeIdentifier); } // Set default point pixel component and point pixel type @@ -427,7 +427,7 @@ FreeSurferBinaryMeshIO::WritePoints(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point pixel component type" << std::endl); + itkExceptionMacro("Unknown point pixel component type" << std::endl); } } @@ -523,7 +523,7 @@ FreeSurferBinaryMeshIO::WriteCells(void * buffer) } default: { - itkExceptionMacro(<< "Unknown cell component type" << std::endl); + itkExceptionMacro("Unknown cell component type" << std::endl); } } @@ -631,7 +631,7 @@ FreeSurferBinaryMeshIO::WritePointData(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point data pixel component type" << std::endl); + itkExceptionMacro("Unknown point data pixel component type" << std::endl); } } diff --git a/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx b/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx index 704dfa10289..a5414b79870 100644 --- a/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx +++ b/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx @@ -163,7 +163,7 @@ GiftiMeshIO::ReadMeshInformation() if (!nifti_is_valid_datatype(m_GiftiImage->darray[ii]->datatype)) { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Invalid datatype in data array " << ii << " detected."); + itkExceptionMacro("Invalid datatype in data array " << ii << " detected."); } if (m_GiftiImage->darray[ii]->intent == NIFTI_INTENT_POINTSET) @@ -182,7 +182,7 @@ GiftiMeshIO::ReadMeshInformation() this->m_PointComponentType = GetComponentTypeFromGifti(m_GiftiImage->darray[ii]->datatype); if (GetNumberOfPixelComponentsFromGifti(m_GiftiImage->darray[ii]->datatype) > 1) { - itkExceptionMacro(<< "Data array " << ii << " with intent NIFTI_INTENT_POINTSET requires scalar datatype."); + itkExceptionMacro("Data array " << ii << " with intent NIFTI_INTENT_POINTSET requires scalar datatype."); } // get coord system if (m_GiftiImage->darray[ii]->numCS) @@ -208,7 +208,7 @@ GiftiMeshIO::ReadMeshInformation() if (m_GiftiImage->darray[ii]->dims[1] != 3) { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Input mesh is not triangle mesh"); + itkExceptionMacro("Input mesh is not triangle mesh"); } } this->m_CellBufferSize = static_cast(m_GiftiImage->darray[ii]->nvals + 2 * this->m_NumberOfCells); @@ -216,7 +216,7 @@ GiftiMeshIO::ReadMeshInformation() this->m_CellComponentType = GetComponentTypeFromGifti(m_GiftiImage->darray[ii]->datatype); if (GetNumberOfPixelComponentsFromGifti(m_GiftiImage->darray[ii]->datatype) > 1) { - itkExceptionMacro(<< "Data array " << ii << " with intent NIFTI_INTENT_TRIANGLE requires scalar datatype."); + itkExceptionMacro("Data array " << ii << " with intent NIFTI_INTENT_TRIANGLE requires scalar datatype."); } } else if (m_GiftiImage->darray[ii]->intent == NIFTI_INTENT_SHAPE || @@ -239,8 +239,8 @@ GiftiMeshIO::ReadMeshInformation() else { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Could not read input GIfTI image because the number of point data or " - "number of cell data in the image are not consistent with the current values in " + itkExceptionMacro("Could not read input GIfTI image because the number of point data or " + "number of cell data in the image are not consistent with the current values in " << this->m_FileName); } } @@ -288,8 +288,8 @@ GiftiMeshIO::ReadMeshInformation() else { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Could not read input GIfTI image because the number of point data or " - "number of cell data in the image are not consistent with the current values in " + itkExceptionMacro("Could not read input GIfTI image because the number of point data or " + "number of cell data in the image are not consistent with the current values in " << this->m_FileName); } } @@ -403,8 +403,8 @@ GiftiMeshIO::ReadMeshInformation() else { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Could not read input GIfTI image because the number of point data or " - "number of cell data in the image are not consistent with the current values in " + itkExceptionMacro("Could not read input GIfTI image because the number of point data or " + "number of cell data in the image are not consistent with the current values in " << this->m_FileName); } } @@ -603,7 +603,7 @@ GiftiMeshIO::ReadCells(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown cell data pixel component type" << std::endl); + itkExceptionMacro("Unknown cell data pixel component type" << std::endl); } } } @@ -704,7 +704,7 @@ GiftiMeshIO::WriteMeshInformation() // Whter reading is successful if (m_GiftiImage == nullptr) { - itkExceptionMacro(<< "Could not create a new GIfTI image"); + itkExceptionMacro("Could not create a new GIfTI image"); } // write labelTable using labelMap and colorMap @@ -1151,7 +1151,7 @@ GiftiMeshIO::WritePoints(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown point component type" << std::endl); + itkExceptionMacro("Unknown point component type" << std::endl); } } } @@ -1243,7 +1243,7 @@ GiftiMeshIO::WriteCells(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown cell component type" << std::endl); + itkExceptionMacro("Unknown cell component type" << std::endl); } } } @@ -1352,7 +1352,7 @@ GiftiMeshIO::WritePointData(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown point data pixel component type" << std::endl); + itkExceptionMacro("Unknown point data pixel component type" << std::endl); } } } @@ -1453,7 +1453,7 @@ GiftiMeshIO::WritePointData(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown point data pixel component type" << std::endl); + itkExceptionMacro("Unknown point data pixel component type" << std::endl); } } } @@ -1563,7 +1563,7 @@ GiftiMeshIO::WriteCellData(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown cell data pixel component type" << std::endl); + itkExceptionMacro("Unknown cell data pixel component type" << std::endl); } } } @@ -1663,7 +1663,7 @@ GiftiMeshIO::WriteCellData(void * buffer) default: { gifti_free_image(m_GiftiImage); - itkExceptionMacro(<< "Unknown cell data pixel component type" << std::endl); + itkExceptionMacro("Unknown cell data pixel component type" << std::endl); } } } @@ -1742,7 +1742,7 @@ GiftiMeshIO::GetComponentTypeFromGifti(int datatype) break; default: compType = IOComponentEnum::UNKNOWNCOMPONENTTYPE; - itkExceptionMacro(<< "Unknown component type"); + itkExceptionMacro("Unknown component type"); } return compType; } @@ -1778,7 +1778,7 @@ GiftiMeshIO::GetPixelTypeFromGifti(int datatype) break; default: pixelType = IOPixelEnum::UNKNOWNPIXELTYPE; - itkExceptionMacro(<< "Unknown pixel type"); + itkExceptionMacro("Unknown pixel type"); } return pixelType; } diff --git a/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx b/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx index 0e3d466a4b6..5cc1aef2e7a 100644 --- a/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx +++ b/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx @@ -471,7 +471,7 @@ OBJMeshIO::WritePoints(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point component type" << std::endl); + itkExceptionMacro("Unknown point component type" << std::endl); } } @@ -568,7 +568,7 @@ OBJMeshIO::WriteCells(void * buffer) } default: { - itkExceptionMacro(<< "Unknown cell component type" << std::endl); + itkExceptionMacro("Unknown cell component type" << std::endl); } } @@ -581,7 +581,7 @@ OBJMeshIO::WritePointData(void * buffer) // Point data must be vector if (!m_UpdatePointData || m_NumberOfPointPixelComponents != m_PointDimension) { - itkExceptionMacro(<< "OBJ Mesh writer does not support normals"); + itkExceptionMacro("OBJ Mesh writer does not support normals"); } // Check file name @@ -684,7 +684,7 @@ OBJMeshIO::WritePointData(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point data pixel component type" << std::endl); + itkExceptionMacro("Unknown point data pixel component type" << std::endl); } } outputFile.close(); diff --git a/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx b/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx index e284a22b3b5..dbb541d977b 100644 --- a/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx +++ b/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx @@ -107,7 +107,7 @@ OFFMeshIO::ReadMeshInformation() std::getline(m_InputFile, line, '\n'); // delimiter is '\n' if (line.find("OFF") == std::string::npos) { - itkExceptionMacro(<< "Error, the file doesn't begin with keyword \"OFF\" "); + itkExceptionMacro("Error, the file doesn't begin with keyword \"OFF\" "); } // If the file is binary file, it contains "BINARY" @@ -277,7 +277,7 @@ OFFMeshIO::ReadPoints(void * buffer) } else { - itkExceptionMacro(<< "Invalid file type (not ASCII or BINARY)"); + itkExceptionMacro("Invalid file type (not ASCII or BINARY)"); } } @@ -296,7 +296,7 @@ OFFMeshIO::ReadCells(void * buffer) } else { - itkExceptionMacro(<< "Invalid file type (not ASCII or BINARY)"); + itkExceptionMacro("Invalid file type (not ASCII or BINARY)"); } CloseFile(); @@ -493,7 +493,7 @@ OFFMeshIO::WritePoints(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point pixel component type" << std::endl); + itkExceptionMacro("Unknown point pixel component type" << std::endl); } } } @@ -585,7 +585,7 @@ OFFMeshIO::WritePoints(void * buffer) } default: { - itkExceptionMacro(<< "Unknown point pixel component type" << std::endl); + itkExceptionMacro("Unknown point pixel component type" << std::endl); } } } @@ -705,7 +705,7 @@ OFFMeshIO::WriteCells(void * buffer) } default: { - itkExceptionMacro(<< "Unknown cell pixel component type" << std::endl); + itkExceptionMacro("Unknown cell pixel component type" << std::endl); } } } @@ -793,7 +793,7 @@ OFFMeshIO::WriteCells(void * buffer) } default: { - itkExceptionMacro(<< "Unknown cell pixel component type" << std::endl); + itkExceptionMacro("Unknown cell pixel component type" << std::endl); } } } diff --git a/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h b/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h index 11fd2098c43..1633ecbc48a 100644 --- a/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h +++ b/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h @@ -177,7 +177,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase numberOfPolygonIndices += nn + 1; break; default: - itkExceptionMacro(<< "Currently we dont support this cell type"); + itkExceptionMacro("Currently we dont support this cell type"); } index += nn; @@ -719,7 +719,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase } default: { - itkExceptionMacro(<< "Unknown point pixel type"); + itkExceptionMacro("Unknown point pixel type"); } } @@ -850,7 +850,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase } default: { - itkExceptionMacro(<< "Unknown point pixel type"); + itkExceptionMacro("Unknown point pixel type"); } } @@ -913,7 +913,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase } default: { - itkExceptionMacro(<< "Unknown cell pixel type"); + itkExceptionMacro("Unknown cell pixel type"); } } @@ -1040,7 +1040,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase } default: { - itkExceptionMacro(<< "Unknown cell pixel type"); + itkExceptionMacro("Unknown cell pixel type"); } } diff --git a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx index 74d64358fe8..082068c9a8b 100644 --- a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx +++ b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx @@ -107,7 +107,7 @@ VTKPolyDataMeshIO::GetNextLine(std::ifstream & ifs, std::string & line, bool low // The terminal condition for this recursive calls if (count > 5) { - itkExceptionMacro(<< "Error of GetNextLine due to consecutive 5 empty lines in the given .*vtk file "); + itkExceptionMacro("Error of GetNextLine due to consecutive 5 empty lines in the given .*vtk file "); } // Get a next line from a given *.vtk file @@ -116,7 +116,7 @@ VTKPolyDataMeshIO::GetNextLine(std::ifstream & ifs, std::string & line, bool low // Check the End-of-File of the file if (ifs.eof()) { - itkExceptionMacro(<< "Premature EOF in reading a line"); + itkExceptionMacro("Premature EOF in reading a line"); } // Convert characters of the line to lowercas @@ -349,7 +349,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_PointComponentType = this->GetComponentTypeFromString(pointType); if (this->m_PointComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown point component type"); + itkExceptionMacro("Unknown point component type"); } this->m_UpdatePoints = true; @@ -511,7 +511,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_PointPixelComponentType = this->GetComponentTypeFromString(pointDataComponentType); if (this->m_PointPixelComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown point data component type"); + itkExceptionMacro("Unknown point data component type"); } // Set point pixel type @@ -565,7 +565,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_PointPixelComponentType = this->GetComponentTypeFromString(pointDataComponentType); if (this->m_PointPixelComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown point vector component type"); + itkExceptionMacro("Unknown point vector component type"); } // Set point pixel type @@ -591,7 +591,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_PointPixelComponentType = this->GetComponentTypeFromString(pointDataComponentType); if (this->m_PointPixelComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown point SYMMETRICSECONDRANKTENSOR component type"); + itkExceptionMacro("Unknown point SYMMETRICSECONDRANKTENSOR component type"); } // Set point pixel type @@ -646,7 +646,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_CellPixelComponentType = this->GetComponentTypeFromString(cellDataComponentType); if (this->m_CellPixelComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown cell component type"); + itkExceptionMacro("Unknown cell component type"); } // Set cell pixel type @@ -698,7 +698,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_CellPixelComponentType = this->GetComponentTypeFromString(cellDataComponentType); if (this->m_CellPixelComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown cell normal component type"); + itkExceptionMacro("Unknown cell normal component type"); } // Set cell pixel type @@ -724,7 +724,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() this->m_CellPixelComponentType = this->GetComponentTypeFromString(cellDataComponentType); if (this->m_CellPixelComponentType == IOComponentEnum::UNKNOWNCOMPONENTTYPE) { - itkExceptionMacro(<< "Unknown cell SYMMETRICSECONDRANKTENSOR component type"); + itkExceptionMacro("Unknown cell SYMMETRICSECONDRANKTENSOR component type"); } // Set cell pixel type @@ -840,7 +840,7 @@ VTKPolyDataMeshIO::ReadPoints(void * buffer) default: { - itkExceptionMacro(<< "Unknown point component type"); + itkExceptionMacro("Unknown point component type"); } } } @@ -852,13 +852,13 @@ VTKPolyDataMeshIO::ReadPoints(void * buffer) default: { - itkExceptionMacro(<< "Unknown point component type"); + itkExceptionMacro("Unknown point component type"); } } } else { - itkExceptionMacro(<< "Invalid output file type(not ASCII or BINARY)"); + itkExceptionMacro("Invalid output file type(not ASCII or BINARY)"); } inputFile.close(); @@ -880,8 +880,8 @@ VTKPolyDataMeshIO::ReadCells(void * buffer) if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open file\n" - "inputFilename= " + itkExceptionMacro("Unable to open file\n" + "inputFilename= " << this->m_FileName); } @@ -896,7 +896,7 @@ VTKPolyDataMeshIO::ReadCells(void * buffer) } else { - itkExceptionMacro(<< "Unkonw file type"); + itkExceptionMacro("Unkonw file type"); } inputFile.close(); @@ -1069,8 +1069,8 @@ VTKPolyDataMeshIO::ReadPointData(void * buffer) if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open file\n" - "inputFilename= " + itkExceptionMacro("Unable to open file\n" + "inputFilename= " << this->m_FileName); } @@ -1083,7 +1083,7 @@ VTKPolyDataMeshIO::ReadPointData(void * buffer) default: { - itkExceptionMacro(<< "Unknown point pixel component"); + itkExceptionMacro("Unknown point pixel component"); } } } @@ -1095,13 +1095,13 @@ VTKPolyDataMeshIO::ReadPointData(void * buffer) default: { - itkExceptionMacro(<< "Unknown point pixel component"); + itkExceptionMacro("Unknown point pixel component"); } } } else { - itkExceptionMacro(<< "Unkonw file type"); + itkExceptionMacro("Unkonw file type"); } inputFile.close(); @@ -1123,8 +1123,8 @@ VTKPolyDataMeshIO::ReadCellData(void * buffer) if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open file\n" - "inputFilename= " + itkExceptionMacro("Unable to open file\n" + "inputFilename= " << this->m_FileName); } @@ -1137,7 +1137,7 @@ VTKPolyDataMeshIO::ReadCellData(void * buffer) default: { - itkExceptionMacro(<< "Unknown cell pixel component"); + itkExceptionMacro("Unknown cell pixel component"); } } } @@ -1149,13 +1149,13 @@ VTKPolyDataMeshIO::ReadCellData(void * buffer) default: { - itkExceptionMacro(<< "Unknown cell pixel component"); + itkExceptionMacro("Unknown cell pixel component"); } } } else { - itkExceptionMacro(<< "Unkonw file type"); + itkExceptionMacro("Unkonw file type"); } inputFile.close(); @@ -1201,7 +1201,7 @@ VTKPolyDataMeshIO::WriteMeshInformation() } else { - itkExceptionMacro(<< "Invalid output file type (not ASCII or BINARY)"); + itkExceptionMacro("Invalid output file type (not ASCII or BINARY)"); } outputFile << "DATASET POLYDATA" << '\n'; @@ -1310,7 +1310,7 @@ VTKPolyDataMeshIO::WritePoints(void * buffer) CASE_INVOKE_WITH_COMPONENT_TYPE(WritePointsBufferAsASCII) default: - itkExceptionMacro(<< "Unknown point component type"); + itkExceptionMacro("Unknown point component type"); } } else if (this->m_FileType == IOFileEnum::BINARY) @@ -1320,12 +1320,12 @@ VTKPolyDataMeshIO::WritePoints(void * buffer) CASE_INVOKE_WITH_COMPONENT_TYPE(WritePointsBufferAsBINARY) default: - itkExceptionMacro(<< "Unknown point component type"); + itkExceptionMacro("Unknown point component type"); } } else { - itkExceptionMacro(<< "Invalid output file type(not ASCII or BINARY)"); + itkExceptionMacro("Invalid output file type(not ASCII or BINARY)"); } outputFile.close(); @@ -1444,7 +1444,7 @@ VTKPolyDataMeshIO::WriteCells(void * buffer) CASE_UPDATE_AND_WRITE(WriteCellsBufferAsASCII) default: - itkExceptionMacro(<< "Unknown cell component type"); + itkExceptionMacro("Unknown cell component type"); } } else if (this->m_FileType == IOFileEnum::BINARY) @@ -1454,12 +1454,12 @@ VTKPolyDataMeshIO::WriteCells(void * buffer) CASE_UPDATE_AND_WRITE(WriteCellsBufferAsBINARY) default: - itkExceptionMacro(<< "Unknown cell component type"); + itkExceptionMacro("Unknown cell component type"); } } else { - itkExceptionMacro(<< "Invalid output file type(not ASCII or BINARY)"); + itkExceptionMacro("Invalid output file type(not ASCII or BINARY)"); } outputFile.close(); @@ -1499,7 +1499,7 @@ VTKPolyDataMeshIO::WritePointData(void * buffer) CASE_INVOKE_WITH_COMPONENT_TYPE(WritePointDataBufferAsASCII) default: - itkExceptionMacro(<< "Unknown point pixel component type"); + itkExceptionMacro("Unknown point pixel component type"); } } else if (this->m_FileType == IOFileEnum::BINARY) @@ -1509,12 +1509,12 @@ VTKPolyDataMeshIO::WritePointData(void * buffer) CASE_INVOKE_WITH_COMPONENT_TYPE(WritePointDataBufferAsBINARY) default: - itkExceptionMacro(<< "Unknown point pixel component type"); + itkExceptionMacro("Unknown point pixel component type"); } } else { - itkExceptionMacro(<< "Invalid output file type(not ASCII or BINARY)"); + itkExceptionMacro("Invalid output file type(not ASCII or BINARY)"); } outputFile.close(); @@ -1552,7 +1552,7 @@ VTKPolyDataMeshIO::WriteCellData(void * buffer) CASE_INVOKE_WITH_COMPONENT_TYPE(WriteCellDataBufferAsASCII) default: - itkExceptionMacro(<< "Unknown cell pixel component type"); + itkExceptionMacro("Unknown cell pixel component type"); } } else if (this->m_FileType == IOFileEnum::BINARY) @@ -1562,12 +1562,12 @@ VTKPolyDataMeshIO::WriteCellData(void * buffer) CASE_INVOKE_WITH_COMPONENT_TYPE(WriteCellDataBufferAsBINARY) default: - itkExceptionMacro(<< "Unknown cell pixel component type"); + itkExceptionMacro("Unknown cell pixel component type"); } } else { - itkExceptionMacro(<< "Invalid output file type(not ASCII or BINARY)"); + itkExceptionMacro("Invalid output file type(not ASCII or BINARY)"); } outputFile.close(); diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index a5da58589a8..e245eb70403 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -614,7 +614,7 @@ NiftiImageIO::Read(void * buffer) this->m_NiftiImage = nifti_image_read(this->GetFileName(), false); if (this->m_NiftiImage == nullptr) { - itkExceptionMacro(<< "nifti_image_read (just header) failed for file: " << this->GetFileName()); + itkExceptionMacro("nifti_image_read (just header) failed for file: " << this->GetFileName()); } // @@ -633,7 +633,7 @@ NiftiImageIO::Read(void * buffer) { if (nifti_image_load(this->m_NiftiImage) == -1) { - itkExceptionMacro(<< "nifti_image_load failed for file: " << this->GetFileName()); + itkExceptionMacro("nifti_image_load failed for file: " << this->GetFileName()); } data = this->m_NiftiImage->data; } @@ -642,7 +642,7 @@ NiftiImageIO::Read(void * buffer) // read in a subregion if (nifti_read_subregion_image(this->m_NiftiImage, _origin, _size, &data) == -1) { - itkExceptionMacro(<< "nifti_read_subregion_image failed for file: " << this->GetFileName()); + itkExceptionMacro("nifti_read_subregion_image failed for file: " << this->GetFileName()); } } unsigned int pixelSize = this->m_NiftiImage->nbyper; @@ -692,13 +692,13 @@ NiftiImageIO::Read(void * buffer) CastCopy(_data, data, numElts); break; case IOComponentEnum::FLOAT: - itkExceptionMacro(<< "FLOAT pixels do not need Casting to float"); + itkExceptionMacro("FLOAT pixels do not need Casting to float"); case IOComponentEnum::DOUBLE: - itkExceptionMacro(<< "DOUBLE pixels do not need Casting to float"); + itkExceptionMacro("DOUBLE pixels do not need Casting to float"); case IOComponentEnum::LDOUBLE: - itkExceptionMacro(<< "LDOUBLE pixels do not need Casting to float"); + itkExceptionMacro("LDOUBLE pixels do not need Casting to float"); case IOComponentEnum::UNKNOWNCOMPONENTTYPE: - itkExceptionMacro(<< "Bad OnDiskComponentType UNKNOWNCOMPONENTTYPE"); + itkExceptionMacro("Bad OnDiskComponentType UNKNOWNCOMPONENTTYPE"); } // // we're replacing the data pointer, so if it was allocated @@ -833,8 +833,7 @@ NiftiImageIO::Read(void * buffer) default: if (this->GetPixelType() == IOPixelEnum::SCALAR) { - itkExceptionMacro(<< "Datatype: " << this->GetComponentTypeAsString(this->m_ComponentType) - << " not supported"); + itkExceptionMacro("Datatype: " << this->GetComponentTypeAsString(this->m_ComponentType) << " not supported"); } } } @@ -843,7 +842,7 @@ NiftiImageIO::Read(void * buffer) { if (this->GetPixelType() != IOPixelEnum::VECTOR && this->GetPixelType() != IOPixelEnum::POINT) { - itkExceptionMacro(<< "RAS conversion requires pixel to be 3-component vector or point. Current pixel type is " + itkExceptionMacro("RAS conversion requires pixel to be 3-component vector or point. Current pixel type is " << numComponents << "-component " << this->GetPixelType() << '.'); } switch (this->m_ComponentType) @@ -855,8 +854,8 @@ NiftiImageIO::Read(void * buffer) ConvertRASToFromLPS_CXYZT(static_cast(buffer), numElts * numComponents); break; default: - itkExceptionMacro(<< "RAS conversion of datatype " << this->GetComponentTypeAsString(this->m_ComponentType) - << " is not supported"); + itkExceptionMacro("RAS conversion of datatype " << this->GetComponentTypeAsString(this->m_ComponentType) + << " is not supported"); } } } @@ -1478,8 +1477,8 @@ NiftiImageIO::WriteImageInformation() const unsigned int curdim(this->GetDimensions(i)); if (curdim > static_cast(NumericTraits::max())) { - itkExceptionMacro(<< "Dimension(" << i << ") = " << curdim << " is greater than maximum possible dimension " - << NumericTraits::max()); + itkExceptionMacro("Dimension(" << i << ") = " << curdim << " is greater than maximum possible dimension " + << NumericTraits::max()); } } @@ -1496,7 +1495,7 @@ NiftiImageIO::WriteImageInformation() const char * tempextension = nifti_find_file_extension(FName.c_str()); if (tempextension == nullptr) { - itkExceptionMacro(<< "Bad Nifti file name. No extension found for file: " << FName); + itkExceptionMacro("Bad Nifti file name. No extension found for file: " << FName); } const std::string ExtensionName(tempextension); char * tempbasename = nifti_makebasename(FName.c_str()); @@ -1532,7 +1531,7 @@ NiftiImageIO::WriteImageInformation() } else { - itkExceptionMacro(<< "Bad Nifti file name: " << FName); + itkExceptionMacro("Bad Nifti file name: " << FName); } this->m_NiftiImage->fname = nifti_makehdrname(BaseName.c_str(), this->m_NiftiImage->nifti_type, false, IsCompressed); this->m_NiftiImage->iname = nifti_makeimgname(BaseName.c_str(), this->m_NiftiImage->nifti_type, false, IsCompressed); @@ -1610,7 +1609,7 @@ NiftiImageIO::WriteImageInformation() // images. if (this->GetNumberOfDimensions() > 4) { - itkExceptionMacro(<< "Can not store a vector image of more than 4 dimensions in a Nifti file. Dimension=" + itkExceptionMacro("Can not store a vector image of more than 4 dimensions in a Nifti file. Dimension=" << this->GetNumberOfDimensions()); } // @@ -1708,7 +1707,7 @@ NiftiImageIO::WriteImageInformation() this->m_NiftiImage->nbyper = 8; break; default: - itkExceptionMacro(<< "'unsigned long' type is neither 32 or 64 bits."); + itkExceptionMacro("'unsigned long' type is neither 32 or 64 bits."); } break; case IOComponentEnum::LONG: @@ -1723,7 +1722,7 @@ NiftiImageIO::WriteImageInformation() this->m_NiftiImage->nbyper = 8; break; default: - itkExceptionMacro(<< "'long' type is neither 32 or 64 bits."); + itkExceptionMacro("'long' type is neither 32 or 64 bits."); } break; case IOComponentEnum::ULONGLONG: @@ -1745,7 +1744,7 @@ NiftiImageIO::WriteImageInformation() case IOComponentEnum::UNKNOWNCOMPONENTTYPE: default: { - itkExceptionMacro(<< "More than one component per pixel not supported"); + itkExceptionMacro("More than one component per pixel not supported"); } } switch (this->GetPixelType()) @@ -1775,7 +1774,7 @@ NiftiImageIO::WriteImageInformation() break; default: { - itkExceptionMacro(<< "Only float or double precision complex type supported"); + itkExceptionMacro("Only float or double precision complex type supported"); } } break; @@ -1789,7 +1788,7 @@ NiftiImageIO::WriteImageInformation() case IOPixelEnum::MATRIX: case IOPixelEnum::UNKNOWNPIXELTYPE: default: - itkExceptionMacro(<< "Can not process this pixel type for writing into nifti"); + itkExceptionMacro("Can not process this pixel type for writing into nifti"); } // ----------------------------------------------------- // vox_offset required for an "n+1" header @@ -1806,7 +1805,7 @@ NiftiImageIO::WriteImageInformation() { if (temp.length() > 23) { - itkExceptionMacro(<< "aux_file too long, Nifti limit is 23 characters"); + itkExceptionMacro("aux_file too long, Nifti limit is 23 characters"); } else { @@ -2405,7 +2404,7 @@ NiftiImageIO::Write(const void * buffer) // so will destructor of the image that really owns it. if (nifti_write_status) { - itkExceptionMacro(<< "ERROR: nifti library failed to write image" << this->GetFileName()); + itkExceptionMacro("ERROR: nifti library failed to write image" << this->GetFileName()); } } else /// Image intent is vector image @@ -2484,7 +2483,7 @@ NiftiImageIO::Write(const void * buffer) { if (this->GetPixelType() != IOPixelEnum::VECTOR && this->GetPixelType() != IOPixelEnum::POINT) { - itkExceptionMacro(<< "RAS conversion requires pixel to be 3-component vector or point. Current pixel type is " + itkExceptionMacro("RAS conversion requires pixel to be 3-component vector or point. Current pixel type is " << numComponents << "-component " << this->GetPixelType() << '.'); } switch (this->m_ComponentType) @@ -2496,8 +2495,8 @@ NiftiImageIO::Write(const void * buffer) ConvertRASToFromLPS_XYZTC(reinterpret_cast(nifti_buf.get()), numComponents * seriesdist); break; default: - itkExceptionMacro(<< "RAS conversion of datatype " << this->GetComponentTypeAsString(this->m_ComponentType) - << " is not supported"); + itkExceptionMacro("RAS conversion of datatype " << this->GetComponentTypeAsString(this->m_ComponentType) + << " is not supported"); } } @@ -2510,7 +2509,7 @@ NiftiImageIO::Write(const void * buffer) this->m_NiftiImage->data = nullptr; // if left pointing to data buffer if (nifti_write_status) { - itkExceptionMacro(<< "ERROR: nifti library failed to write image" << this->GetFileName()); + itkExceptionMacro("ERROR: nifti library failed to write image" << this->GetFileName()); } } } diff --git a/Modules/IO/PNG/src/itkPNGImageIO.cxx b/Modules/IO/PNG/src/itkPNGImageIO.cxx index 77e8736aa62..3dcba812580 100644 --- a/Modules/IO/PNG/src/itkPNGImageIO.cxx +++ b/Modules/IO/PNG/src/itkPNGImageIO.cxx @@ -549,14 +549,14 @@ PNGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp) nullptr, nullptr, nullptr); if (!png_ptr) { - itkExceptionMacro(<< "Unable to write PNG file! png_create_write_struct failed."); + itkExceptionMacro("Unable to write PNG file! png_create_write_struct failed."); } png_infop info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_write_struct(&png_ptr, (png_infopp) nullptr); - itkExceptionMacro(<< "Unable to write PNG file!. png_create_info_struct failed."); + itkExceptionMacro("Unable to write PNG file!. png_create_info_struct failed."); } png_init_io(png_ptr, fp); diff --git a/Modules/IO/RAW/include/itkRawImageIO.hxx b/Modules/IO/RAW/include/itkRawImageIO.hxx index 5c7dee5e9d7..2dad2ee18e1 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.hxx +++ b/Modules/IO/RAW/include/itkRawImageIO.hxx @@ -83,7 +83,7 @@ RawImageIO::GetHeaderSize() if (m_FileName.empty()) { - itkExceptionMacro(<< "A FileName must be specified."); + itkExceptionMacro("A FileName must be specified."); } if (!m_ManualHeaderSize) @@ -135,7 +135,7 @@ RawImageIO::Read(void * buffer) file.seekg((OffsetValueType)streamStart, std::ios::beg); if (file.fail()) { - itkExceptionMacro(<< "File seek failed"); + itkExceptionMacro("File seek failed"); } const auto numberOfBytesToBeRead = static_cast(this->GetImageSizeInBytes()); @@ -147,8 +147,8 @@ RawImageIO::Read(void * buffer) { if (!this->ReadBufferAsBinary(file, buffer, numberOfBytesToBeRead)) { - itkExceptionMacro(<< "Read failed: Wanted " << numberOfBytesToBeRead << " bytes, but read " << file.gcount() - << " bytes."); + itkExceptionMacro("Read failed: Wanted " << numberOfBytesToBeRead << " bytes, but read " << file.gcount() + << " bytes."); } } else diff --git a/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx b/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx index 860e52fd62d..5b0fd6f9358 100644 --- a/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx +++ b/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx @@ -139,7 +139,7 @@ StimulateImageIO::Read(void * buffer) } catch (const ExceptionObject &) { - itkExceptionMacro(<< "No Data file was specified in header (spr) file and guessing file data name failed."); + itkExceptionMacro("No Data file was specified in header (spr) file and guessing file data name failed."); } } } // a filename was found for data file @@ -148,9 +148,9 @@ StimulateImageIO::Read(void * buffer) if (!this->ReadBufferAsBinary(file_data, buffer, this->GetImageSizeInBytes())) { - itkExceptionMacro(<< "Read failed: Wanted " << this->GetImageSizeInBytes() << " bytes, but read " - << file_data.gcount() << " bytes." - << " from file " << m_DataFileName); + itkExceptionMacro("Read failed: Wanted " << this->GetImageSizeInBytes() << " bytes, but read " << file_data.gcount() + << " bytes." + << " from file " << m_DataFileName); } // byte swapping depending on pixel type: @@ -336,7 +336,7 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) } else { - itkExceptionMacro(<< "Unrecognized type"); + itkExceptionMacro("Unrecognized type"); } } // found scalars else if (text.find("displayRange") < text.length()) @@ -391,7 +391,7 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) // BigEndian ieee-be / LittleEndian: ieee-le if (text.find("ieee-le") < text.length()) { - itkExceptionMacro(<< "Little Endian Stimulate files are not handled."); + itkExceptionMacro("Little Endian Stimulate files are not handled."); } } else if (text.find("mapParmFileName") < text.length()) @@ -412,7 +412,7 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) itksys::RegularExpression regexp("stimFileName:[ ]*(.*)[ ]*$"); if (!regexp.find(text)) { - itkExceptionMacro(<< "Missing value for stimFileName attribute"); + itkExceptionMacro("Missing value for stimFileName attribute"); } datafilename = regexp.match(1); @@ -501,7 +501,7 @@ StimulateImageIO::Write(const void * buffer) unsigned int numDims = this->GetNumberOfDimensions(); if (numDims < 2 || numDims > 4) { - itkExceptionMacro(<< "Stimulate Writer can only write 2,3 or 4-dimensional images"); + itkExceptionMacro("Stimulate Writer can only write 2,3 or 4-dimensional images"); } // Write the Stimulate header information diff --git a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx index 9b520a6a643..c54f1878a1e 100644 --- a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx +++ b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx @@ -186,7 +186,7 @@ TIFFImageIO::Read(void * buffer) { if (!this->CanReadFile(m_FileName.c_str())) { - itkExceptionMacro(<< "Cannot open file " << this->m_FileName << '!'); + itkExceptionMacro("Cannot open file " << this->m_FileName << '!'); } } @@ -319,7 +319,7 @@ TIFFImageIO::InitializeColors() case 16: break; default: - itkExceptionMacro(<< "Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample << "-bit samples"); + itkExceptionMacro("Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample << "-bit samples"); } m_TotalColors = uint64_t{ 1 } << m_InternalImage->m_BitsPerSample; @@ -339,7 +339,7 @@ TIFFImageIO::ReadImageInformation() { if (!this->CanReadFile(m_FileName.c_str())) { - itkExceptionMacro(<< "Cannot open file " << this->m_FileName << '!'); + itkExceptionMacro("Cannot open file " << this->m_FileName << '!'); } } @@ -560,7 +560,7 @@ TIFFImageIO::Write(const void * buffer) } else { - itkExceptionMacro(<< "TIFF Writer can only write 2-d or 3-d images"); + itkExceptionMacro("TIFF Writer can only write 2-d or 3-d images"); } } @@ -604,7 +604,7 @@ TIFFImageIO::InternalWrite(const void * buffer) bps = 32; break; default: - itkExceptionMacro(<< "TIFF supports unsigned/signed char, unsigned/signed short, and float"); + itkExceptionMacro("TIFF supports unsigned/signed char, unsigned/signed short, and float"); } uint16_t predictor; @@ -623,7 +623,7 @@ TIFFImageIO::InternalWrite(const void * buffer) // Adding the "8" option enables the use of big tiff mode = "w8"; #else - itkExceptionMacro(<< "Size of image exceeds the limit of libtiff."); + itkExceptionMacro("Size of image exceeds the limit of libtiff."); #endif } @@ -815,7 +815,7 @@ TIFFImageIO::InternalWrite(const void * buffer) rowLength = sizeof(float); break; default: - itkExceptionMacro(<< "TIFF supports unsigned/signed char, unsigned/signed short, and float"); + itkExceptionMacro("TIFF supports unsigned/signed char, unsigned/signed short, and float"); } rowLength *= this->GetNumberOfComponents(); @@ -826,7 +826,7 @@ TIFFImageIO::InternalWrite(const void * buffer) { if (TIFFWriteScanline(tif, const_cast(outPtr), row, 0) < 0) { - itkExceptionMacro(<< "TIFFImageIO: error out of disk space"); + itkExceptionMacro("TIFFImageIO: error out of disk space"); } outPtr += rowLength; ++row; @@ -938,7 +938,7 @@ TIFFImageIO::CanFindTIFFTag(unsigned int t) // m_InternalImage needs to be valid if (!m_InternalImage) { - itkExceptionMacro(<< "Need to call CanReadFile before"); + itkExceptionMacro("Need to call CanReadFile before"); } ttag_t tag = t; // 32bits integer @@ -958,7 +958,7 @@ TIFFImageIO::ReadRawByteFromTag(unsigned int t, unsigned int & value_count) // m_InternalImage needs to be valid if (!m_InternalImage) { - itkExceptionMacro(<< "Need to call CanReadFile before"); + itkExceptionMacro("Need to call CanReadFile before"); } ttag_t tag = t; void * raw_data = nullptr; @@ -967,7 +967,7 @@ TIFFImageIO::ReadRawByteFromTag(unsigned int t, unsigned int & value_count) if (fld == nullptr) { - itkExceptionMacro(<< "fld is nullptr"); + itkExceptionMacro("fld is nullptr"); } if (!itkTIFFFieldPassCount(fld)) @@ -991,13 +991,13 @@ TIFFImageIO::ReadRawByteFromTag(unsigned int t, unsigned int & value_count) if (ret != 1) { - itkExceptionMacro(<< "Tag cannot be found"); + itkExceptionMacro("Tag cannot be found"); } else { if (itkTIFFFieldDataType(fld) != TIFF_BYTE) { - itkExceptionMacro(<< "Tag is not of type TIFF_BYTE"); + itkExceptionMacro("Tag is not of type TIFF_BYTE"); } } @@ -1303,7 +1303,7 @@ TIFFImageIO::ReadCurrentPage(void * buffer, size_t pixelOffset) if (!TIFFReadRGBAImageOriented(m_InternalImage->m_Image, width, height, tempImage, ORIENTATION_TOPLEFT, 1)) { - itkExceptionMacro(<< "Cannot read TIFF image as a TIFF RGBA image"); + itkExceptionMacro("Cannot read TIFF image as a TIFF RGBA image"); } unsigned char * out = static_cast(buffer) + pixelOffset; @@ -1369,12 +1369,12 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig if (m_InternalImage->m_PlanarConfig != PLANARCONFIG_CONTIG && m_InternalImage->m_SamplesPerPixel != 1) { - itkExceptionMacro(<< "This reader can only do PLANARCONFIG_CONTIG or single-component PLANARCONFIG_SEPARATE"); + itkExceptionMacro("This reader can only do PLANARCONFIG_CONTIG or single-component PLANARCONFIG_SEPARATE"); } if (m_InternalImage->m_Orientation != ORIENTATION_TOPLEFT && m_InternalImage->m_Orientation != ORIENTATION_BOTLEFT) { - itkExceptionMacro(<< "This reader can only do ORIENTATION_TOPLEFT and ORIENTATION_BOTLEFT."); + itkExceptionMacro("This reader can only do ORIENTATION_TOPLEFT and ORIENTATION_BOTLEFT."); } @@ -1408,7 +1408,7 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig { if (TIFFReadScanline(m_InternalImage->m_Image, buf, row, 0) <= 0) { - itkExceptionMacro(<< "Problem reading the row: " << row); + itkExceptionMacro("Problem reading the row: " << row); } if (m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT) @@ -1441,8 +1441,8 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig image, static_cast(buf), width, 1, 0, 0); break; default: - itkExceptionMacro(<< "Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample - << "-bit samples with palette."); + itkExceptionMacro("Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample + << "-bit samples with palette."); } break; case TIFFImageIO::PALETTE_RGB: @@ -1457,8 +1457,8 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig PutPaletteRGB(image, static_cast(buf), width, 1, 0, 0); break; default: - itkExceptionMacro(<< "Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample - << "-bit samples with palette."); + itkExceptionMacro("Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample + << "-bit samples with palette."); } } else @@ -1473,8 +1473,8 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig image, static_cast(buf), width, 1, 0, 0); break; default: - itkExceptionMacro(<< "Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample - << "-bit samples with palette."); + itkExceptionMacro("Sorry, can not handle image with " << m_InternalImage->m_BitsPerSample + << "-bit samples with palette."); } } break; diff --git a/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx b/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx index 48902ba12c6..633461b2a6b 100644 --- a/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx +++ b/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx @@ -108,7 +108,7 @@ HDF5TransformIOTemplate::GetH5TypeFromString() const return H5::PredType::NATIVE_FLOAT; } - itkExceptionMacro(<< "Wrong data precision type " << NameParametersValueTypeString << "for writing in HDF5 File"); + itkExceptionMacro("Wrong data precision type " << NameParametersValueTypeString << "for writing in HDF5 File"); } /** Write a Parameter array to the location specified by name */ @@ -168,12 +168,12 @@ HDF5TransformIOTemplate::ReadParameters(const std::string const H5T_class_t Type = paramSet.getTypeClass(); if (Type != H5T_FLOAT) { - itkExceptionMacro(<< "Wrong data type for " << DataSetName << "in HDF5 File"); + itkExceptionMacro("Wrong data type for " << DataSetName << "in HDF5 File"); } const H5::DataSpace Space = paramSet.getSpace(); if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro(<< "Wrong # of dims for TransformType " + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } hsize_t dim; @@ -215,12 +215,12 @@ HDF5TransformIOTemplate::ReadFixedParameters(const std::st H5T_class_t Type = paramSet.getTypeClass(); if (Type != H5T_FLOAT) { - itkExceptionMacro(<< "Wrong data type for " << DataSetName << "in HDF5 File"); + itkExceptionMacro("Wrong data type for " << DataSetName << "in HDF5 File"); } const H5::DataSpace Space = paramSet.getSpace(); if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro(<< "Wrong # of dims for TransformType " + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } hsize_t dim; @@ -387,7 +387,7 @@ HDF5TransformIOTemplate::WriteOneTransform(const int { if (transformIndex != 0) { - itkExceptionMacro(<< "Composite Transform can only be 1st transform in a file"); + itkExceptionMacro("Composite Transform can only be 1st transform in a file"); } } else diff --git a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx index a247fd63ed8..6380a6bfb9c 100644 --- a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx +++ b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx @@ -289,7 +289,7 @@ TxtTransformIOTemplate::Write() { if (count > 0) { - itkExceptionMacro(<< "Composite Transform can only be 1st transform in a file"); + itkExceptionMacro("Composite Transform can only be 1st transform in a file"); } } else diff --git a/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h b/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h index 8fe3a0e9b46..b9f28aea7d7 100644 --- a/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h +++ b/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h @@ -155,14 +155,14 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter OutputVectorType TransformVector(const InputVectorType &, const InputPointType &) const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } /** Method to transform a vector. */ OutputVnlVectorType TransformVector(const InputVnlVectorType &, const InputPointType &) const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } /** Method to transform a vector. */ @@ -190,14 +190,14 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter OutputVectorPixelType TransformVector(const InputVectorPixelType &, const InputPointType &) const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } /** Method to transform a CovariantVector. */ OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &, const InputPointType &) const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } /** Method to transform a CovariantVector. */ @@ -218,7 +218,7 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType &, const InputPointType &) const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } /** Set the transformation to an Identity @@ -232,20 +232,20 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter void SetFixedParameters(const FixedParametersType &) override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } NumberOfParametersType GetNumberOfParameters() const override { // this transform is defined by XFM file - itkExceptionMacro(<< "Not Defined"); + itkExceptionMacro("Not Defined"); } /** Set the Transformation Parameters @@ -253,13 +253,13 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter void SetParameters(const ParametersType &) override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } const ParametersType & GetParameters() const override { - itkExceptionMacro(<< "Not Implemented"); + itkExceptionMacro("Not Implemented"); } void @@ -268,7 +268,7 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter cleanup(); if (input_transform_file(xfm, &m_Xfm) != VIO_OK) { - itkExceptionMacro(<< "Error reading XFM:" << xfm); + itkExceptionMacro("Error reading XFM:" << xfm); } m_Initialized = true; } @@ -278,7 +278,7 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter { if (!m_Initialized) { - itkExceptionMacro(<< "XFM not initialized"); + itkExceptionMacro("XFM not initialized"); } if (!m_Initialized_invert) { @@ -293,7 +293,7 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter { if (VInputDimension != 3 || VOutputDimension != 3) { - itkExceptionMacro(<< "Sorry, only 3D to 3d minc xfm transform is currently implemented"); + itkExceptionMacro("Sorry, only 3D to 3d minc xfm transform is currently implemented"); } } diff --git a/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx b/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx index d8926dd21bb..36dc78d7231 100644 --- a/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx +++ b/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx @@ -127,10 +127,10 @@ MINCTransformIOTemplate::ReadOneTransform(VIO_General_tran break; } case THIN_PLATE_SPLINE: - itkExceptionMacro(<< "Reading THIN_PLATE_SPLINE transform is not supported yet"); + itkExceptionMacro("Reading THIN_PLATE_SPLINE transform is not supported yet"); break; case USER_TRANSFORM: - itkExceptionMacro(<< "Reading USER_TRANSFORM transform is not supported yet"); + itkExceptionMacro("Reading USER_TRANSFORM transform is not supported yet"); break; case GRID_TRANSFORM: { @@ -169,11 +169,11 @@ MINCTransformIOTemplate::ReadOneTransform(VIO_General_tran } else { - itkExceptionMacro(<< "Got grid transform without file name !"); + itkExceptionMacro("Got grid transform without file name !"); } } default: - itkExceptionMacro(<< "Reading Unknown transform is not supported!"); + itkExceptionMacro("Reading Unknown transform is not supported!"); break; } } @@ -184,7 +184,7 @@ MINCTransformIOTemplate::Read() { if (input_transform_file(this->GetFileName(), &m_XFM) != VIO_OK) { - itkExceptionMacro(<< "Error reading XFM:" << this->GetFileName()); + itkExceptionMacro("Error reading XFM:" << this->GetFileName()); } this->m_XFM_initialized = true; @@ -213,7 +213,7 @@ MINCTransformIOTemplate::WriteOneTransform(const int { if (transformIndex != 0) { - itkExceptionMacro(<< "Composite Transform can only be 1st transform in a file"); + itkExceptionMacro("Composite Transform can only be 1st transform in a file"); } } else @@ -269,7 +269,7 @@ MINCTransformIOTemplate::WriteOneTransform(const int } else { - itkExceptionMacro(<< "Trying to write-out displacement transform without displacement field"); + itkExceptionMacro("Trying to write-out displacement transform without displacement field"); } writer->Update(); @@ -282,7 +282,7 @@ MINCTransformIOTemplate::WriteOneTransform(const int } else { - itkExceptionMacro(<< "Transform type:" << transformType.c_str() << "is Unsupported"); + itkExceptionMacro("Transform type:" << transformType.c_str() << "is Unsupported"); } } } @@ -343,7 +343,7 @@ MINCTransformIOTemplate::Write() if (wrt != VIO_OK) { - itkExceptionMacro(<< "Error writing XFM:" << xfm_filename.c_str()); + itkExceptionMacro("Error writing XFM:" << xfm_filename.c_str()); } } diff --git a/Modules/IO/VTK/src/itkVTKImageIO.cxx b/Modules/IO/VTK/src/itkVTKImageIO.cxx index 42cc6395821..32ce35ca039 100644 --- a/Modules/IO/VTK/src/itkVTKImageIO.cxx +++ b/Modules/IO/VTK/src/itkVTKImageIO.cxx @@ -43,7 +43,7 @@ VTKImageIO::GetNextLine(std::ifstream & ifs, std::string & line, bool lowerCase, // The terminal condition for this recursive calls if (count > 5) { - itkExceptionMacro(<< "Error of GetNextLine due to consecutive 5 empty lines in the given .*vtk file "); + itkExceptionMacro("Error of GetNextLine due to consecutive 5 empty lines in the given .*vtk file "); } // Get a next line from a given *.vtk file @@ -52,7 +52,7 @@ VTKImageIO::GetNextLine(std::ifstream & ifs, std::string & line, bool lowerCase, // Check the End-of-File of the file if (ifs.eof()) { - itkExceptionMacro(<< "Premature EOF in reading a line"); + itkExceptionMacro("Premature EOF in reading a line"); } // Convert characters of the line to lowercas @@ -141,7 +141,7 @@ VTKImageIO::SetPixelTypeFromString(const std::string & pixelType) } else { - itkExceptionMacro(<< "Unrecognized pixel type"); + itkExceptionMacro("Unrecognized pixel type"); } } else @@ -185,14 +185,14 @@ VTKImageIO::InternalReadImageInformation(std::ifstream & file) } else { - itkExceptionMacro(<< "Unrecognized type"); + itkExceptionMacro("Unrecognized type"); } this->GetNextLine(file, text); if (text.find("structured_points") >= text.length()) { - itkExceptionMacro(<< "Not structured points, can't read"); + itkExceptionMacro("Not structured points, can't read"); } this->GetNextLine(file, text); @@ -228,7 +228,7 @@ VTKImageIO::InternalReadImageInformation(std::ifstream & file) } else { - itkExceptionMacro(<< "No dimensions defined"); + itkExceptionMacro("No dimensions defined"); } for (bool readAttribute = false; !readAttribute;) @@ -355,7 +355,7 @@ VTKImageIO::InternalReadImageInformation(std::ifstream & file) if (!file.good()) { - itkExceptionMacro(<< "Error reading header"); + itkExceptionMacro("Error reading header"); } } @@ -402,7 +402,7 @@ VTKImageIO::ReadHeaderSize(std::ifstream & file) if (file.fail()) { - itkExceptionMacro(<< "Failed reading header information"); + itkExceptionMacro("Failed reading header information"); } // set the header size based on how much we just read @@ -462,7 +462,7 @@ VTKImageIO::ReadBufferAsASCII(std::istream & is, { if (this->GetNumberOfComponents() != 6) { - itkExceptionMacro(<< "itk::ERROR: VTKImageIO: Unsupported number of components in tensor."); + itkExceptionMacro("itk::ERROR: VTKImageIO: Unsupported number of components in tensor."); } switch (ctype) @@ -501,7 +501,7 @@ VTKImageIO::ReadSymmetricTensorBufferAsBinary(std::istream & is, void * buffer, if (this->GetNumberOfComponents() != 6) { - itkExceptionMacro(<< "Unsupported tensor dimension."); + itkExceptionMacro("Unsupported tensor dimension."); } while (bytesRemaining) { @@ -521,7 +521,7 @@ VTKImageIO::ReadSymmetricTensorBufferAsBinary(std::istream & is, void * buffer, if (is.fail()) { - itkExceptionMacro(<< "Failure during writing of file."); + itkExceptionMacro("Failure during writing of file."); } } @@ -536,7 +536,7 @@ VTKImageIO::Read(void * buffer) if (this->GetPixelType() == IOPixelEnum::SYMMETRICSECONDRANKTENSOR) { - itkExceptionMacro(<< "Cannot stream read binary second rank tensors."); + itkExceptionMacro("Cannot stream read binary second rank tensors."); } // open and stream read @@ -559,7 +559,7 @@ VTKImageIO::Read(void * buffer) ByteSwapper::SwapRangeFromSystemToBigEndian((uint64_t *)buffer, this->GetIORegionSizeInComponents()); break; default: - itkExceptionMacro(<< "Unknown component size" << this->GetComponentSize()); + itkExceptionMacro("Unknown component size" << this->GetComponentSize()); } } else @@ -571,7 +571,7 @@ VTKImageIO::Read(void * buffer) if (file.fail()) { - itkExceptionMacro(<< "Failed seeking to data position"); + itkExceptionMacro("Failed seeking to data position"); } // seek pass the header @@ -610,7 +610,7 @@ VTKImageIO::Read(void * buffer) ByteSwapper::SwapRangeFromSystemToBigEndian((uint64_t *)buffer, this->GetImageSizeInComponents()); break; default: - itkExceptionMacro(<< "Unknown component size" << this->GetComponentSize()); + itkExceptionMacro("Unknown component size" << this->GetComponentSize()); } } } @@ -642,7 +642,7 @@ VTKImageIO::WriteImageInformation(const void * itkNotUsed(buffer)) unsigned int numDims = this->GetNumberOfDimensions(); if (numDims < 1 || numDims > 3) { - itkExceptionMacro(<< "VTK Writer can only write 1, 2 or 3-dimensional images"); + itkExceptionMacro("VTK Writer can only write 1, 2 or 3-dimensional images"); } // Write the VTK header information @@ -832,7 +832,7 @@ VTKImageIO::WriteBufferAsASCII(std::ostream & os, { \ if (!this->WriteBufferAsBinary(file, tempmemory.get(), numbytes)) \ { \ - itkExceptionMacro(<< "Could not write file: " << m_FileName); \ + itkExceptionMacro("Could not write file: " << m_FileName); \ } \ } \ } @@ -908,12 +908,12 @@ VTKImageIO::WriteSymmetricTensorBufferAsBinary(std::ostream & os break; } default: - itkExceptionMacro(<< "Unsupported tensor dimension."); + itkExceptionMacro("Unsupported tensor dimension."); } if (os.fail()) { - itkExceptionMacro(<< "Failure during writing of file."); + itkExceptionMacro("Failure during writing of file."); } } @@ -926,7 +926,7 @@ VTKImageIO::Write(const void * buffer) if (this->GetPixelType() == IOPixelEnum::SYMMETRICSECONDRANKTENSOR) { - itkExceptionMacro(<< "Cannot stream write binary second rank tensors."); + itkExceptionMacro("Cannot stream write binary second rank tensors."); } std::ofstream file; @@ -976,7 +976,7 @@ VTKImageIO::Write(const void * buffer) case 8: StreamWriteVTKImageBinaryBlockMACRO(uint64_t) break; default: - itkExceptionMacro(<< "Unknown component size" << this->GetComponentSize()); + itkExceptionMacro("Unknown component size" << this->GetComponentSize()); } } else @@ -1001,7 +1001,7 @@ VTKImageIO::Write(const void * buffer) if (file.fail()) { - itkExceptionMacro(<< "Failed seeking to data position"); + itkExceptionMacro("Failed seeking to data position"); } // Write the actual pixel data @@ -1026,7 +1026,7 @@ VTKImageIO::Write(const void * buffer) case 8: WriteVTKImageBinaryBlockMACRO(uint64_t) break; default: - itkExceptionMacro(<< "Unknown component size" << this->GetComponentSize()); + itkExceptionMacro("Unknown component size" << this->GetComponentSize()); } } else @@ -1040,7 +1040,7 @@ VTKImageIO::Write(const void * buffer) { if (!this->WriteBufferAsBinary(file, buffer, this->GetImageSizeInBytes())) { - itkExceptionMacro(<< "Could not write file: " << m_FileName); + itkExceptionMacro("Could not write file: " << m_FileName); } } } diff --git a/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx b/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx index 8d3d4cc00a1..8db554e218b 100644 --- a/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx +++ b/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx @@ -117,12 +117,12 @@ ConformalFlatteningMeshFilter::GenerateData() if (!inputMesh) { - itkExceptionMacro(<< "Missing Input Mesh"); + itkExceptionMacro("Missing Input Mesh"); } if (!outputMesh) { - itkExceptionMacro(<< "Missing Output Mesh"); + itkExceptionMacro("Missing Output Mesh"); } outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); diff --git a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx index 4e5391d8b04..e265a6eabdd 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx +++ b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx @@ -78,7 +78,7 @@ DiscreteGaussianDerivativeImageFunction::RecomputeGaussian { if (this->GetInputImage()->GetSpacing()[direction] == 0.0) { - itkExceptionMacro(<< "Pixel spacing cannot be zero"); + itkExceptionMacro("Pixel spacing cannot be zero"); } else { diff --git a/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx b/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx index ff73bbf7ef1..782ec71584c 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx +++ b/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx @@ -81,7 +81,7 @@ DiscreteGradientMagnitudeGaussianImageFunction::RecomputeG { if (this->GetInputImage()->GetSpacing()[direction] == 0.0) { - itkExceptionMacro(<< "Pixel spacing cannot be zero"); + itkExceptionMacro("Pixel spacing cannot be zero"); } else { diff --git a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx index 9a397404474..e34fdb06629 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx @@ -57,7 +57,7 @@ MultiphaseDenseFiniteDifferenceImageFilter in(input, input->GetBufferedRegion()); diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx index e3a56ffd82e..248acda7b50 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx @@ -1072,8 +1072,8 @@ MultiphaseSparseFiniteDifferenceImageFilterm_Layers.size() < 3) { - itkExceptionMacro(<< "Not enough layers have been allocated for the" - "sparse field. Requires at least one layer."); + itkExceptionMacro("Not enough layers have been allocated for the" + "sparse field. Requires at least one layer."); } } @@ -1362,7 +1362,7 @@ MultiphaseSparseFiniteDifferenceImageFilter outIt(output, region); diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx index 0acc104bb31..e65feedfb0c 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx @@ -35,7 +35,7 @@ RobustAutomaticThresholdCalculator::Compute() { if (!m_Input || !m_Gradient) { - itkExceptionMacro(<< "Input or gradient image(s) not set."); + itkExceptionMacro("Input or gradient image(s) not set."); } ImageRegionConstIteratorWithIndex iIt(m_Input, m_Input->GetRequestedRegion()); @@ -66,7 +66,7 @@ RobustAutomaticThresholdCalculator::GetOutput() con { if (!m_Valid) { - itkExceptionMacro(<< "GetOutput() invoked, but the output has not been computed. Call Compute() first."); + itkExceptionMacro("GetOutput() invoked, but the output has not been computed. Call Compute() first."); } return m_Output; } diff --git a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx index 8098c24b09f..b6fcb60f648 100644 --- a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx +++ b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx @@ -79,7 +79,7 @@ WarpHarmonicEnergyCalculator::Compute() { if (m_Image->GetSpacing()[i] <= 0.0) { - itkExceptionMacro(<< "Image spacing in dimension " << i << " is zero."); + itkExceptionMacro("Image spacing in dimension " << i << " is zero."); } m_DerivativeWeights[i] = 1.0 / static_cast(m_Image->GetSpacing()[i]); } diff --git a/Modules/Numerics/FEM/include/itkFEMObject.hxx b/Modules/Numerics/FEM/include/itkFEMObject.hxx index 79c8b180c36..6f1f33d036d 100644 --- a/Modules/Numerics/FEM/include/itkFEMObject.hxx +++ b/Modules/Numerics/FEM/include/itkFEMObject.hxx @@ -127,7 +127,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * mCopy = dynamic_cast(Copy->GetMaterial(i).GetPointer()); if (mCopy == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } fem::MaterialLinearElasticity::Pointer m = fem::MaterialLinearElasticity::New(); m->SetGlobalNumber(mCopy->GetGlobalNumber()); @@ -150,7 +150,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * o1 = dynamic_cast(a.GetPointer()); if (o1 == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } o1->SetGlobalNumber(elCopy->GetGlobalNumber()); @@ -178,7 +178,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * lCopy = dynamic_cast(load); if (lCopy == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } fem::LoadNode::Pointer o1 = fem::LoadNode::New(); @@ -202,7 +202,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * lCopy = dynamic_cast(load); if (lCopy == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } fem::LoadBC::Pointer o1 = fem::LoadBC::New(); @@ -227,7 +227,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * lCopy = dynamic_cast(load); if (lCopy == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } fem::LoadBCMFC::Pointer o1 = fem::LoadBCMFC::New(); @@ -265,7 +265,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * lCopy = dynamic_cast(load); if (lCopy == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } fem::LoadEdge::Pointer o1 = fem::LoadEdge::New(); @@ -301,7 +301,7 @@ FEMObject::DeepCopy(FEMObject * Copy) auto * lCopy = dynamic_cast(load); if (lCopy == nullptr) { - itkExceptionMacro(<< "dynamic_cast failed."); + itkExceptionMacro("dynamic_cast failed."); } fem::LoadGravConst::Pointer o1 = fem::LoadGravConst::New(); diff --git a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx index 7eb26d305ab..ae3c94bc582 100644 --- a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx +++ b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx @@ -46,7 +46,7 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy const auto * FEMmo = dynamic_cast(mo); if (FEMmo == nullptr) { - itkExceptionMacro(<< "Can't convert MetaObject to MetaFEMObject"); + itkExceptionMacro("Can't convert MetaObject to MetaFEMObject"); } FEMObjectSpatialObjectPointer FEMSO = FEMObjectSpatialObjectType::New(); @@ -317,7 +317,7 @@ MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjec FEMObjectSpatialObjectConstPointer FEMSO = dynamic_cast(so); if (FEMSO.IsNull()) { - itkExceptionMacro(<< "Can't downcast SpatialObject to FEMObjectSpatialObject"); + itkExceptionMacro("Can't downcast SpatialObject to FEMObjectSpatialObject"); } using FEMObjectType = fem::FEMObject; diff --git a/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h b/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h index 1f30af33b38..5673dee99a9 100644 --- a/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h @@ -176,7 +176,7 @@ class ITKOptimizers_EXPORT LBFGSBOptimizer : public SingleValuedNonLinearVnlOpti void SetScales(const ScalesType &) { - itkExceptionMacro(<< "This optimizer does not support scales."); + itkExceptionMacro("This optimizer does not support scales."); } /** Get the current iteration number. */ diff --git a/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx index 97b442e772d..66f351e7e5a 100644 --- a/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx @@ -69,12 +69,12 @@ AmoebaOptimizer::GetValue() const { if (static_cast(costFunction->get_number_of_unknowns()) != numberOfParameters) { - itkExceptionMacro(<< "cost function and current position dimensions mismatch"); + itkExceptionMacro("cost function and current position dimensions mismatch"); } } else { - itkExceptionMacro(<< "cost function not set"); + itkExceptionMacro("cost function not set"); } if (m_ScalesInitialized) @@ -279,7 +279,7 @@ AmoebaOptimizer::ValidateSettings() // we have to have a cost function if (GetCostFunctionAdaptor() == nullptr) { - itkExceptionMacro(<< "nullptr cost function"); + itkExceptionMacro("nullptr cost function"); } // if we got here it is safe to get the number of parameters the cost // function expects @@ -288,7 +288,7 @@ AmoebaOptimizer::ValidateSettings() // check that the number of parameters match if (GetInitialPosition().Size() != n) { - itkExceptionMacro(<< "cost function and initial position dimensions mismatch"); + itkExceptionMacro("cost function and initial position dimensions mismatch"); } // the user gave us data to use for the initial simplex, check that it @@ -299,7 +299,7 @@ AmoebaOptimizer::ValidateSettings() { if (m_InitialSimplexDelta.size() != n) { - itkExceptionMacro(<< "cost function and simplex delta dimensions mismatch"); + itkExceptionMacro("cost function and simplex delta dimensions mismatch"); } } // check that the number of scale factors matches @@ -307,18 +307,18 @@ AmoebaOptimizer::ValidateSettings() { if (this->GetScales().Size() != n) { - itkExceptionMacro(<< "cost function and scaling information dimensions mismatch"); + itkExceptionMacro("cost function and scaling information dimensions mismatch"); } } // parameters' convergence tolerance has to be positive if (this->m_ParametersConvergenceTolerance < 0) { - itkExceptionMacro(<< "negative parameters convergence tolerance"); + itkExceptionMacro("negative parameters convergence tolerance"); } // function convergence tolerance has to be positive if (this->m_FunctionConvergenceTolerance < 0) { - itkExceptionMacro(<< "negative function convergence tolerance"); + itkExceptionMacro("negative function convergence tolerance"); } } diff --git a/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx index 6c119805e06..752ea04ba8b 100644 --- a/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx @@ -61,8 +61,8 @@ ExhaustiveOptimizer::StartWalking() // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() << ", but the NumberOfParameters is " - << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " << scales.size() << ", but the NumberOfParameters is " << spaceDimension + << '.'); } // Setup first grid position. diff --git a/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx index 1942a96330a..280cafe9077 100644 --- a/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx @@ -159,8 +159,9 @@ GradientDescentOptimizer::AdvanceOneStep() // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() - << ", but the NumberOfParameters for the CostFunction is " << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " + << scales.size() << ", but the NumberOfParameters for the CostFunction is " << spaceDimension + << '.'); } DerivativeType transformedGradient(spaceDimension); diff --git a/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx index 5b73f75bf6f..f4661a96639 100644 --- a/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx @@ -293,22 +293,22 @@ LBFGSBOptimizer::StartOptimization() if (this->GetInitialPosition().Size() < numberOfParameters) { - itkExceptionMacro(<< "InitialPosition array does not have sufficient number of elements"); + itkExceptionMacro("InitialPosition array does not have sufficient number of elements"); } if (m_LowerBound.size() < numberOfParameters) { - itkExceptionMacro(<< "LowerBound array does not have sufficient number of elements"); + itkExceptionMacro("LowerBound array does not have sufficient number of elements"); } if (m_UpperBound.size() < numberOfParameters) { - itkExceptionMacro(<< "UppperBound array does not have sufficient number of elements"); + itkExceptionMacro("UppperBound array does not have sufficient number of elements"); } if (m_BoundSelection.size() < numberOfParameters) { - itkExceptionMacro(<< "BoundSelection array does not have sufficient number of elements"); + itkExceptionMacro("BoundSelection array does not have sufficient number of elements"); } if (this->GetMaximize()) @@ -334,7 +334,7 @@ LBFGSBOptimizer::StartOptimization() { // set current position to initial position and throw an exception this->SetCurrentPosition(this->GetInitialPosition()); - itkExceptionMacro(<< "Error occurred in optimization"); + itkExceptionMacro("Error occurred in optimization"); } this->SetCurrentPosition(parameters); diff --git a/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx index 9e5f08d92f7..83ec3fa5199 100644 --- a/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx @@ -236,7 +236,7 @@ LBFGSOptimizer::StartOptimization() { // set current position to initial position and throw an exception this->SetCurrentPosition(currentPositionInternalValue); - itkExceptionMacro(<< "Error occurred in optimization"); + itkExceptionMacro("Error occurred in optimization"); } // we scale the vnlCompatibleParameters down if scales are defined diff --git a/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx index 78f67625bf5..fadfab2a16e 100644 --- a/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx @@ -129,8 +129,9 @@ OnePlusOneEvolutionaryOptimizer::StartOptimization() // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() - << ", but the NumberOfParameters for the CostFunction is " << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " + << scales.size() << ", but the NumberOfParameters for the CostFunction is " << spaceDimension + << '.'); } A.set_identity(); @@ -156,7 +157,7 @@ OnePlusOneEvolutionaryOptimizer::StartOptimization() { if (!m_RandomGenerator) { - itkExceptionMacro(<< "Random Generator is not set!"); + itkExceptionMacro("Random Generator is not set!"); } f_norm[i] = m_RandomGenerator->GetVariate(); } diff --git a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx index 237ebf23393..555295a1c38 100644 --- a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx +++ b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx @@ -45,7 +45,7 @@ ParticleSwarmOptimizerBase::SetNumberOfParticles(unsigned int n) { if (!this->m_Particles.empty() && n != this->m_Particles.size()) { - itkExceptionMacro(<< "swarm already set with different size, clear swarm and then set"); + itkExceptionMacro("swarm already set with different size, clear swarm and then set"); } if (this->m_NumberOfParticles != n) { @@ -70,7 +70,7 @@ ParticleSwarmOptimizerBase::SetInitialSwarm(const SwarmType & initialSwarm) if (it->m_CurrentParameters.GetSize() != n || it->m_CurrentVelocity.GetSize() != n || it->m_BestParameters.GetSize() != n) { - itkExceptionMacro(<< "inconsistent dimensions in swarm data"); + itkExceptionMacro("inconsistent dimensions in swarm data"); } } this->m_Particles.insert(m_Particles.begin(), initialSwarm.begin(), initialSwarm_END); @@ -306,7 +306,7 @@ ParticleSwarmOptimizerBase::ValidateSettings() // we have to have a cost function if (GetCostFunction() == nullptr) { - itkExceptionMacro(<< "nullptr cost function"); + itkExceptionMacro("nullptr cost function"); } // if we got here it is safe to get the number of parameters the cost // function expects @@ -316,34 +316,34 @@ ParticleSwarmOptimizerBase::ValidateSettings() ParametersType initialPosition = GetInitialPosition(); if (initialPosition.Size() != n) { - itkExceptionMacro(<< "cost function and initial position dimensions mismatch"); + itkExceptionMacro("cost function and initial position dimensions mismatch"); } // at least one particle if (this->m_NumberOfParticles == 0) { - itkExceptionMacro(<< "number of particles is zero"); + itkExceptionMacro("number of particles is zero"); } // at least one iteration (the initialization phase) if (this->m_MaximalNumberOfIterations == 0) { - itkExceptionMacro(<< "number of iterations is zero"); + itkExceptionMacro("number of iterations is zero"); } // we need at least one generation difference to // compare to the previous one if (this->m_NumberOfGenerationsWithMinimalImprovement == 0) { - itkExceptionMacro(<< "number of generations with minimal improvement is zero"); + itkExceptionMacro("number of generations with minimal improvement is zero"); } if (this->m_ParameterBounds.size() != n) { - itkExceptionMacro(<< "cost function and parameter bounds dimensions mismatch"); + itkExceptionMacro("cost function and parameter bounds dimensions mismatch"); } for (i = 0; i < n; ++i) { if (initialPosition[i] < this->m_ParameterBounds[i].first || initialPosition[i] > this->m_ParameterBounds[i].second) { - itkExceptionMacro(<< "initial position is outside specified parameter bounds"); + itkExceptionMacro("initial position is outside specified parameter bounds"); } } // if the user set an initial swarm, check that the number of parameters @@ -352,7 +352,7 @@ ParticleSwarmOptimizerBase::ValidateSettings() { if (this->m_Particles[0].m_CurrentParameters.GetSize() != n) { - itkExceptionMacro(<< "cost function and particle data dimensions mismatch"); + itkExceptionMacro("cost function and particle data dimensions mismatch"); } std::vector::iterator it, end = this->m_Particles.end(); for (it = this->m_Particles.begin(); it != end; ++it) @@ -364,7 +364,7 @@ ParticleSwarmOptimizerBase::ValidateSettings() p.m_CurrentParameters[i] > m_ParameterBounds[i].second || p.m_BestParameters[i] < m_ParameterBounds[i].first || p.m_BestParameters[i] > m_ParameterBounds[i].second) { - itkExceptionMacro(<< "initial position is outside specified parameter bounds"); + itkExceptionMacro("initial position is outside specified parameter bounds"); } } } @@ -374,13 +374,13 @@ ParticleSwarmOptimizerBase::ValidateSettings() { if (this->m_ParametersConvergenceTolerance[i] < 0) { - itkExceptionMacro(<< "negative parameters convergence tolerance"); + itkExceptionMacro("negative parameters convergence tolerance"); } } // function convergence tolerance has to be positive if (this->m_FunctionConvergenceTolerance < 0) { - itkExceptionMacro(<< "negative function convergence tolerance"); + itkExceptionMacro("negative function convergence tolerance"); } } diff --git a/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx index 102fe20a7a2..ee341022f63 100644 --- a/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx @@ -35,8 +35,8 @@ QuaternionRigidTransformGradientDescentOptimizer::AdvanceOneStep() // Make sure the scales have been set if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() << ", but the NumberOfParameters is " - << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " << scales.size() << ", but the NumberOfParameters is " << spaceDimension + << '.'); } DerivativeType transformedGradient(spaceDimension); diff --git a/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx index 2981a01a17a..3961281cb19 100644 --- a/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx @@ -60,8 +60,8 @@ RegularStepGradientDescentBaseOptimizer::StartOptimization() // validity check for the value of GradientMagnitudeTolerance if (m_GradientMagnitudeTolerance < 0.0) { - itkExceptionMacro(<< "Gradient magnitude tolerance must be" - "greater or equal 0.0. Current value is " + itkExceptionMacro("Gradient magnitude tolerance must be" + "greater or equal 0.0. Current value is " << m_GradientMagnitudeTolerance); } @@ -152,19 +152,20 @@ RegularStepGradientDescentBaseOptimizer::AdvanceOneStep() if (m_RelaxationFactor < 0.0) { - itkExceptionMacro(<< "Relaxation factor must be positive. Current value is " << m_RelaxationFactor); + itkExceptionMacro("Relaxation factor must be positive. Current value is " << m_RelaxationFactor); } if (m_RelaxationFactor >= 1.0) { - itkExceptionMacro(<< "Relaxation factor must less than 1.0. Current value is " << m_RelaxationFactor); + itkExceptionMacro("Relaxation factor must less than 1.0. Current value is " << m_RelaxationFactor); } // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() - << ", but the NumberOfParameters for the CostFunction is " << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " + << scales.size() << ", but the NumberOfParameters for the CostFunction is " << spaceDimension + << '.'); } for (unsigned int i = 0; i < spaceDimension; ++i) diff --git a/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx index 599cb4ef646..3d46865acfc 100644 --- a/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx @@ -105,14 +105,14 @@ SPSAOptimizer::StartOptimization() if (!m_CostFunction) { - itkExceptionMacro(<< "No objective function defined! "); + itkExceptionMacro("No objective function defined! "); } // The number of parameters const unsigned int spaceDimension = m_CostFunction->GetNumberOfParameters(); if (spaceDimension != this->GetInitialPosition().GetSize()) { - itkExceptionMacro(<< "Number of parameters not correct!"); + itkExceptionMacro("Number of parameters not correct!"); } m_CurrentIteration = 0; @@ -245,8 +245,9 @@ SPSAOptimizer::GenerateDelta(const unsigned int spaceDimension) // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() - << ", but the NumberOfParameters for the CostFunction is " << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " + << scales.size() << ", but the NumberOfParameters for the CostFunction is " << spaceDimension + << '.'); } const ScalesType & invScales = this->GetInverseScales(); @@ -361,7 +362,7 @@ SPSAOptimizer::GuessParameters(SizeValueType numberOfGradientEstimates, double i if (!m_CostFunction) { - itkExceptionMacro(<< "No objective function defined! "); + itkExceptionMacro("No objective function defined! "); } // The number of parameters @@ -371,7 +372,7 @@ SPSAOptimizer::GuessParameters(SizeValueType numberOfGradientEstimates, double i const ParametersType & initialPosition = this->GetInitialPosition(); if (spaceDimension != initialPosition.GetSize()) { - itkExceptionMacro(<< "Number of parameters not correct!"); + itkExceptionMacro("Number of parameters not correct!"); } // Estimate the maximum absolute element of the initial gradient diff --git a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx index e41415dcdea..111aa77c7fe 100644 --- a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx @@ -75,8 +75,8 @@ ExhaustiveOptimizerv4::StartWalking() // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() << ", but the NumberOfParameters is " - << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " << scales.size() << ", but the NumberOfParameters is " << spaceDimension + << '.'); } // Setup first grid position. diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx index 1478f5a2b10..b010c4e7d3c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx @@ -90,7 +90,7 @@ LBFGS2Optimizerv4Template::ResumeOptimization() int N = parameters.GetSize(); if (N == 0) { - itkExceptionMacro(<< "Optimizer parameters are not initialized."); + itkExceptionMacro("Optimizer parameters are not initialized."); } // TODO: only needed if SSE is enabled diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx index 2ca9359ea77..13b4847302d 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx @@ -521,7 +521,7 @@ ObjectToObjectMetricGetSpacing() << std::endl; directionString << "Virtual Direction: " << this->GetVirtualDirection() << ", DisplacementField Direction: " << field->GetDirection() << std::endl; - itkExceptionMacro(<< "Virtual Domain and DisplacementField do not " + itkExceptionMacro("Virtual Domain and DisplacementField do not " << "occupy the same physical space! You may be able to " << "simply call displacementField->CopyInformation( " << "metric->GetVirtualImage() ) to align them. " << std::endl diff --git a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx index 52bada54c81..672fdd93826 100644 --- a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx @@ -136,8 +136,9 @@ OnePlusOneEvolutionaryOptimizerv4::StartOptimizat // Make sure the scales have been set properly if (scales.size() != spaceDimension) { - itkExceptionMacro(<< "The size of Scales is " << scales.size() - << ", but the NumberOfParameters for the CostFunction is " << spaceDimension << '.'); + itkExceptionMacro("The size of Scales is " + << scales.size() << ", but the NumberOfParameters for the CostFunction is " << spaceDimension + << '.'); } A.set_identity(); @@ -160,7 +161,7 @@ OnePlusOneEvolutionaryOptimizerv4::StartOptimizat { if (!m_RandomGenerator) { - itkExceptionMacro(<< "Random Generator is not set!"); + itkExceptionMacro("Random Generator is not set!"); } f_norm[i] = m_RandomGenerator->GetVariate(); } diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx index a8cf0d8583c..d71400c8a98 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx @@ -91,7 +91,7 @@ RegistrationParameterScalesFromJacobian::EstimateLocalStepScales(const { if (!this->IsDisplacementFieldTransform()) { - itkExceptionMacro(<< "EstimateLocalStepScales: the transform doesn't have local support."); + itkExceptionMacro("EstimateLocalStepScales: the transform doesn't have local support."); } this->CheckAndSetInputs(); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx index f56858faca7..bc2a735464c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx @@ -63,8 +63,8 @@ RegularStepGradientDescentOptimizerv4::StartOptim // validity check for the value of GradientMagnitudeTolerance if (m_GradientMagnitudeTolerance < 0.0) { - itkExceptionMacro(<< "Gradient magnitude tolerance must be " - "greater or equal 0.0. Current value is " + itkExceptionMacro("Gradient magnitude tolerance must be " + "greater or equal 0.0. Current value is " << m_GradientMagnitudeTolerance); } @@ -83,18 +83,19 @@ RegularStepGradientDescentOptimizerv4::AdvanceOne // Make sure the scales have been set properly if (this->m_Scales.size() != this->m_Gradient.Size()) { - itkExceptionMacro(<< "The size of Scales is " << this->m_Scales.size() - << ", but the NumberOfParameters for the CostFunction is " << this->m_Gradient.Size() << '.'); + itkExceptionMacro("The size of Scales is " << this->m_Scales.size() + << ", but the NumberOfParameters for the CostFunction is " + << this->m_Gradient.Size() << '.'); } if (this->m_RelaxationFactor < 0.0) { - itkExceptionMacro(<< "Relaxation factor must be positive. Current value is " << this->m_RelaxationFactor); + itkExceptionMacro("Relaxation factor must be positive. Current value is " << this->m_RelaxationFactor); } if (this->m_RelaxationFactor >= 1.0) { - itkExceptionMacro(<< "Relaxation factor must be less than 1.0. Current value is " << this->m_RelaxationFactor); + itkExceptionMacro("Relaxation factor must be less than 1.0. Current value is " << this->m_RelaxationFactor); } // diff --git a/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx index dada9c46751..8724e48f15b 100644 --- a/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx @@ -261,7 +261,7 @@ AmoebaOptimizerv4::ValidateSettings() { if (m_InitialSimplexDelta.size() != n) { - itkExceptionMacro(<< "cost function and simplex delta dimensions mismatch"); + itkExceptionMacro("cost function and simplex delta dimensions mismatch"); } } @@ -270,19 +270,19 @@ AmoebaOptimizerv4::ValidateSettings() { if (this->GetScales().Size() != n) { - itkExceptionMacro(<< "cost function and scaling information dimensions mismatch"); + itkExceptionMacro("cost function and scaling information dimensions mismatch"); } } // parameters' convergence tolerance has to be positive if (this->m_ParametersConvergenceTolerance < 0) { - itkExceptionMacro(<< "negative parameters convergence tolerance"); + itkExceptionMacro("negative parameters convergence tolerance"); } // function convergence tolerance has to be positive if (this->m_FunctionConvergenceTolerance < 0) { - itkExceptionMacro(<< "negative function convergence tolerance"); + itkExceptionMacro("negative function convergence tolerance"); } } diff --git a/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx index dd934ad8a6c..b0f5899cd5f 100644 --- a/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx @@ -210,17 +210,17 @@ LBFGSBOptimizerv4::StartOptimization(bool /*doOnlyInitialization*/) if (m_LowerBound.size() < numberOfParameters && !m_BoundSelection.is_zero()) { - itkExceptionMacro(<< "LowerBound array does not have sufficient number of elements"); + itkExceptionMacro("LowerBound array does not have sufficient number of elements"); } if (m_UpperBound.size() < numberOfParameters && !m_BoundSelection.is_zero()) { - itkExceptionMacro(<< "UppperBound array does not have sufficient number of elements"); + itkExceptionMacro("UppperBound array does not have sufficient number of elements"); } if (m_BoundSelection.size() < numberOfParameters) { - itkExceptionMacro(<< "BoundSelection array does not have sufficient number of elements"); + itkExceptionMacro("BoundSelection array does not have sufficient number of elements"); } if (this->m_CostFunctionConvergenceFactor == 0.0 && this->m_GradientConvergenceTolerance == 0.0) @@ -241,7 +241,7 @@ LBFGSBOptimizerv4::StartOptimization(bool /*doOnlyInitialization*/) { // set current position to initial position and throw an exception this->m_Metric->SetParameters(this->GetInitialPosition()); - itkExceptionMacro(<< "Error occurred in optimization"); + itkExceptionMacro("Error occurred in optimization"); } this->m_Metric->SetParameters(parameters); diff --git a/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx index 4763daa8ed4..93bbbf0c7ec 100644 --- a/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx @@ -139,7 +139,7 @@ LBFGSOptimizerv4::StartOptimization(bool /* doOnlyInitialization */) if (parameters.GetSize() == 0) { - itkExceptionMacro(<< "Optimizer parameters are not initialized."); + itkExceptionMacro("Optimizer parameters are not initialized."); } // Scale the initial parameters up if scales are defined. diff --git a/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx index 777603c8e20..305feddbacd 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx @@ -51,7 +51,7 @@ DistanceMetric::SetOrigin(const OriginType & x) { if (x.Size() != this->m_MeasurementVectorSize) { - itkExceptionMacro(<< "Size of the origin must be same as the length of" + itkExceptionMacro("Size of the origin must be same as the length of" << " each measurement vector."); } } diff --git a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx index 07ae7c2fd8d..8d1924270b1 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx @@ -73,7 +73,7 @@ DistanceToCentroidMembershipFunction::InternalClone() const typename Self::Pointer membershipFunction = dynamic_cast(loPtr.GetPointer()); if (membershipFunction.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } membershipFunction->SetMeasurementVectorSize(this->GetMeasurementVectorSize()); diff --git a/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx index c07d6dc4415..6e0009f1513 100644 --- a/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx @@ -31,7 +31,7 @@ EuclideanDistanceMetric::Evaluate(const MeasurementVectorType & x) cons if (measurementVectorSize == 0) { - itkExceptionMacro(<< "Please set the MeasurementVectorSize first"); + itkExceptionMacro("Please set the MeasurementVectorSize first"); } MeasurementVectorTraits::Assert(this->GetOrigin(), measurementVectorSize, @@ -58,7 +58,7 @@ EuclideanDistanceMetric::Evaluate(const MeasurementVectorType & x1, con if (measurementVectorSize != NumericTraits::GetLength(x2)) { - itkExceptionMacro(<< "The two measurement vectors have unequal size (" + itkExceptionMacro("The two measurement vectors have unequal size (" << NumericTraits::GetLength(x1) << " and " << NumericTraits::GetLength(x2) << ')'); } diff --git a/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.hxx index 5b970ef6f6d..67d47ea8c21 100644 --- a/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.hxx @@ -31,7 +31,7 @@ EuclideanSquareDistanceMetric::Evaluate(const MeasurementVectorType & x if (measurementVectorSize == 0) { - itkExceptionMacro(<< "Please set the MeasurementVectorSize first"); + itkExceptionMacro("Please set the MeasurementVectorSize first"); } MeasurementVectorTraits::Assert( this->GetOrigin(), @@ -58,7 +58,7 @@ EuclideanSquareDistanceMetric::Evaluate(const MeasurementVectorType & x if (measurementVectorSize != NumericTraits::GetLength(x2)) { - itkExceptionMacro(<< "EuclideanSquareDistanceMetric:: The two measurement vectors have unequal size"); + itkExceptionMacro("EuclideanSquareDistanceMetric:: The two measurement vectors have unequal size"); } double temp, distance = 0.0; diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx index 77bc6af2da4..c84ecb0f411 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx @@ -249,7 +249,7 @@ ExpectationMaximizationMixtureModelEstimator::CalculateExpectation() co else { // let's throw an exception - itkExceptionMacro(<< "temp is null"); + itkExceptionMacro("temp is null"); } // m_ComponentVector[componentIndex]->GetWeight(measurementVectorIndex) ) ); } diff --git a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx index 471cd3ba91a..7a250e2e2e6 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx @@ -85,13 +85,13 @@ GaussianMembershipFunction::SetCovariance(const CovarianceMa // Sanity check if (cov.GetVnlMatrix().rows() != cov.GetVnlMatrix().cols()) { - itkExceptionMacro(<< "Covariance matrix must be square"); + itkExceptionMacro("Covariance matrix must be square"); } if (this->GetMeasurementVectorSize()) { if (cov.GetVnlMatrix().rows() != this->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Length of measurement vectors must be" + itkExceptionMacro("Length of measurement vectors must be" << " the same as the size of the covariance."); } } @@ -117,7 +117,7 @@ GaussianMembershipFunction::SetCovariance(const CovarianceMa if (det < 0.) { - itkExceptionMacro(<< "det( m_Covariance ) < 0"); + itkExceptionMacro("det( m_Covariance ) < 0"); } // 1e-6 is an arbitrary value!!! @@ -181,7 +181,7 @@ GaussianMembershipFunction::InternalClone() const typename Self::Pointer membershipFunction = dynamic_cast(loPtr.GetPointer()); if (membershipFunction.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } membershipFunction->SetMeasurementVectorSize(this->GetMeasurementVectorSize()); diff --git a/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx b/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx index 4fbd5d2d972..1b54cc74f0a 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx +++ b/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx @@ -38,7 +38,7 @@ GaussianRandomSpatialNeighborSubsampler::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->m_Variance = this->m_Variance; @@ -53,7 +53,7 @@ GaussianRandomSpatialNeighborSubsampler::GetIntegerVariate(Ran { if (upperBound < lowerBound) { - itkExceptionMacro(<< "upperBound (" << upperBound << ") not >= to lowerBound(" << lowerBound << ')'); + itkExceptionMacro("upperBound (" << upperBound << ") not >= to lowerBound(" << lowerBound << ')'); } RandomIntType randInt = 0; diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx index 658fa15c685..7c6cf070488 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx @@ -143,7 +143,7 @@ ImageToHistogramFilter::InitializeOutputHistogram() { if (this->GetInput()->GetBufferedRegion() != this->GetInput()->GetLargestPossibleRegion()) { - itkExceptionMacro(<< "AutoMinimumMaximumInput is not supported with streaming."); + itkExceptionMacro("AutoMinimumMaximumInput is not supported with streaming."); } // we have to compute the minimum and maximum values diff --git a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx index 2a0b95af9e2..501cb1c3956 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx @@ -94,7 +94,7 @@ KdTreeGenerator::GenerateData() // same length as the sample generated by the tree. if (this->GetMeasurementVectorSize() != subsample->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Measurement Vector Length mismatch"); + itkExceptionMacro("Measurement Vector Length mismatch"); } MeasurementVectorType lowerBound; diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx index d439b5df21e..99292775cf8 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx @@ -72,13 +72,13 @@ MahalanobisDistanceMembershipFunction::SetCovariance(const CovarianceMa // Sanity check if (cov.GetVnlMatrix().rows() != cov.GetVnlMatrix().cols()) { - itkExceptionMacro(<< "Covariance matrix must be square"); + itkExceptionMacro("Covariance matrix must be square"); } if (this->GetMeasurementVectorSize()) { if (cov.GetVnlMatrix().rows() != this->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Length of measurement vectors must be" + itkExceptionMacro("Length of measurement vectors must be" << " the same as the size of the covariance."); } } @@ -104,7 +104,7 @@ MahalanobisDistanceMembershipFunction::SetCovariance(const CovarianceMa if (det < 0.) { - itkExceptionMacro(<< "det( m_Covariance ) < 0"); + itkExceptionMacro("det( m_Covariance ) < 0"); } // 1e-6 is an arbitrary value!!! @@ -181,7 +181,7 @@ MahalanobisDistanceMembershipFunction::InternalClone() const typename Self::Pointer membershipFunction = dynamic_cast(loPtr.GetPointer()); if (membershipFunction.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } membershipFunction->SetMeasurementVectorSize(this->GetMeasurementVectorSize()); diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx index b8a3abeff86..1aaca89a827 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx @@ -73,7 +73,7 @@ MahalanobisDistanceMetric::SetCovariance(const CovarianceMatrixType & c { if (cov.rows() != this->GetMeasurementVectorSize() || cov.cols() != this->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Size of the covariance matrix must be same as the length of" + itkExceptionMacro("Size of the covariance matrix must be same as the length of" << " the measurement vector."); } } @@ -90,7 +90,7 @@ MahalanobisDistanceMetric::SetInverseCovariance(const CovarianceMatrixT { if (invcov.rows() != this->GetMeasurementVectorSize() || invcov.cols() != this->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Size of the covariance matrix xcmust be same as the length of" + itkExceptionMacro("Size of the covariance matrix xcmust be same as the length of" << " each measurement vector."); } } @@ -173,7 +173,7 @@ MahalanobisDistanceMetric::Evaluate(const MeasurementVectorType & x1, c if (NumericTraits::GetLength(x1) != this->GetMeasurementVectorSize() || NumericTraits::GetLength(x2) != this->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Size of the measurement vectors is not the same as the length of" + itkExceptionMacro("Size of the measurement vectors is not the same as the length of" << " the measurement vector set in the distance metric."); } diff --git a/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx index 1c5b0bc1567..1d147818bef 100644 --- a/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx @@ -31,7 +31,7 @@ ManhattanDistanceMetric::Evaluate(const MeasurementVectorType & x) cons if (measurementVectorSize == 0) { - itkExceptionMacro(<< "Please set the MeasurementVectorSize first"); + itkExceptionMacro("Please set the MeasurementVectorSize first"); } MeasurementVectorTraits::Assert(this->GetOrigin(), measurementVectorSize, @@ -55,7 +55,7 @@ ManhattanDistanceMetric::Evaluate(const MeasurementVectorType & x1, con if (measurementVectorSize != NumericTraits::GetLength(x2)) { - itkExceptionMacro(<< "ManhattanDistanceMetric:: The two measurement vectors have unequal size"); + itkExceptionMacro("ManhattanDistanceMetric:: The two measurement vectors have unequal size"); } double temp, distance = 0.0; diff --git a/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.hxx b/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.hxx index 5dd21e50144..dcb8f4f33be 100644 --- a/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.hxx +++ b/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.hxx @@ -40,7 +40,7 @@ RegionConstrainedSubsampler::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } if (this->GetRegionConstraintInitialized()) diff --git a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx index 1ab33dff017..540226da5d7 100644 --- a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx +++ b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx @@ -40,7 +40,7 @@ SpatialNeighborSubsampler::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } if (this->GetRadiusInitialized()) @@ -82,11 +82,11 @@ SpatialNeighborSubsampler::Search(const InstanceIdentifier & q { if (!m_RadiusInitialized) { - itkExceptionMacro(<< "Radius not set."); + itkExceptionMacro("Radius not set."); } if (!this->m_SampleRegionInitialized) { - itkExceptionMacro(<< "Sample region not set."); + itkExceptionMacro("Sample region not set."); } if (!this->GetRegionConstraintInitialized()) { diff --git a/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx b/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx index 9c71b78b85d..a24df5f853b 100644 --- a/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx +++ b/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx @@ -41,7 +41,7 @@ SubsamplerBase::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->SetSample(this->GetSample()); rval->m_RequestMaximumNumberOfResults = this->m_RequestMaximumNumberOfResults; diff --git a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx index 72cf9f03b31..f875a0bfc1e 100644 --- a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx +++ b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx @@ -42,7 +42,7 @@ UniformRandomSpatialNeighborSubsampler::InternalClone() const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { - itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass() << " failed."); + itkExceptionMacro("downcast to type " << this->GetNameOfClass() << " failed."); } rval->m_NumberOfResultsRequested = this->m_NumberOfResultsRequested; @@ -58,11 +58,11 @@ UniformRandomSpatialNeighborSubsampler::Search(const InstanceI { if (!this->m_RadiusInitialized) { - itkExceptionMacro(<< "Radius not set."); + itkExceptionMacro("Radius not set."); } if (!this->m_SampleRegionInitialized) { - itkExceptionMacro(<< "Sample region not set."); + itkExceptionMacro("Sample region not set."); } if (!this->GetRegionConstraintInitialized()) { diff --git a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx index f1d6fb23648..002a07fe8ac 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx +++ b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx @@ -55,7 +55,7 @@ WeightedCentroidKdTreeGenerator::GenerateNonterminalNode(unsigned int // same length as the sample generated by the tree. if (this->GetMeasurementVectorSize() != subsample->GetMeasurementVectorSize()) { - itkExceptionMacro(<< "Measurement Vector Length mismatch"); + itkExceptionMacro("Measurement Vector Length mismatch"); } // calculates the weighted centroid which is the vector sum diff --git a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx index 265afa24a60..da2df17a03d 100644 --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx @@ -168,7 +168,7 @@ BlockMatchingImageFilter::FormTrainingHisto // Check to make sure everything is set if (!m_TrainingTransform) { - itkExceptionMacro(<< "Training Transform is not present"); + itkExceptionMacro("Training Transform is not present"); } if (!m_TrainingInterpolator) { - itkExceptionMacro(<< "Training Interpolator is not present"); + itkExceptionMacro("Training Interpolator is not present"); } if (!m_TrainingMovingImage) { - itkExceptionMacro(<< "Training MovingImage is not present"); + itkExceptionMacro("Training MovingImage is not present"); } // If the image is provided by a source, update the source. @@ -69,7 +69,7 @@ CompareHistogramImageToImageMetric::FormTrainingHisto if (!m_TrainingFixedImage) { - itkExceptionMacro(<< "Training FixedImage is not present"); + itkExceptionMacro("Training FixedImage is not present"); } // If the image is provided by a source, update the source. @@ -77,13 +77,13 @@ CompareHistogramImageToImageMetric::FormTrainingHisto if (m_TrainingFixedImageRegion.GetNumberOfPixels() == 0) { - itkExceptionMacro(<< "TrainingFixedImageRegion is empty"); + itkExceptionMacro("TrainingFixedImageRegion is empty"); } // Make sure the FixedImageRegion is within the FixedImage buffered region if (!m_TrainingFixedImageRegion.Crop(m_TrainingFixedImage->GetBufferedRegion())) { - itkExceptionMacro(<< "TrainingFixedImageRegion does not overlap the training fixed image buffered region"); + itkExceptionMacro("TrainingFixedImageRegion does not overlap the training fixed image buffered region"); } this->m_TrainingInterpolator->SetInputImage(GetTrainingMovingImage()); @@ -138,7 +138,7 @@ CompareHistogramImageToImageMetric::FormTrainingHisto if (NumberOfPixelsCounted == 0) { - itkExceptionMacro(<< "All the points mapped to outside of the Training moving age"); + itkExceptionMacro("All the points mapped to outside of the Training moving age"); } } diff --git a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx index a2cecc0d035..fa9d3accfc0 100644 --- a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx +++ b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx @@ -36,7 +36,7 @@ EuclideanDistancePointMetric::Get if (!movingPointSet) { - itkExceptionMacro(<< "Moving point set has not been assigned"); + itkExceptionMacro("Moving point set has not been assigned"); } return movingPointSet->GetPoints()->Size(); @@ -51,14 +51,14 @@ EuclideanDistancePointMetric::Get if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed point set has not been assigned"); + itkExceptionMacro("Fixed point set has not been assigned"); } MovingPointSetConstPointer movingPointSet = this->GetMovingPointSet(); if (!movingPointSet) { - itkExceptionMacro(<< "Moving point set has not been assigned"); + itkExceptionMacro("Moving point set has not been assigned"); } MovingPointIterator pointItr = movingPointSet->GetPoints()->Begin(); diff --git a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx index 6dd8dc561a1..a8a3c52309f 100644 --- a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx @@ -62,7 +62,7 @@ GradientDifferenceImageToImageMetric::Initialize() if (!this->GetComputeGradient()) { - itkExceptionMacro(<< "Gradients must be calculated"); + itkExceptionMacro("Gradients must be calculated"); } // Initialise the base class diff --git a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx index 75e4b0480a6..e15bda97220 100644 --- a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx @@ -80,11 +80,11 @@ HistogramImageToImageMetric::Initialize() if (!this->m_FixedImage) { - itkExceptionMacro(<< "Fixed image has not been set."); + itkExceptionMacro("Fixed image has not been set."); } else if (!this->m_MovingImage) { - itkExceptionMacro(<< "Moving image has not been set."); + itkExceptionMacro("Moving image has not been set."); } if (!m_LowerBoundSetByUser || !m_UpperBoundSetByUser) @@ -187,8 +187,9 @@ HistogramImageToImageMetric::GetDerivative(const Tran // Make sure the scales have been set if (m_DerivativeStepLengthScales.size() != ParametersDimension) { - itkExceptionMacro(<< "The size of DerivativesStepLengthScales is " << m_DerivativeStepLengthScales.size() - << ", but the Number of Parameters is " << ParametersDimension << '.'); + itkExceptionMacro("The size of DerivativesStepLengthScales is " << m_DerivativeStepLengthScales.size() + << ", but the Number of Parameters is " + << ParametersDimension << '.'); } // Calculate gradient. @@ -245,7 +246,7 @@ HistogramImageToImageMetric::ComputeHistogram(Transfo if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } using FixedIteratorType = itk::ImageRegionConstIteratorWithIndex; @@ -308,7 +309,7 @@ HistogramImageToImageMetric::ComputeHistogram(Transfo itkDebugMacro("NumberOfPixelsCounted = " << this->m_NumberOfPixelsCounted); if (this->m_NumberOfPixelsCounted == 0) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } } diff --git a/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx index a6c6f2e3a00..285b859be4a 100644 --- a/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx @@ -122,27 +122,27 @@ ImageRegistrationMethod::Initialize() { if (!m_FixedImage) { - itkExceptionMacro(<< "FixedImage is not present"); + itkExceptionMacro("FixedImage is not present"); } if (!m_MovingImage) { - itkExceptionMacro(<< "MovingImage is not present"); + itkExceptionMacro("MovingImage is not present"); } if (!m_Metric) { - itkExceptionMacro(<< "Metric is not present"); + itkExceptionMacro("Metric is not present"); } if (!m_Optimizer) { - itkExceptionMacro(<< "Optimizer is not present"); + itkExceptionMacro("Optimizer is not present"); } if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } // @@ -154,7 +154,7 @@ ImageRegistrationMethod::Initialize() if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } // Setup the metric @@ -182,7 +182,7 @@ ImageRegistrationMethod::Initialize() // Validate initial transform parameters if (m_InitialTransformParameters.Size() != m_Transform->GetNumberOfParameters()) { - itkExceptionMacro(<< "Size mismatch between initial parameters and transform." + itkExceptionMacro("Size mismatch between initial parameters and transform." << "Expected " << m_Transform->GetNumberOfParameters() << " parameters and received " << m_InitialTransformParameters.Size() << " parameters"); } diff --git a/Modules/Registration/Common/include/itkImageToImageMetric.hxx b/Modules/Registration/Common/include/itkImageToImageMetric.hxx index e98a210f145..2da27994d4b 100644 --- a/Modules/Registration/Common/include/itkImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkImageToImageMetric.hxx @@ -84,7 +84,7 @@ ImageToImageMetric::SetTransformParameters(const Para { if (!m_Transform) { - itkExceptionMacro(<< "Transform has not been assigned"); + itkExceptionMacro("Transform has not been assigned"); } m_Transform->SetParameters(parameters); } @@ -225,23 +225,23 @@ ImageToImageMetric::Initialize() { if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } m_NumberOfParameters = m_Transform->GetNumberOfParameters(); if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } if (!m_MovingImage) { - itkExceptionMacro(<< "MovingImage is not present"); + itkExceptionMacro("MovingImage is not present"); } if (!m_FixedImage) { - itkExceptionMacro(<< "FixedImage is not present"); + itkExceptionMacro("FixedImage is not present"); } // If the image is provided by a source, update the source. @@ -256,7 +256,7 @@ ImageToImageMetric::Initialize() { if (this->m_FixedImageIndexes.empty()) { - itkExceptionMacro(<< "FixedImageIndexes list is empty"); + itkExceptionMacro("FixedImageIndexes list is empty"); } } else @@ -264,12 +264,12 @@ ImageToImageMetric::Initialize() // Make sure the FixedImageRegion is within the FixedImage buffered region if (m_FixedImageRegion.GetNumberOfPixels() == 0) { - itkExceptionMacro(<< "FixedImageRegion is empty"); + itkExceptionMacro("FixedImageRegion is empty"); } if (!m_FixedImageRegion.Crop(m_FixedImage->GetBufferedRegion())) { - itkExceptionMacro(<< "FixedImageRegion does not overlap the fixed image buffered region"); + itkExceptionMacro("FixedImageRegion does not overlap the fixed image buffered region"); } } diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx index 3504a13ea5c..de152f3341d 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx @@ -38,7 +38,7 @@ ImageToSpatialObjectMetric::GetNumberOfParame { if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } return m_Transform->GetNumberOfParameters(); } @@ -49,22 +49,22 @@ ImageToSpatialObjectMetric::Initialize() { if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } if (!m_MovingSpatialObject) { - itkExceptionMacro(<< "MovingSpatialObject is not present"); + itkExceptionMacro("MovingSpatialObject is not present"); } if (!m_FixedImage) { - itkExceptionMacro(<< "FixedImage is not present"); + itkExceptionMacro("FixedImage is not present"); } // If the image is provided by a source, update the source. diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx index 95016c1d2d9..b07babb7e43 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx @@ -52,32 +52,32 @@ ImageToSpatialObjectRegistrationMethod::Initi { if (!m_FixedImage) { - itkExceptionMacro(<< "FixedImage is not present"); + itkExceptionMacro("FixedImage is not present"); } if (!m_MovingSpatialObject) { - itkExceptionMacro(<< "MovingSpatialObject is not present"); + itkExceptionMacro("MovingSpatialObject is not present"); } if (!m_Metric) { - itkExceptionMacro(<< "Metric is not present"); + itkExceptionMacro("Metric is not present"); } if (!m_Optimizer) { - itkExceptionMacro(<< "Optimizer is not present"); + itkExceptionMacro("Optimizer is not present"); } if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } m_Interpolator->SetInputImage(m_FixedImage); diff --git a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx index eb1621c67ba..4c24cc337b2 100644 --- a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx @@ -46,7 +46,7 @@ KappaStatisticImageToImageMetric::GetValue(const Tran FixedImageConstPointer fixedImage = this->m_FixedImage; if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } // Get an iterator over the fixed image @@ -60,7 +60,7 @@ KappaStatisticImageToImageMetric::GetValue(const Tran MovingImageConstPointer movingImage = this->m_MovingImage; if (!movingImage) { - itkExceptionMacro(<< "Moving image has not been assigned"); + itkExceptionMacro("Moving image has not been assigned"); } // The metric computation requires using the following: @@ -157,13 +157,13 @@ KappaStatisticImageToImageMetric::GetDerivative(const if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedImageConstPointer fixedImage = this->m_FixedImage; if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } const unsigned int ImageDimension = FixedImageType::ImageDimension; @@ -272,7 +272,7 @@ KappaStatisticImageToImageMetric::GetDerivative(const if (!this->m_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx index dea66dff9a5..1a3712eb5c2 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx @@ -66,7 +66,7 @@ LandmarkBasedTransformInitializer::Intern return; } - itkExceptionMacro(<< "Unsupported Transform Type " << this->m_Transform->GetNameOfClass()); + itkExceptionMacro("Unsupported Transform Type " << this->m_Transform->GetNameOfClass()); } template @@ -77,7 +77,7 @@ LandmarkBasedTransformInitializer::Intern auto * transform = dynamic_cast(this->m_Transform.GetPointer()); if (transform == nullptr) { - itkExceptionMacro(<< "BSplineTransform Expected but transform is " << this->m_Transform->GetNameOfClass()); + itkExceptionMacro("BSplineTransform Expected but transform is " << this->m_Transform->GetNameOfClass()); } if (m_ReferenceImage.IsNull()) { @@ -102,7 +102,7 @@ LandmarkBasedTransformInitializer::Intern { if (this->m_LandmarkWeight.size() != numberOfLandMarks) { - itkExceptionMacro(<< "Size mismatch between number of landmarks pairs and weights"); + itkExceptionMacro("Size mismatch between number of landmarks pairs and weights"); } auto weightIt = this->m_LandmarkWeight.begin(); for (unsigned int i = 0; weightIt != this->m_LandmarkWeight.end(); ++i, ++weightIt) @@ -198,14 +198,14 @@ LandmarkBasedTransformInitializer::Intern auto * transform = dynamic_cast(this->m_Transform.GetPointer()); if (transform == nullptr) { - itkExceptionMacro(<< "AffineTransform Expected but transform is " << this->m_Transform->GetNameOfClass()); + itkExceptionMacro("AffineTransform Expected but transform is " << this->m_Transform->GetNameOfClass()); } const auto numberOfLandmarks = static_cast(this->m_MovingLandmarks.size()); if (numberOfLandmarks < LandmarkPointContainer::value_type::GetPointDimension() + 1) { - itkExceptionMacro(<< " insufficient number of landmarks, expected " + itkExceptionMacro(" insufficient number of landmarks, expected " << LandmarkPointContainer::value_type::GetPointDimension() + 1 << " got " << numberOfLandmarks); } @@ -219,7 +219,7 @@ LandmarkBasedTransformInitializer::Intern { if (this->m_LandmarkWeight.size() != numberOfLandmarks) { - itkExceptionMacro(<< " size mismatch between number of landmars pairs and weights"); + itkExceptionMacro(" size mismatch between number of landmars pairs and weights"); } auto weightIt = this->m_LandmarkWeight.begin(); for (unsigned int i = 0; weightIt != this->m_LandmarkWeight.end(); ++i, ++weightIt) @@ -344,8 +344,7 @@ LandmarkBasedTransformInitializer::Intern auto * transform = dynamic_cast(this->m_Transform.GetPointer()); if (transform == nullptr) { - itkExceptionMacro(<< "VersorRigid3DTransformType Expected but transform is " - << this->m_Transform->GetNameOfClass()); + itkExceptionMacro("VersorRigid3DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass()); } // Sanity check @@ -477,7 +476,7 @@ LandmarkBasedTransformInitializer::Intern auto * transform = dynamic_cast(this->m_Transform.GetPointer()); if (transform == nullptr) { - itkExceptionMacro(<< "Similarity3DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass()); + itkExceptionMacro("Similarity3DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass()); } // Sanity check for dimension. @@ -626,7 +625,7 @@ LandmarkBasedTransformInitializer::Intern if (transform == nullptr) { - itkExceptionMacro(<< "Rigid2DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass()); + itkExceptionMacro("Rigid2DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass()); } // Sanity check. if (ImageDimension != 2) diff --git a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx index 9ae9c7e09e3..aaea3b7df4f 100644 --- a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx @@ -49,7 +49,7 @@ MatchCardinalityImageToImageMetric::GetNonconstValue( FixedImageConstPointer fixedImage = this->m_FixedImage; if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } // Initialize some variables before spawning threads @@ -99,7 +99,7 @@ MatchCardinalityImageToImageMetric::GetNonconstValue( if (!this->m_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { @@ -119,7 +119,7 @@ MatchCardinalityImageToImageMetric::ThreadedGetValue( if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } using FixedIteratorType = ImageRegionConstIteratorWithIndex; diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx index 7c9443e59c6..e251fb5af07 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx @@ -51,7 +51,7 @@ MeanReciprocalSquareDifferenceImageToImageMetric::Get if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } double MovingValue; diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx index a5e6f2f1bbe..07fda3cfc80 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx @@ -39,7 +39,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetricGetPoints()->Begin(); @@ -77,7 +77,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetricm_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { @@ -95,14 +95,14 @@ MeanReciprocalSquareDifferencePointSetToImageMetricGetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedPointSetConstPointer fixedPointSet = this->GetFixedPointSet(); if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } this->m_NumberOfPixelsCounted = 0; @@ -173,7 +173,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetricm_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { @@ -193,14 +193,14 @@ MeanReciprocalSquareDifferencePointSetToImageMetricGetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedPointSetConstPointer fixedPointSet = this->GetFixedPointSet(); if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } this->m_NumberOfPixelsCounted = 0; @@ -270,7 +270,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetricm_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { diff --git a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx index 679082aec96..526943eb7c4 100644 --- a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx +++ b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx @@ -75,7 +75,7 @@ MeanSquareRegistrationFunction::I { if (!this->GetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // cache fixed image information diff --git a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx index b0a4c8abb07..a3068cd1fd2 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx @@ -97,7 +97,7 @@ MeanSquaresImageToImageMetric::GetValue(const Paramet if (!this->m_FixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } for (unsigned int i = 0; i < this->m_NumberOfWorkUnits; ++i) @@ -187,7 +187,7 @@ MeanSquaresImageToImageMetric::GetValueAndDerivative( { if (!this->m_FixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } // Set up the parameters in the transform @@ -247,7 +247,7 @@ MeanSquaresImageToImageMetric::GetDerivative(const Pa { if (!this->m_FixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } MeasureType value; diff --git a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx index cc9182fc63f..f566e1affdb 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx @@ -34,7 +34,7 @@ MeanSquaresPointSetToImageMetric::GetValue( if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed point set has not been assigned"); + itkExceptionMacro("Fixed point set has not been assigned"); } PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); @@ -71,7 +71,7 @@ MeanSquaresPointSetToImageMetric::GetValue( if (!this->m_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { @@ -92,14 +92,14 @@ MeanSquaresPointSetToImageMetric::GetDerivative( { if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedPointSetConstPointer fixedPointSet = this->GetFixedPointSet(); if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } this->m_NumberOfPixelsCounted = 0; @@ -165,7 +165,7 @@ MeanSquaresPointSetToImageMetric::GetDerivative( if (!this->m_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { @@ -188,14 +188,14 @@ MeanSquaresPointSetToImageMetric::GetValueAndDeriv { if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedPointSetConstPointer fixedPointSet = this->GetFixedPointSet(); if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } this->m_NumberOfPixelsCounted = 0; @@ -265,7 +265,7 @@ MeanSquaresPointSetToImageMetric::GetValueAndDeriv if (!this->m_NumberOfPixelsCounted) { - itkExceptionMacro(<< "All the points mapped to outside of the moving image"); + itkExceptionMacro("All the points mapped to outside of the moving image"); } else { diff --git a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx index efbbd5448f9..79f49972fc3 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx @@ -70,22 +70,22 @@ MultiResolutionImageRegistrationMethod::Initialize() // Sanity checks if (!m_Metric) { - itkExceptionMacro(<< "Metric is not present"); + itkExceptionMacro("Metric is not present"); } if (!m_Optimizer) { - itkExceptionMacro(<< "Optimizer is not present"); + itkExceptionMacro("Optimizer is not present"); } if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } // Setup the metric @@ -164,35 +164,35 @@ MultiResolutionImageRegistrationMethod::PreparePyrami { if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } m_InitialTransformParametersOfNextLevel = m_InitialTransformParameters; if (m_InitialTransformParametersOfNextLevel.Size() != m_Transform->GetNumberOfParameters()) { - itkExceptionMacro(<< "Size mismatch between initial parameter and transform"); + itkExceptionMacro("Size mismatch between initial parameter and transform"); } // Sanity checks if (!m_FixedImage) { - itkExceptionMacro(<< "FixedImage is not present"); + itkExceptionMacro("FixedImage is not present"); } if (!m_MovingImage) { - itkExceptionMacro(<< "MovingImage is not present"); + itkExceptionMacro("MovingImage is not present"); } if (!m_FixedImagePyramid) { - itkExceptionMacro(<< "Fixed image pyramid is not present"); + itkExceptionMacro("Fixed image pyramid is not present"); } if (!m_MovingImagePyramid) { - itkExceptionMacro(<< "Moving image pyramid is not present"); + itkExceptionMacro("Moving image pyramid is not present"); } // Setup the fixed and moving image pyramid diff --git a/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx b/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx index 889e3f4daa5..3403c52e146 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx +++ b/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx @@ -314,7 +314,7 @@ MultiResolutionPyramidImageFilter::GenerateOutputInfo if (!inputPtr) { - itkExceptionMacro(<< "Input has not been set"); + itkExceptionMacro("Input has not been set"); } const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); @@ -392,7 +392,7 @@ MultiResolutionPyramidImageFilter::GenerateOutputRequ auto * ptr = itkDynamicCastInDebugMode(refOutput); if (!ptr) { - itkExceptionMacro(<< "Could not cast refOutput to TOutputImage*."); + itkExceptionMacro("Could not cast refOutput to TOutputImage*."); } unsigned int ilevel, idim; @@ -478,7 +478,7 @@ MultiResolutionPyramidImageFilter::GenerateInputReque InputImagePointer inputPtr = const_cast(this->GetInput()); if (!inputPtr) { - itkExceptionMacro(<< "Input has not been set."); + itkExceptionMacro("Input has not been set."); } // compute baseIndex and baseSize diff --git a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx index 8fc92f7404f..29bbe60b29f 100644 --- a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx @@ -137,7 +137,7 @@ MutualInformationImageToImageMetric::SampleFixedImage { // We randomly visited as many points as is the size of the fixed image // region.. Too may samples mapped outside.. go change your transform - itkExceptionMacro(<< "Too many samples mapped outside the moving buffer"); + itkExceptionMacro("Too many samples mapped outside the moving buffer"); } } @@ -173,7 +173,7 @@ MutualInformationImageToImageMetric::SampleFixedImage if (allOutside) { // if all the samples mapped to the outside throw an exception - itkExceptionMacro(<< "All the sampled point mapped to outside of the moving image"); + itkExceptionMacro("All the sampled point mapped to outside of the moving image"); } } @@ -250,7 +250,7 @@ MutualInformationImageToImageMetric::GetValue(const P { // at least half the samples in B did not occur within // the Parzen window width of samples in A - itkExceptionMacro(<< "Standard deviation is too small"); + itkExceptionMacro("Standard deviation is too small"); } MeasureType measure = dLogSumFixed.GetSum() + dLogSumMoving.GetSum() - dLogSumJoint.GetSum(); @@ -390,7 +390,7 @@ MutualInformationImageToImageMetric::GetValueAndDeriv { // at least half the samples in B did not occur within // the Parzen window width of samples in A - itkExceptionMacro(<< "Standard deviation is too small"); + itkExceptionMacro("Standard deviation is too small"); } value = dLogSumFixed.GetSum() + dLogSumMoving.GetSum() - dLogSumJoint.GetSum(); diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx index 0c3d2300549..a9747e9fdb2 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx @@ -38,7 +38,7 @@ NormalizedCorrelationImageToImageMetric::GetValue( if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } using FixedIteratorType = itk::ImageRegionConstIteratorWithIndex; @@ -129,14 +129,14 @@ NormalizedCorrelationImageToImageMetric::GetDerivativ { if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedImageConstPointer fixedImage = this->m_FixedImage; if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } const unsigned int dimension = FixedImageType::ImageDimension; @@ -312,14 +312,14 @@ NormalizedCorrelationImageToImageMetric::GetValueAndD { if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedImageConstPointer fixedImage = this->m_FixedImage; if (!fixedImage) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } const unsigned int dimension = FixedImageType::ImageDimension; diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx index 5e2dbeef06c..ac8566779ce 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx @@ -38,7 +38,7 @@ NormalizedCorrelationPointSetToImageMetric::GetVal if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed point set has not been assigned"); + itkExceptionMacro("Fixed point set has not been assigned"); } PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); @@ -115,14 +115,14 @@ NormalizedCorrelationPointSetToImageMetric::GetDer { if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedPointSetConstPointer fixedPointSet = this->GetFixedPointSet(); if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } const unsigned int dimension = Superclass::FixedPointSetDimension; @@ -258,14 +258,14 @@ NormalizedCorrelationPointSetToImageMetric::GetVal { if (!this->GetGradientImage()) { - itkExceptionMacro(<< "The gradient image is null, maybe you forgot to call Initialize()"); + itkExceptionMacro("The gradient image is null, maybe you forgot to call Initialize()"); } FixedPointSetConstPointer fixedPointSet = this->GetFixedPointSet(); if (!fixedPointSet) { - itkExceptionMacro(<< "Fixed image has not been assigned"); + itkExceptionMacro("Fixed image has not been assigned"); } const unsigned int dimension = Superclass::FixedPointSetDimension; diff --git a/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx index 68b746f4057..b06f69a5a50 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx @@ -40,7 +40,7 @@ PointSetToImageMetric::SetTransformParameters(cons { if (!m_Transform) { - itkExceptionMacro(<< "Transform has not been assigned"); + itkExceptionMacro("Transform has not been assigned"); } m_Transform->SetParameters(parameters); } @@ -51,22 +51,22 @@ PointSetToImageMetric::Initialize() { if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } if (!m_MovingImage) { - itkExceptionMacro(<< "MovingImage is not present"); + itkExceptionMacro("MovingImage is not present"); } if (!m_FixedPointSet) { - itkExceptionMacro(<< "FixedPointSet is not present"); + itkExceptionMacro("FixedPointSet is not present"); } // If the image is provided by a source, update the source. diff --git a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx index 547a71734ed..822055aa725 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx @@ -54,32 +54,32 @@ PointSetToImageRegistrationMethod::Initialize() { if (!m_FixedPointSet) { - itkExceptionMacro(<< "FixedPointSet is not present"); + itkExceptionMacro("FixedPointSet is not present"); } if (!m_MovingImage) { - itkExceptionMacro(<< "MovingImage is not present"); + itkExceptionMacro("MovingImage is not present"); } if (!m_Metric) { - itkExceptionMacro(<< "Metric is not present"); + itkExceptionMacro("Metric is not present"); } if (!m_Optimizer) { - itkExceptionMacro(<< "Optimizer is not present"); + itkExceptionMacro("Optimizer is not present"); } if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } if (!m_Interpolator) { - itkExceptionMacro(<< "Interpolator is not present"); + itkExceptionMacro("Interpolator is not present"); } // Set up the metric @@ -96,7 +96,7 @@ PointSetToImageRegistrationMethod::Initialize() // Validate initial transform parameters if (m_InitialTransformParameters.Size() != m_Transform->GetNumberOfParameters()) { - itkExceptionMacro(<< "Size mismatch between initial parameter and transform"); + itkExceptionMacro("Size mismatch between initial parameter and transform"); } m_Optimizer->SetInitialPosition(m_InitialTransformParameters); diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx b/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx index 0ec3055a7e7..afaa994ac6f 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx +++ b/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx @@ -37,7 +37,7 @@ PointSetToPointSetMetric::SetTransformParameter { if (!m_Transform) { - itkExceptionMacro(<< "Transform has not been assigned"); + itkExceptionMacro("Transform has not been assigned"); } m_Transform->SetParameters(parameters); } @@ -48,17 +48,17 @@ PointSetToPointSetMetric::Initialize() { if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } if (!m_MovingPointSet) { - itkExceptionMacro(<< "MovingPointSet is not present"); + itkExceptionMacro("MovingPointSet is not present"); } if (!m_FixedPointSet) { - itkExceptionMacro(<< "FixedPointSet is not present"); + itkExceptionMacro("FixedPointSet is not present"); } // If the PointSet is provided by a source, update the source. diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx index b7973d88bf6..f4d82da0736 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx @@ -54,27 +54,27 @@ PointSetToPointSetRegistrationMethod::Initializ { if (!m_FixedPointSet) { - itkExceptionMacro(<< "FixedPointSet is not present"); + itkExceptionMacro("FixedPointSet is not present"); } if (!m_MovingPointSet) { - itkExceptionMacro(<< "MovingPointSet is not present"); + itkExceptionMacro("MovingPointSet is not present"); } if (!m_Metric) { - itkExceptionMacro(<< "Metric is not present"); + itkExceptionMacro("Metric is not present"); } if (!m_Optimizer) { - itkExceptionMacro(<< "Optimizer is not present"); + itkExceptionMacro("Optimizer is not present"); } if (!m_Transform) { - itkExceptionMacro(<< "Transform is not present"); + itkExceptionMacro("Transform is not present"); } // Set up the metric @@ -90,7 +90,7 @@ PointSetToPointSetRegistrationMethod::Initializ // Validate initial transform parameters if (m_InitialTransformParameters.Size() != m_Transform->GetNumberOfParameters()) { - itkExceptionMacro(<< "Size mismatch between initial parameter and transform"); + itkExceptionMacro("Size mismatch between initial parameter and transform"); } m_Optimizer->SetInitialPosition(m_InitialTransformParameters); diff --git a/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx b/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx index bd57cf1a8c5..da780a8ca59 100644 --- a/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx +++ b/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx @@ -221,7 +221,7 @@ RecursiveMultiResolutionPyramidImageFilter::GenerateO auto * refOutputPtr = itkDynamicCastInDebugMode(ptr); if (!refOutputPtr) { - itkExceptionMacro(<< "Could not cast ptr to TOutputImage*."); + itkExceptionMacro("Could not cast ptr to TOutputImage*."); } // find the index for this output @@ -344,7 +344,7 @@ RecursiveMultiResolutionPyramidImageFilter::GenerateI InputImagePointer inputPtr = const_cast(this->GetInput()); if (!inputPtr) { - itkExceptionMacro(<< "Input has not been set."); + itkExceptionMacro("Input has not been set."); } // compute baseIndex and baseSize diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx index 2558ae371ec..03db481bf15 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx @@ -504,7 +504,7 @@ FEMRegistrationFilter::IterativeSolve(Sol { if (!m_Load) { - itkExceptionMacro(<< "No Load set"); + itkExceptionMacro("No Load set"); } bool Done = false; @@ -523,7 +523,7 @@ FEMRegistrationFilter::IterativeSolve(Sol if (!m_Field) { - itkExceptionMacro(<< "No Field set"); + itkExceptionMacro("No Field set"); } solver->SetUseMassMatrix(m_UseMassMatrix); diff --git a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx index b979e5d1861..cded3467dc2 100644 --- a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx @@ -63,7 +63,7 @@ MIRegistrationFunction::Initializ { if (!this->m_MovingImage || !this->m_FixedImage || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // Set up gradient calculator diff --git a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx index 94c92af410e..3a28ee85c8f 100644 --- a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx @@ -56,7 +56,7 @@ NCCRegistrationFunction::Initiali { if (!this->m_MovingImage || !this->m_FixedImage || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // Cache fixed image information diff --git a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx index d82de7b4756..448aed82c92 100644 --- a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx +++ b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx @@ -54,7 +54,7 @@ VTKTetrahedralMeshReader::GenerateData() if (m_FileName.empty()) { - itkExceptionMacro(<< "No input FileName"); + itkExceptionMacro("No input FileName"); } // @@ -64,7 +64,7 @@ VTKTetrahedralMeshReader::GenerateData() if (!inputFile.is_open()) { - itkExceptionMacro(<< "Unable to open file\n" + itkExceptionMacro("Unable to open file\n" << "inputFilename= " << m_FileName); } @@ -76,7 +76,7 @@ VTKTetrahedralMeshReader::GenerateData() std::getline(inputFile, m_Version, '\n'); if (inputFile.fail()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read first line."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read first line."); } if (m_Version.find("# vtk DataFile Version ") == std::string::npos) @@ -90,20 +90,20 @@ VTKTetrahedralMeshReader::GenerateData() std::getline(inputFile, m_Header, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read header."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to read header."); } // Next is the file format std::getline(inputFile, line, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to file format."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file trying to file format."); } if (line.find("ASCII") == std::string::npos) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFile format is " << line - << " but only ASCII files can be read."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFile format is " << line + << " but only ASCII files can be read."); } bool foundPoints = false; @@ -120,7 +120,7 @@ VTKTetrahedralMeshReader::GenerateData() if (!foundPoints) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding POINTS."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding POINTS."); } itkDebugMacro("POINTS line" << line); @@ -131,16 +131,16 @@ VTKTetrahedralMeshReader::GenerateData() if (sscanf(pointLine.c_str(), "%lu", &numberOfPoints) != 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read numberOfPoints.\n" - << " pointLine= " << pointLine); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read numberOfPoints.\n" + << " pointLine= " << pointLine); } itkDebugMacro("numberOfPoints= " << numberOfPoints); if (numberOfPoints < 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "numberOfPoints < 1" - << " numberOfPoints line= " << numberOfPoints); + itkExceptionMacro("Error reading file: " << m_FileName << "numberOfPoints < 1" + << " numberOfPoints line= " << numberOfPoints); } PointsContainer * points = outputMesh->GetPoints(); @@ -157,13 +157,13 @@ VTKTetrahedralMeshReader::GenerateData() inputFile >> point; if (inputFile.eof()) { - itkExceptionMacro(<< "Error while reading file: " << m_FileName - << "\nUnexpected end-of-file trying to read points."); + itkExceptionMacro("Error while reading file: " << m_FileName + << "\nUnexpected end-of-file trying to read points."); } if (inputFile.fail()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nInput could not be interpreted as a point."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nInput could not be interpreted as a point."); } outputMesh->SetPoint(pointId, point); @@ -183,7 +183,7 @@ VTKTetrahedralMeshReader::GenerateData() if (!foundCells) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding CELLS."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding CELLS."); } itkDebugMacro("CELLS line" << line); @@ -200,8 +200,8 @@ VTKTetrahedralMeshReader::GenerateData() if (sscanf(cellsLine.c_str(), "%lu %lu", &numberOfCells, &numberOfIndices) != 2) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read numberOfCells from subline2" - << "\ncellsLine = " << cellsLine); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read numberOfCells from subline2" + << "\ncellsLine = " << cellsLine); } itkDebugMacro("numberOfCells " << numberOfCells); @@ -209,15 +209,14 @@ VTKTetrahedralMeshReader::GenerateData() if (numberOfCells < 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nnumberOfCells < 1\nnumberOfCells= " << numberOfCells); + itkExceptionMacro("Error reading file: " << m_FileName << "\nnumberOfCells < 1\nnumberOfCells= " << numberOfCells); } if (numberOfIndices < numberOfCells) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nnumberOfIndices < numberOfCells\n" - << "numberOfIndices= " << numberOfIndices << '\n' - << "numberOfCells= " << numberOfCells); + itkExceptionMacro("Error reading file: " << m_FileName << "\nnumberOfIndices < numberOfCells\n" + << "numberOfIndices= " << numberOfIndices << '\n' + << "numberOfCells= " << numberOfCells); } // @@ -232,39 +231,39 @@ VTKTetrahedralMeshReader::GenerateData() std::getline(inputFile, line, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read " << numberOfCells - << " cells before the end of file." - << " Only read " << cellId + 1); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read " << numberOfCells + << " cells before the end of file." + << " Only read " << cellId + 1); } if (line.find("DATA") != std::string::npos) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nRead keyword DATA"); + itkExceptionMacro("Error reading file: " << m_FileName << "\nRead keyword DATA"); } unsigned long numberOfPointsFound; if ((numberOfPointsFound = sscanf(line.c_str(), "%lu %ld %ld %ld %ld", &numberOfCellPoints, &ids[0], &ids[1], &ids[2], &ids[3])) != 5) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nError parsing Tetrahedron CELLS . Expected 5 items but got " << numberOfPointsFound - << std::endl - << "Line is: " << line); + itkExceptionMacro("Error reading file: " << m_FileName + << "\nError parsing Tetrahedron CELLS . Expected 5 items but got " + << numberOfPointsFound << std::endl + << "Line is: " << line); } if (numberOfCellPoints != 4) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nnumberOfCellPoints != 4\n" - << "numberOfCellPoints= " << numberOfCellPoints << "\ncellId = " << cellId - << ". VTKTetrahedralMeshReader can only read tetrahedra"); + itkExceptionMacro("Error reading file: " << m_FileName << "\nnumberOfCellPoints != 4\n" + << "numberOfCellPoints= " << numberOfCellPoints << "\ncellId = " + << cellId << ". VTKTetrahedralMeshReader can only read tetrahedra"); } if (ids[0] < 0 || ids[1] < 0 || ids[2] < 0 || ids[3] < 0) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "point ids must be >= 0.\n" - "ids=" - << ids[0] << ' ' << ids[1] << ' ' << ids[2] << ' ' << ids[3]); + itkExceptionMacro("Error reading file: " << m_FileName + << "point ids must be >= 0.\n" + "ids=" + << ids[0] << ' ' << ids[1] << ' ' << ids[2] << ' ' << ids[3]); } if (static_cast(ids[0]) >= numberOfPoints || @@ -272,8 +271,9 @@ VTKTetrahedralMeshReader::GenerateData() static_cast(ids[2]) >= numberOfPoints || static_cast(ids[3]) >= numberOfPoints) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "Point ids must be < number of points: " - << numberOfPoints << "\nids= " << ids[0] << ' ' << ids[1] << ' ' << ids[2] << ' ' << ids[3]); + itkExceptionMacro("Error reading file: " << m_FileName << "Point ids must be < number of points: " + << numberOfPoints << "\nids= " << ids[0] << ' ' << ids[1] << ' ' + << ids[2] << ' ' << ids[3]); } CellAutoPointer cell; @@ -303,7 +303,7 @@ VTKTetrahedralMeshReader::GenerateData() if (!bfoundCellTypes) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding CELL_TYPES."); + itkExceptionMacro("Error reading file: " << m_FileName << "\nUnexpected end-of-file before finding CELL_TYPES."); } itkDebugMacro("CELL_TYPES line" << line); @@ -316,14 +316,14 @@ VTKTetrahedralMeshReader::GenerateData() unsigned int numberOfCellTypes = 0; if (sscanf(cellsTypesLine.c_str(), "%u", &numberOfCellTypes) != 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read numberOfCellTypes from subline2" - << "\ncellsTypesLine = " << cellsTypesLine); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read numberOfCellTypes from subline2" + << "\ncellsTypesLine = " << cellsTypesLine); } if (static_cast(numberOfCellTypes) != numberOfCells) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nnumberOfCellTypes < numberOfCells "); + itkExceptionMacro("Error reading file: " << m_FileName << "\nnumberOfCellTypes < numberOfCells "); } @@ -332,9 +332,9 @@ VTKTetrahedralMeshReader::GenerateData() std::getline(inputFile, line, '\n'); if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nFailed to read " << numberOfCellTypes - << " cells before the end of file." - << " Only read " << cellId + 1); + itkExceptionMacro("Error reading file: " << m_FileName << "\nFailed to read " << numberOfCellTypes + << " cells before the end of file." + << " Only read " << cellId + 1); } @@ -342,9 +342,9 @@ VTKTetrahedralMeshReader::GenerateData() int cellTypeFound; if ((cellTypeFound = sscanf(line.c_str(), "%d ", &cellTypeID)) != 1) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nError parsing Cells types. Expected 1 item but got " << cellTypeFound << std::endl - << "Line is: " << line); + itkExceptionMacro("Error reading file: " << m_FileName << "\nError parsing Cells types. Expected 1 item but got " + << cellTypeFound << std::endl + << "Line is: " << line); } @@ -352,8 +352,9 @@ VTKTetrahedralMeshReader::GenerateData() if (cellTypeID != tetrahedralCellTypeID) { - itkExceptionMacro(<< "Error reading file: " << m_FileName << "\nCell type != 10\n" - << "Cell type = " << cellTypeID << ". VTKTetrahedralMeshReader can only read tetrahedra"); + itkExceptionMacro("Error reading file: " << m_FileName << "\nCell type != 10\n" + << "Cell type = " << cellTypeID + << ". VTKTetrahedralMeshReader can only read tetrahedra"); } } @@ -404,9 +405,9 @@ VTKTetrahedralMeshReader::GenerateData() { if (inputFile.eof()) { - itkExceptionMacro(<< "Error reading file: " << m_FileName - << "\nUnexpected end-of-file while trying to read POINT_DATA." - << "Failed while trying to reading point data for id: " << pid); + itkExceptionMacro("Error reading file: " << m_FileName + << "\nUnexpected end-of-file while trying to read POINT_DATA." + << "Failed while trying to reading point data for id: " << pid); } inputFile >> pointData; outputMesh->SetPointData(pid, pointData); diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx index b4eb7c3ba40..281695979bb 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx @@ -57,7 +57,7 @@ GPUDemonsRegistrationFilterSetUseMovingImageGradient(m_UseMovingImageGradient); @@ -77,7 +77,7 @@ GPUDemonsRegistrationFilterGetMetric(); @@ -92,7 +92,7 @@ GPUDemonsRegistrationFilterGetIntensityDifferenceThreshold(); @@ -107,7 +107,7 @@ GPUDemonsRegistrationFilterSetIntensityDifferenceThreshold(threshold); @@ -133,7 +133,7 @@ GPUDemonsRegistrationFilterSetRMSChange(drfp->GetRMSChange()); diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx index b6426c1aac4..8f89825e427 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx @@ -147,7 +147,7 @@ GPUDemonsRegistrationFunction::In { if (!this->GetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // cache fixed image information diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx index a636ce349b7..abf1754e06a 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx @@ -156,7 +156,7 @@ GPUPDEDeformableRegistrationFilterSetFixedImage(fixedPtr); diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx index d4ada801135..b060e7c2a08 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx @@ -92,19 +92,19 @@ ImageToImageMetricv4m_FixedImage.IsNull()) { - itkExceptionMacro(<< "FixedImage is not present"); + itkExceptionMacro("FixedImage is not present"); } if (this->m_MovingImage.IsNull()) { - itkExceptionMacro(<< "MovingImage is not present"); + itkExceptionMacro("MovingImage is not present"); } if (this->m_FixedTransform.IsNull()) { - itkExceptionMacro(<< "FixedTransform is not present"); + itkExceptionMacro("FixedTransform is not present"); } if (this->m_MovingTransform.IsNull()) { - itkExceptionMacro(<< "MovingTransform is not present"); + itkExceptionMacro("MovingTransform is not present"); } // If the image is provided by a source, update the source. diff --git a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx index 53c66f5d246..d23632a0968 100644 --- a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx @@ -86,7 +86,7 @@ CurvatureRegistrationFilterSetDisplacementField(this->GetDisplacementField()); @@ -190,7 +190,7 @@ CurvatureRegistrationFilterGetMetric(); diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.hxx index 1630732ebc4..14fbdb1a9ce 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.hxx @@ -54,7 +54,7 @@ DemonsRegistrationFilter::Initial if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to DemonsRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to DemonsRegistrationFunction"); } drfp->SetUseMovingImageGradient(m_UseMovingImageGradient); @@ -74,7 +74,7 @@ DemonsRegistrationFilter::GetMetr if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to DemonsRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to DemonsRegistrationFunction"); } return drfp->GetMetric(); @@ -88,7 +88,7 @@ DemonsRegistrationFilter::GetInte if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to DemonsRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to DemonsRegistrationFunction"); } return drfp->GetIntensityDifferenceThreshold(); @@ -103,7 +103,7 @@ DemonsRegistrationFilter::SetInte if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to DemonsRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to DemonsRegistrationFunction"); } drfp->SetIntensityDifferenceThreshold(threshold); @@ -126,7 +126,7 @@ DemonsRegistrationFilter::ApplyUp if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to DemonsRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to DemonsRegistrationFunction"); } this->SetRMSChange(drfp->GetRMSChange()); diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx index 0db97bf463a..f3ef919f698 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx @@ -112,7 +112,7 @@ DemonsRegistrationFunction::Initi { if (!this->GetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // cache fixed image information diff --git a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx index 55a9743770e..a28ca82337d 100644 --- a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx @@ -55,7 +55,7 @@ typename DiffeomorphicDemonsRegistrationFilter::In { if (!this->GetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // cache fixed image information @@ -313,7 +313,7 @@ ESMDemonsRegistrationFunction::Co } else { - itkExceptionMacro(<< "Unknown gradient type"); + itkExceptionMacro("Unknown gradient type"); } } else if (this->m_UseGradientType == GradientEnum::Fixed) @@ -338,7 +338,7 @@ ESMDemonsRegistrationFunction::Co } else { - itkExceptionMacro(<< "Unknown gradient type"); + itkExceptionMacro("Unknown gradient type"); } const auto usedGradientTimes2 = diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx index 044d12eb83a..ec0e4c83121 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx @@ -139,7 +139,7 @@ typename FastSymmetricForcesDemonsRegistrationFilterGetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // cache fixed image information diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.hxx index 12bcc74b05a..f06147689b2 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.hxx @@ -60,7 +60,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } drfp->SetUseImageSpacing(this->GetUseImageSpacing()); @@ -97,7 +97,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } return drfp->GetMetric(); @@ -111,7 +111,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } return drfp->GetAlpha(); @@ -125,7 +125,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } drfp->SetAlpha(alpha); @@ -139,7 +139,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } return drfp->GetIntensityDifferenceThreshold(); @@ -154,7 +154,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } drfp->SetIntensityDifferenceThreshold(threshold); @@ -168,7 +168,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } return drfp->GetGradientMagnitudeThreshold(); @@ -183,7 +183,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } drfp->SetGradientMagnitudeThreshold(threshold); @@ -198,7 +198,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } return drfp->GetGradientSmoothingStandardDeviations(); @@ -213,7 +213,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } drfp->SetGradientSmoothingStandardDeviations(sigma); @@ -236,7 +236,7 @@ LevelSetMotionRegistrationFilter: if (!drfp) { - itkExceptionMacro(<< "Could not cast difference function to LevelSetMotionRegistrationFunction"); + itkExceptionMacro("Could not cast difference function to LevelSetMotionRegistrationFunction"); } this->SetRMSChange(drfp->GetRMSChange()); diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx index 0973b0cf911..690506a2a00 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx @@ -176,7 +176,7 @@ LevelSetMotionRegistrationFunctionGetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // create a smoothed version of the moving image for the calculation diff --git a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx index 181b40436cd..7ac02545c4d 100644 --- a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx +++ b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx @@ -280,22 +280,22 @@ MultiResolutionPDEDeformableRegistrationm_InitialDisplacementField && this->GetInput(0)) { - itkExceptionMacro(<< "Only one initial deformation can be given. " + itkExceptionMacro("Only one initial deformation can be given. " << "SetInitialDisplacementField should not be used in " << "cunjunction with SetArbitraryInitialDisplacementField " << "or SetInput."); diff --git a/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx index 5cc7eeedcd4..b1e2a14dbd3 100644 --- a/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx @@ -161,7 +161,7 @@ PDEDeformableRegistrationFilter:: if (!movingPtr || !fixedPtr) { - itkExceptionMacro(<< "Fixed and/or moving image not set"); + itkExceptionMacro("Fixed and/or moving image not set"); } // update variables in the equation object @@ -169,7 +169,7 @@ PDEDeformableRegistrationFilter:: if (!f) { - itkExceptionMacro(<< "FiniteDifferenceFunction not of type PDEDeformableRegistrationFilterFunction"); + itkExceptionMacro("FiniteDifferenceFunction not of type PDEDeformableRegistrationFilterFunction"); } f->SetFixedImage(fixedPtr); diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.hxx index 36cd5e35fbb..95204491612 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.hxx @@ -40,7 +40,7 @@ SymmetricForcesDemonsRegistrationFilterSetDisplacementField(this->GetDisplacementField()); @@ -63,7 +63,7 @@ SymmetricForcesDemonsRegistrationFilterGetMetric(); @@ -78,7 +78,7 @@ SymmetricForcesDemonsRegistrationFilterGetIntensityDifferenceThreshold(); @@ -93,7 +93,7 @@ SymmetricForcesDemonsRegistrationFilterSetIntensityDifferenceThreshold(threshold); @@ -107,7 +107,7 @@ SymmetricForcesDemonsRegistrationFilterGetRMSChange(); @@ -131,7 +131,7 @@ SymmetricForcesDemonsRegistrationFilterSetRMSChange(drfp->GetRMSChange()); diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx index daa52b3818b..77847fe39b0 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx @@ -106,7 +106,7 @@ SymmetricForcesDemonsRegistrationFunctionGetMovingImage() || !this->GetFixedImage() || !m_MovingImageInterpolator) { - itkExceptionMacro(<< "MovingImage, FixedImage and/or Interpolator not set"); + itkExceptionMacro("MovingImage, FixedImage and/or Interpolator not set"); } // cache fixed image information diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx index 960caa3c3c2..8d21c3af180 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx @@ -53,7 +53,7 @@ class CommandIterationUpdate : public itk::Command { if (object == nullptr) { - itkExceptionMacro(<< "Command update on null object"); + itkExceptionMacro("Command update on null object"); } std::cout << "Observing from class " << object->GetNameOfClass(); if (!object->GetObjectName().empty()) diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx index 8526cb2e392..01c8aab01ab 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx @@ -53,7 +53,7 @@ class CommandIterationUpdate : public itk::Command { if (object == nullptr) { - itkExceptionMacro(<< "Command update on null object"); + itkExceptionMacro("Command update on null object"); } std::cout << "Observing from class " << object->GetNameOfClass(); if (!object->GetObjectName().empty()) diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx index 146f05665a9..6041dbb8373 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx @@ -47,7 +47,7 @@ class CommandIterationUpdate : public itk::Command { if (object == nullptr) { - itkExceptionMacro(<< "Command update on null object"); + itkExceptionMacro("Command update on null object"); } std::cout << "Observing from class " << object->GetNameOfClass(); if (!object->GetObjectName().empty()) diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx index f2f9ee7d463..76534c36105 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx @@ -64,7 +64,7 @@ BayesianClassifierInitializationImageFilterSetVectorLength(m_NumberOfClasses); } @@ -237,7 +237,7 @@ BayesianClassifierInitializationImageFilterSize() != m_NumberOfClasses) { - itkExceptionMacro(<< "Number of membership functions should be the same as the number of classes"); + itkExceptionMacro("Number of membership functions should be the same as the number of classes"); } this->AllocateOutputs(); @@ -273,7 +273,7 @@ BayesianClassifierInitializationImageFilterSize() != m_NumberOfClasses) { - itkExceptionMacro(<< "Number of membership functions should be the same as the number of classes"); + itkExceptionMacro("Number of membership functions should be the same as the number of classes"); } } else diff --git a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx index ca6e0b8e3d3..8264c921dd8 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx @@ -142,7 +142,7 @@ ImageKmeansModelEstimator::Allocate() // Check the validity of the n if (this->GetNumberOfModels() <= 0) { - itkExceptionMacro(<< "Number of models is less than 0."); + itkExceptionMacro("Number of models is less than 0."); } m_NumberOfCodewords = this->GetNumberOfModels(); @@ -297,7 +297,7 @@ ImageKmeansModelEstimator::WithCodebookUseGLA( // Check for lack of convergence if (olddistortion < distortion) { - itkExceptionMacro(<< "Distortion is increasing, not decreasing"); + itkExceptionMacro("Distortion is increasing, not decreasing"); } // Find number of empty cells @@ -390,7 +390,7 @@ ImageKmeansModelEstimator::WithCodebookUseGLA( ++pass; } } while (pass <= m_MaxSplitAttempts); - itkExceptionMacro(<< "Lack of convergence"); + itkExceptionMacro("Lack of convergence"); } template @@ -514,7 +514,7 @@ ImageKmeansModelEstimator::NearestNeighborSear // Check for bizarre errors if (*distortion < 0.0) { - itkExceptionMacro(<< "Computational overflow"); + itkExceptionMacro("Computational overflow"); } } diff --git a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx index 3e71efc76dd..5ccfa3df9c4 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx @@ -138,10 +138,10 @@ ConnectedComponentImageFilter::GenerateDa // check for overflow exception here if (numberOfObjects > static_cast(NumericTraits::max())) { - itkExceptionMacro(<< "Number of objects (" << numberOfObjects << ") greater than maximum of output pixel type (" - << static_cast::PrintType>( - NumericTraits::max()) - << ")."); + itkExceptionMacro("Number of objects (" << numberOfObjects << ") greater than maximum of output pixel type (" + << static_cast::PrintType>( + NumericTraits::max()) + << ")."); } m_ObjectCount = numberOfObjects; diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx index 717727d0063..94a072d1e37 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx @@ -272,7 +272,7 @@ KLMRegionGrowImageFilter::InitializeKLM() // Maximum number of regions requested must be greater than 0 if (this->GetMaximumNumberOfRegions() <= 1) { - itkExceptionMacro(<< "Number of requested regions must be 2 or more"); + itkExceptionMacro("Number of requested regions must be 2 or more"); } // This implementation requires the image dimensions to be @@ -287,7 +287,7 @@ KLMRegionGrowImageFilter::InitializeKLM() { if (gridSize[idim] == 0 || inputImageSize[idim] % gridSize[idim] != 0) { - itkExceptionMacro(<< "Invalid grid size"); + itkExceptionMacro("Invalid grid size"); } } @@ -373,7 +373,7 @@ KLMRegionGrowImageFilter::InitializeKLM() // exception otherwise. if (numberOfBorders == 0) { - itkExceptionMacro(<< "Number of initial regions must be 2 or more: reduce granularity of the grid"); + itkExceptionMacro("Number of initial regions must be 2 or more: reduce granularity of the grid"); } m_BordersPointer.resize(numberOfBorders); @@ -422,7 +422,7 @@ KLMRegionGrowImageFilter::InitializeKLM() { if (borderCounter >= numberOfBorders) { - itkExceptionMacro(<< "KLM initialization is incorrect"); + itkExceptionMacro("KLM initialization is incorrect"); } // Load the border of interest @@ -504,7 +504,7 @@ KLMRegionGrowImageFilter::InitializeKLM() if (Math::NotAlmostEquals(m_TotalBorderLength, actualBorderLength)) { - itkExceptionMacro(<< "KLM initialization is incorrect"); + itkExceptionMacro("KLM initialization is incorrect"); } else { @@ -538,7 +538,7 @@ KLMRegionGrowImageFilter::InitializeKLM() if (m_InternalLambda < 0.0) { - itkExceptionMacro(<< "KLM initialization is incorrect"); + itkExceptionMacro("KLM initialization is incorrect"); } } @@ -594,7 +594,7 @@ KLMRegionGrowImageFilter::MergeRegions() m_TotalBorderLength -= m_BorderCandidate->m_Pointer->GetBorderLength(); if (m_TotalBorderLength <= 0) { - itkExceptionMacro(<< "KLM algorithm error"); + itkExceptionMacro("KLM algorithm error"); } // Two regions are associated with the candidate border @@ -608,7 +608,7 @@ KLMRegionGrowImageFilter::MergeRegions() // GenerateOutputImage and GenerateLabelledImage if (pRegion1->GetRegionLabel() >= pRegion2->GetRegionLabel()) { - itkExceptionMacro(<< "Invalid region labelling"); + itkExceptionMacro("Invalid region labelling"); } // Add the new region's parameter data to the old. @@ -640,7 +640,7 @@ KLMRegionGrowImageFilter::MergeRegions() --m_NumberOfRegions; if (m_BordersDynamicPointer.empty()) { - itkExceptionMacro(<< "KLM algorithm error"); + itkExceptionMacro("KLM algorithm error"); } // For DEBUG purposes @@ -676,7 +676,7 @@ KLMRegionGrowImageFilter::MergeRegions() // Decrement for the one deleted border if (m_BordersDynamicPointer.empty()) { - itkExceptionMacro(<< "KLM algorithm error"); + itkExceptionMacro("KLM algorithm error"); } m_BorderCandidate = &(m_BordersDynamicPointer.back()); diff --git a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx index 77180fd6e57..370456da3f9 100644 --- a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx @@ -61,7 +61,7 @@ KLMSegmentationRegion::CombineRegionParameters(const Self * region) if (mergedRegionArea <= 0) { - itkExceptionMacro(<< "Invalid region area"); + itkExceptionMacro("Invalid region area"); } mergedRegionMean /= mergedRegionArea; this->SetRegionArea(mergedRegionArea); @@ -90,7 +90,7 @@ KLMSegmentationRegion::DeleteRegionBorder(KLMSegmentationBorder * pBorderCandida { if (pBorderCandidate == nullptr) { - itkExceptionMacro(<< "Null pointer to segmentation region border"); + itkExceptionMacro("Null pointer to segmentation region border"); } auto regionBorderVectorIt = m_RegionBorderVector.begin(); @@ -111,7 +111,7 @@ KLMSegmentationRegion::DeleteRegionBorder(KLMSegmentationBorder * pBorderCandida if (!foundBorderCandidate) { - itkExceptionMacro(<< "Border candidate not in region borders list"); + itkExceptionMacro("Border candidate not in region borders list"); } } // end DeleteRegionBorder() @@ -120,7 +120,7 @@ KLMSegmentationRegion::PushBackRegionBorder(KLMSegmentationBorder * pBorderCandi { if (pBorderCandidate == nullptr) { - itkExceptionMacro(<< "Null pointer to segmentation region border"); + itkExceptionMacro("Null pointer to segmentation region border"); } m_RegionBorderVector.push_back(pBorderCandidate); } @@ -130,7 +130,7 @@ KLMSegmentationRegion::PushFrontRegionBorder(KLMSegmentationBorder * pBorderCand { if (pBorderCandidate == nullptr) { - itkExceptionMacro(<< "Null pointer to segmentation region border"); + itkExceptionMacro("Null pointer to segmentation region border"); } m_RegionBorderVector.insert(m_RegionBorderVector.begin(), pBorderCandidate); } @@ -141,7 +141,7 @@ KLMSegmentationRegion::InsertRegionBorder(KLMSegmentationBorder * pBorderCandida // Ensure that the border candidate is not a null pointer if (pBorderCandidate == nullptr) { - itkExceptionMacro(<< "Null pointer to segmentation region border"); + itkExceptionMacro("Null pointer to segmentation region border"); } // The m_RegionBorderVec is an ordered vector of pointers to the borders. @@ -193,7 +193,7 @@ KLMSegmentationRegion::InsertRegionBorder(RegionBorderVectorIterator RegionBorde // Ensure that the border candidate is not a null pointer if (pBorderCandidate == nullptr) { - itkExceptionMacro(<< "Null pointer to segmentation region border"); + itkExceptionMacro("Null pointer to segmentation region border"); } // The m_RegionBorderVec is an ordered vector of pointers to the @@ -225,7 +225,7 @@ KLMSegmentationRegion::ResetRegionLabelAndUpdateBorders(Self * region) // Ensure that region 1 label is less than region 2 label if ((*oldRegionBordersIt)->GetRegion1()->GetRegionLabel() == (*oldRegionBordersIt)->GetRegion2()->GetRegionLabel()) { - itkExceptionMacro(<< "Invalid region border list"); + itkExceptionMacro("Invalid region border list"); } // Correct order @@ -268,7 +268,7 @@ KLMSegmentationRegion::ResetRegionLabelAndUpdateBorders(Self * region) else { - itkExceptionMacro(<< "Invalid region border list"); + itkExceptionMacro("Invalid region border list"); } // end else // Go to the next region border pointed by the iterator @@ -304,7 +304,7 @@ KLMSegmentationRegion::SpliceRegionBorders(Self * region) ((*thatRegionBordersIt)->GetRegion1() == (*thatRegionBordersIt)->GetRegion2()) || ((*thisRegionBordersIt) == (*thatRegionBordersIt))) { - itkExceptionMacro(<< "Invalid region border list"); + itkExceptionMacro("Invalid region border list"); } // The two borders point to the same regions: DUPLICATE case. @@ -335,7 +335,7 @@ KLMSegmentationRegion::SpliceRegionBorders(Self * region) else { - itkExceptionMacro(<< "Invalid region border list"); + itkExceptionMacro("Invalid region border list"); } // end else // Nullify the duplicate border so it can be identified and removed. @@ -376,7 +376,7 @@ KLMSegmentationRegion::SpliceRegionBorders(Self * region) } // end else if else { - itkExceptionMacro(<< "Invalid region border"); + itkExceptionMacro("Invalid region border"); } // end else } // end of while @@ -401,7 +401,7 @@ KLMSegmentationRegion::UpdateRegionBorderLambda() // Check if the number of borders for this region is nullptr if (m_RegionBorderVector.empty()) { - itkExceptionMacro(<< "The region border for computing Lambda is nullptr"); + itkExceptionMacro("The region border for computing Lambda is nullptr"); } // Set up the iterator to loop through the region border vector diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx index bef22b5ebb5..5ec9d56a630 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx @@ -161,11 +161,11 @@ LevelSetFunctionWithRefitTerm::PropagationSpeed(co { if (targetnode == nullptr) { - itkExceptionMacro(<< "required node has null pointer\n"); + itkExceptionMacro("required node has null pointer\n"); } else { - itkExceptionMacro(<< "required node has CurvatureFlag = false\n"); + itkExceptionMacro("required node has CurvatureFlag = false\n"); } } else diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx index d681816d7aa..9d64414d815 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx @@ -105,7 +105,7 @@ LevelSetNeighborhoodExtractor::GenerateData() { if (!m_InputLevelSet) { - itkExceptionMacro(<< "Input level set is nullptr"); + itkExceptionMacro("Input level set is nullptr"); } this->Initialize(); @@ -166,7 +166,7 @@ LevelSetNeighborhoodExtractor::GenerateDataNarrowBand() { if (!m_InputNarrowBand) { - itkExceptionMacro(<< "InputNarrowBand has not been set"); + itkExceptionMacro("InputNarrowBand has not been set"); } typename NodeContainer::ConstIterator pointsIter; diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx index 5ee098919eb..de5c8440d2e 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx @@ -780,7 +780,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedAlloc // Throw an exception if we don't have enough layers. if (m_Data[ThreadId].m_Layers.size() < 3) { - itkExceptionMacro(<< "Not enough layers have been allocated for the sparse field. Requires at least one layer."); + itkExceptionMacro("Not enough layers have been allocated for the sparse field. Requires at least one layer."); } // Layers used as buffers for transferring pixels during load balancing diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx index 78f1679e788..86f69102c1a 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx @@ -153,13 +153,13 @@ ShapePriorMAPCostFunction::Initialize() // check if the mean and variances array are of the right size if (m_ShapeParameterMeans.Size() < this->m_ShapeFunction->GetNumberOfShapeParameters()) { - itkExceptionMacro(<< "ShapeParameterMeans does not have at least " + itkExceptionMacro("ShapeParameterMeans does not have at least " << this->m_ShapeFunction->GetNumberOfShapeParameters() << " number of elements."); } if (m_ShapeParameterStandardDeviations.Size() < this->m_ShapeFunction->GetNumberOfShapeParameters()) { - itkExceptionMacro(<< "ShapeParameterStandardDeviations does not have at least " + itkExceptionMacro("ShapeParameterStandardDeviations does not have at least " << this->m_ShapeFunction->GetNumberOfShapeParameters() << " number of elements."); } } diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h index 980e921f1a7..8bf11bd5753 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunctionBase : public SingleValuedCos void GetDerivative(const ParametersType &, DerivativeType &) const override { - itkExceptionMacro(<< "This function is currently not supported."); + itkExceptionMacro("This function is currently not supported."); } /** Return the number of parameters. */ diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx index 01ce5aa9358..1cba1d4ca7e 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx @@ -56,17 +56,17 @@ ShapePriorMAPCostFunctionBase::Initialize() { if (!m_ShapeFunction) { - itkExceptionMacro(<< "ShapeFunction is not present."); + itkExceptionMacro("ShapeFunction is not present."); } if (!m_ActiveRegion) { - itkExceptionMacro(<< "ActiveRegion is not present."); + itkExceptionMacro("ActiveRegion is not present."); } if (!m_FeatureImage) { - itkExceptionMacro(<< "FeatureImage is not present."); + itkExceptionMacro("FeatureImage is not present."); } } } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx index 1139a9f87f8..919a20e61f4 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx @@ -108,7 +108,7 @@ ShapePriorSegmentationLevelSetImageFilterInitialize(); @@ -119,17 +119,17 @@ ShapePriorSegmentationLevelSetImageFilterGetNumberOfParameters()) { - itkExceptionMacro(<< "InitialParameters size does not match " + itkExceptionMacro("InitialParameters size does not match " << "the number of parameters required by ShapeFunction"); } diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx index 73a9e5f0c1d..279d3268c02 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx @@ -578,7 +578,7 @@ SparseFieldLevelSetImageFilter::Initialize() // Throw an exception if we don't have enough layers. if (m_Layers.size() < 3) { - itkExceptionMacro(<< "Not enough layers have been allocated for the sparse field. Requires at least one layer."); + itkExceptionMacro("Not enough layers have been allocated for the sparse field. Requires at least one layer."); } // Construct the active layer and initialize the first layers inside and diff --git a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx index 13c6aba4226..f66df2c6b85 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx @@ -682,8 +682,8 @@ DiscreteLevelSetImage::CopyInformation(const DataObject * d if (!LevelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::DiscreteLevelSetImage::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::DiscreteLevelSetImage::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } } @@ -698,8 +698,8 @@ DiscreteLevelSetImage::Graft(const DataObject * data) if (!LevelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::DiscreteLevelSetImage::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::DiscreteLevelSetImage::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->m_NeighborhoodScales = LevelSet->m_NeighborhoodScales; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx index 3c7f1564693..5d6e8167eec 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx @@ -199,8 +199,8 @@ LevelSetBase::CopyInformation(const DataOb if (!levelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LevelSetBase::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(LevelSetBase *).name()); + itkExceptionMacro("itk::LevelSetBase::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(LevelSetBase *).name()); } m_MaximumNumberOfRegions = levelSet->GetMaximumNumberOfRegions(); @@ -224,8 +224,8 @@ LevelSetBase::Graft(const DataObject * dat if (!levelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LevelSetBase::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::LevelSetBase::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } } @@ -252,14 +252,14 @@ LevelSetBase::VerifyRequestedRegion() // Are we asking for more regions than we can get? if (m_RequestedNumberOfRegions > m_MaximumNumberOfRegions) { - itkExceptionMacro(<< "Cannot break object into " << m_RequestedNumberOfRegions << ". The limit is " - << m_MaximumNumberOfRegions); + itkExceptionMacro("Cannot break object into " << m_RequestedNumberOfRegions << ". The limit is " + << m_MaximumNumberOfRegions); } if (m_RequestedRegion >= m_RequestedNumberOfRegions) { - itkExceptionMacro(<< "Invalid update region " << m_RequestedRegion << ". Must be between 0 and " - << m_RequestedNumberOfRegions - 1); + itkExceptionMacro("Invalid update region " << m_RequestedRegion << ". Must be between 0 and " + << m_RequestedNumberOfRegions - 1); } return retval; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx index 21fd57769aa..2dd8e288d21 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx @@ -73,8 +73,8 @@ LevelSetDenseImage::CopyInformation(const DataObject * data) if (!LevelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LevelSetDenseImage::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::LevelSetDenseImage::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } } @@ -88,8 +88,8 @@ LevelSetDenseImage::Graft(const DataObject * data) if (!LevelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LevelSetDenseImage::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::LevelSetDenseImage::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->m_Image = LevelSet->m_Image; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx index 9d175b7bfbd..95537643fdb 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx @@ -107,8 +107,8 @@ LevelSetQuadEdgeMesh::CopyInformation(const DataObject * data) if (!levelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LevelSetQuadEdgeMesh::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::LevelSetQuadEdgeMesh::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } } @@ -122,8 +122,8 @@ LevelSetQuadEdgeMesh::Graft(const DataObject * data) if (!levelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::LevelSetQuadEdgeMesh::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::LevelSetQuadEdgeMesh::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->m_Mesh = levelSet->m_Mesh; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx index eb422d57bf2..de457fed8e0 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx @@ -73,8 +73,8 @@ LevelSetSparseImage::Graft(const DataObject * data) if (!levelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "LevelSetSparseImage::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("LevelSetSparseImage::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } this->m_LabelMap->Graft(levelSet->m_LabelMap); @@ -152,8 +152,8 @@ LevelSetSparseImage::CopyInformation(const DataObject * dat if (!LevelSet) { // pointer could not be cast back down - itkExceptionMacro(<< "itk::MalcolmSparseLevelSet::CopyInformation() cannot cast " << typeid(data).name() << " to " - << typeid(Self *).name()); + itkExceptionMacro("itk::MalcolmSparseLevelSet::CopyInformation() cannot cast " << typeid(data).name() << " to " + << typeid(Self *).name()); } } diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx index 0b0813cdbf2..2afdd56b186 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx @@ -110,14 +110,14 @@ PCAShapeSignedDistanceFunction::Initialize() // verify mean image if (!m_MeanImage) { - itkExceptionMacro(<< "MeanImage is not present."); + itkExceptionMacro("MeanImage is not present."); } // verify principal component images if (m_PrincipalComponentImages.size() < m_NumberOfPrincipalComponents) { - itkExceptionMacro(<< "PrincipalComponentsImages does not have at least " << m_NumberOfPrincipalComponents - << " number of elements."); + itkExceptionMacro("PrincipalComponentsImages does not have at least " << m_NumberOfPrincipalComponents + << " number of elements."); } // verify image buffered region @@ -127,13 +127,13 @@ PCAShapeSignedDistanceFunction::Initialize() { if (!m_PrincipalComponentImages[i]) { - itkExceptionMacro(<< "PrincipalComponentImages[" << i << "] is not present."); + itkExceptionMacro("PrincipalComponentImages[" << i << "] is not present."); } if (m_PrincipalComponentImages[i]->GetBufferedRegion() != meanImageRegion) { - itkExceptionMacro(<< "The buffered region of the PrincipalComponentImages[" << i - << "] is different from the MeanImage."); + itkExceptionMacro("The buffered region of the PrincipalComponentImages[" << i + << "] is different from the MeanImage."); } } diff --git a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx index ce2138ab101..75a5db65e62 100644 --- a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx @@ -109,7 +109,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate // mask and marker must have the same size if (markerImage->GetRequestedRegion().GetSize() != inputImage->GetRequestedRegion().GetSize()) { - itkExceptionMacro(<< "Marker and input must have the same size."); + itkExceptionMacro("Marker and input must have the same size."); } // FAH (in french: File d'Attente Hierarchique) diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h b/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h index de9802264c1..091691c9f3d 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h @@ -211,7 +211,7 @@ class ITK_TEMPLATE_EXPORT WatershedImageFilter { if (i != 0) { - itkExceptionMacro(<< "Filter has only one input."); + itkExceptionMacro("Filter has only one input."); } else { diff --git a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx index 06c5261f2b1..324d60dff35 100644 --- a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx +++ b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx @@ -206,7 +206,7 @@ OpenCVVideoIO::ReadImageInformation() std::string filename = this->GetFileName(); if (!this->CanReadFile(filename.c_str())) { - itkExceptionMacro(<< "Cannot read file: " << filename); + itkExceptionMacro("Cannot read file: " << filename); } // Open the video file @@ -229,7 +229,7 @@ OpenCVVideoIO::ReadImageInformation() if (this->m_IFrameInterval == 0) { - itkExceptionMacro(<< " I-Frame spacing for this video is zero! Please check input data."); + itkExceptionMacro(" I-Frame spacing for this video is zero! Please check input data."); } this->m_LastIFrame = (OpenCVVideoIO::FrameOffsetType)(static_cast(this->m_FrameTotal) / @@ -256,7 +256,7 @@ OpenCVVideoIO::ReadImageInformation() // Make sure it opened right if (!localCapture) { - itkExceptionMacro(<< "Cannot read from camera " << this->m_CameraIndex); + itkExceptionMacro("Cannot read from camera " << this->m_CameraIndex); } // Query the frame @@ -266,7 +266,7 @@ OpenCVVideoIO::ReadImageInformation() if (!tempImage) { cvReleaseCapture(&localCapture); - itkExceptionMacro(<< "Empty image got from camera " << this->m_CameraIndex); + itkExceptionMacro("Empty image got from camera " << this->m_CameraIndex); } // Set the frame total to 1 @@ -276,7 +276,7 @@ OpenCVVideoIO::ReadImageInformation() // Should never get here else { - itkExceptionMacro(<< "Invalid Read Type... How did we get here?"); + itkExceptionMacro("Invalid Read Type... How did we get here?"); } // Populate member variables @@ -317,7 +317,7 @@ OpenCVVideoIO::Read(void * buffer) // Make sure we've already called ReadImageInformation (dimensions are non-zero) if (this->m_Dimensions[0] == 0 || this->m_Dimensions[1] == 0) { - itkExceptionMacro(<< "Cannot read frame with zero dimension. May need to call ReadImageInformation"); + itkExceptionMacro("Cannot read frame with zero dimension. May need to call ReadImageInformation"); } // If video is not already open, open it and keep it open @@ -335,7 +335,7 @@ OpenCVVideoIO::Read(void * buffer) IplImage * tempIm = cvQueryFrame(this->m_Capture); if (tempIm == nullptr) { - itkExceptionMacro(<< "Error reading frame " << this->m_CurrentFrame << ". May be out of bounds"); + itkExceptionMacro("Error reading frame " << this->m_CurrentFrame << ". May be out of bounds"); } // Convert to RGB rather than BGR diff --git a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx index a88d718142c..3e165d15201 100644 --- a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx +++ b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx @@ -265,7 +265,7 @@ VXLVideoIO::ReadImageInformation() // Get information from camera if (this->m_ReadType == ReadFromCamera) { - itkExceptionMacro(<< "For now, camera reading is not supported with VXL"); + itkExceptionMacro("For now, camera reading is not supported with VXL"); } // Get information from file @@ -311,7 +311,7 @@ VXLVideoIO::ReadImageInformation() this->m_IFrameInterval = localStream.frame_number(); if (this->m_IFrameInterval == 0) { - itkExceptionMacro(<< "I-Frame spacing for this video is zeror! Please check input data."); + itkExceptionMacro("I-Frame spacing for this video is zeror! Please check input data."); } this->m_LastIFrame = static_cast(static_cast(this->m_FrameTotal) / static_cast(this->m_IFrameInterval)) * @@ -330,7 +330,7 @@ VXLVideoIO::ReadImageInformation() // Should never get here else { - itkExceptionMacro(<< "Invalid Read Type... How did we get here?"); + itkExceptionMacro("Invalid Read Type... How did we get here?"); } } @@ -344,7 +344,7 @@ VXLVideoIO::Read(void * buffer) // Make sure we've already called ReadImageInformation (dimensions are non-zero) if (this->m_Dimensions.size() != 2 || this->m_Dimensions[0] == 0 || this->m_Dimensions[1] == 0) { - itkExceptionMacro(<< "Cannot read frame with zero dimension. May need to call ReadImageInformation"); + itkExceptionMacro("Cannot read frame with zero dimension. May need to call ReadImageInformation"); } // If video is not already open, open it and keep it open @@ -388,7 +388,7 @@ VXLVideoIO::Read(void * buffer) } else { - itkExceptionMacro(<< "Unsupported Pixel Format " << vidl_pixel_format_to_string(this->m_PixelFormat)); + itkExceptionMacro("Unsupported Pixel Format " << vidl_pixel_format_to_string(this->m_PixelFormat)); } } @@ -549,7 +549,7 @@ VXLVideoIO::SetWriterParameters(TemporalRatioType fps, } else { - itkExceptionMacro(<< "Invalid number of channels " << this->m_NumberOfComponents); + itkExceptionMacro("Invalid number of channels " << this->m_NumberOfComponents); } } diff --git a/Modules/Video/Core/include/itkImageToVideoFilter.hxx b/Modules/Video/Core/include/itkImageToVideoFilter.hxx index 33bf93d4be8..5dee3ed595a 100644 --- a/Modules/Video/Core/include/itkImageToVideoFilter.hxx +++ b/Modules/Video/Core/include/itkImageToVideoFilter.hxx @@ -213,7 +213,7 @@ ImageToVideoFilter::GenerateOutputRequestedRegi auto * vsOutput = dynamic_cast(output); if (vsOutput == nullptr) { - itkExceptionMacro(<< "itk::ImageToVideoFilter::GenerateOutputRequestedRegion() " + itkExceptionMacro("itk::ImageToVideoFilter::GenerateOutputRequestedRegion() " << "cannot cast " << typeid(output).name() << " to " << typeid(OutputVideoStreamType *).name()); } diff --git a/Modules/Video/Core/include/itkVideoSource.hxx b/Modules/Video/Core/include/itkVideoSource.hxx index 25bee845a58..9db5db6184b 100644 --- a/Modules/Video/Core/include/itkVideoSource.hxx +++ b/Modules/Video/Core/include/itkVideoSource.hxx @@ -104,8 +104,8 @@ VideoSource::GraftNthOutput(unsigned int idx, TOutputVideoSt { if (idx >= this->GetNumberOfOutputs()) { - itkExceptionMacro(<< "Requested to graft output " << idx << " but this VideoSource only has " - << this->GetNumberOfOutputs() << " Outputs."); + itkExceptionMacro("Requested to graft output " << idx << " but this VideoSource only has " + << this->GetNumberOfOutputs() << " Outputs."); } if (!graft) { @@ -255,8 +255,8 @@ VideoSource::ThreadedGenerateData( const typename TOutputVideoStream::SpatialRegionType & itkNotUsed(outputRegionForThread), int itkNotUsed(threadId)) { - itkExceptionMacro(<< "itk::ERROR: " << this->GetNameOfClass() << '(' << this << "): " - << "Subclass should override this method!!!"); + itkExceptionMacro("itk::ERROR: " << this->GetNameOfClass() << '(' << this << "): " + << "Subclass should override this method!!!"); } // diff --git a/Modules/Video/Core/include/itkVideoStream.hxx b/Modules/Video/Core/include/itkVideoStream.hxx index 5abc4f1a8d4..e146615ffb6 100644 --- a/Modules/Video/Core/include/itkVideoStream.hxx +++ b/Modules/Video/Core/include/itkVideoStream.hxx @@ -392,8 +392,8 @@ VideoStream::Graft(const DataObject * data) const auto * videoData = dynamic_cast(data); if (!videoData) { - itkExceptionMacro(<< "itk::VideoStream::Graft() cannot cast " << typeid(data).name() << " to " - << typeid(const Self *).name()); + itkExceptionMacro("itk::VideoStream::Graft() cannot cast " << typeid(data).name() << " to " + << typeid(const Self *).name()); } // Copy the meta data caches diff --git a/Modules/Video/Core/src/itkTemporalDataObject.cxx b/Modules/Video/Core/src/itkTemporalDataObject.cxx index f2dbafa9276..8cf3f33b631 100644 --- a/Modules/Video/Core/src/itkTemporalDataObject.cxx +++ b/Modules/Video/Core/src/itkTemporalDataObject.cxx @@ -223,7 +223,7 @@ TemporalDataObject::RequestedRegionIsOutsideOfTheBufferedRegion() return frameFlag || realTimeFlag; } default: - itkExceptionMacro(<< "itk::TemporalDataObject::" + itkExceptionMacro("itk::TemporalDataObject::" << "RequestedRegionIsOutsideOfTheBufferedRegion() " << "Invalid Temporal Unit"); } @@ -252,7 +252,7 @@ TemporalDataObject::VerifyRequestedRegion() return frameFlag && realTimeFlag; } default: - itkExceptionMacro(<< "itk::TemporalDataObject::VerifyRequestedRegion() " + itkExceptionMacro("itk::TemporalDataObject::VerifyRequestedRegion() " << "Invalid Temporal Unit"); } } @@ -283,7 +283,7 @@ TemporalDataObject::CopyInformation(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::TemporalDataObject::CopyInformation() " + itkExceptionMacro("itk::TemporalDataObject::CopyInformation() " << "cannot cast " << typeid(data).name() << " to " << typeid(const TemporalDataObject *).name()); } } @@ -315,7 +315,7 @@ TemporalDataObject::Graft(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::TemporalDataObject::Graft() " + itkExceptionMacro("itk::TemporalDataObject::Graft() " << "cannot cast " << typeid(data).name() << " to " << typeid(const TemporalDataObject *).name()); } } @@ -345,7 +345,7 @@ TemporalDataObject::SetRequestedRegion(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro(<< "itk::TemporalDataObject:SetRequestedRegion() " + itkExceptionMacro("itk::TemporalDataObject:SetRequestedRegion() " << "cannot cast " << typeid(data).name() << " to " << typeid(const TemporalDataObject *).name()); } } diff --git a/Modules/Video/Core/src/itkTemporalProcessObject.cxx b/Modules/Video/Core/src/itkTemporalProcessObject.cxx index ccb4c841e5f..122deaef00e 100644 --- a/Modules/Video/Core/src/itkTemporalProcessObject.cxx +++ b/Modules/Video/Core/src/itkTemporalProcessObject.cxx @@ -57,7 +57,7 @@ TemporalProcessObject::EnlargeOutputRequestedRegion(DataObject * output) } else { - itkExceptionMacro(<< "itk::TemporalProcessObject::EnlargeOutputRequestedRegion() " + itkExceptionMacro("itk::TemporalProcessObject::EnlargeOutputRequestedRegion() " << "cannot cast " << typeid(output).name() << " to " << typeid(TemporalDataObject *).name()); } } @@ -112,7 +112,7 @@ TemporalProcessObject::GenerateOutputRequestedRegion(DataObject * output) } else { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateOutputRequestedRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateOutputRequestedRegion() " << "cannot cast " << typeid(output).name() << " to " << typeid(TemporalDataObject *).name()); } } @@ -168,13 +168,13 @@ TemporalProcessObject::GenerateInputRequestedRegion() if (tOutput == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateInputRequestedRegion() " << "cannot cast " << typeid(this->GetOutput(0)).name() << " to " << typeid(TemporalDataObject *).name()); } else if (tInput == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateInputRequestedRegion() " << "cannot cast " << typeid(this->GetInput(0)).name() << " to " << typeid(TemporalDataObject *).name()); } @@ -197,13 +197,13 @@ TemporalProcessObject::GenerateInputRequestedTemporalRegion() auto * output = dynamic_cast(this->GetOutput(0)); if (output == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " << "cannot cast " << typeid(this->GetOutput(0)).name() << " to " << typeid(TemporalDataObject *).name()); } if (input == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " << "cannot cast " << typeid(this->GetInput(0)).name() << " to " << typeid(TemporalDataObject *).name()); } @@ -230,7 +230,7 @@ TemporalProcessObject::GenerateInputRequestedTemporalRegion() // boundary conditions at some point) if (inputStart < 0) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " << "cannot request a region with a starting frame of " << inputStart); } @@ -269,7 +269,7 @@ TemporalProcessObject::UpdateOutputInformation() auto * output = dynamic_cast(this->GetOutput(0)); if (output == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateOutputRequestedTemporalRegion() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateOutputRequestedTemporalRegion() " << "cannot cast " << typeid(output).name() << " to " << typeid(TemporalDataObject *).name()); } @@ -347,8 +347,8 @@ TemporalProcessObject::UpdateOutputData(DataObject * itkNotUsed(output)) const DataObjectPointerArraySizeType ninputs = this->GetNumberOfValidRequiredInputs(); if (ninputs < this->GetNumberOfRequiredInputs()) { - itkExceptionMacro(<< "At least " << this->GetNumberOfRequiredInputs() << " inputs are required but only " - << ninputs << " are specified."); + itkExceptionMacro("At least " << this->GetNumberOfRequiredInputs() << " inputs are required but only " << ninputs + << " are specified."); } this->GenerateData(); } @@ -408,7 +408,7 @@ TemporalProcessObject::GenerateData() auto * output = dynamic_cast(this->GetOutput(0)); if (output == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateData() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateData() " << "cannot cast " << typeid(output).name() << " to " << typeid(TemporalDataObject *).name()); } SizeValueType outputStartFrame = output->GetUnbufferedRequestedTemporalRegion().GetFrameStart(); @@ -426,7 +426,7 @@ TemporalProcessObject::GenerateData() auto * input = dynamic_cast(this->GetInput(0)); if (input == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateData() " + itkExceptionMacro("itk::TemporalProcessObject::GenerateData() " << "cannot cast " << typeid(input).name() << " to " << typeid(TemporalDataObject *).name()); } input->SetRequestedTemporalRegion(inputTemporalRegionRequest); @@ -493,8 +493,8 @@ TemporalProcessObject::GenerateData() void TemporalProcessObject::TemporalStreamingGenerateData() { - itkExceptionMacro(<< "itk::Error: " << this->GetNameOfClass() << '(' << this - << "): Subclass should override this method!!!"); + itkExceptionMacro("itk::Error: " << this->GetNameOfClass() << '(' << this + << "): Subclass should override this method!!!"); } @@ -510,7 +510,7 @@ TemporalProcessObject::SplitRequestedTemporalRegion() auto * outputObject = dynamic_cast(this->GetOutput(0)); if (outputObject == nullptr) { - itkExceptionMacro(<< "itk::TemporalProcessObject::SplitRequestedTemporalRegion() " + itkExceptionMacro("itk::TemporalProcessObject::SplitRequestedTemporalRegion() " << "cannot cast " << typeid(outputObject).name() << " to " << typeid(TemporalDataObject *).name()); } @@ -548,7 +548,7 @@ TemporalProcessObject::SplitRequestedTemporalRegion() // Make sure we're not trying to get a negative frame if (regionStartFrame < 0) { - itkExceptionMacro(<< "itk::TemporalProcessObject::SplitRequestedTemporalRegion() " + itkExceptionMacro("itk::TemporalProcessObject::SplitRequestedTemporalRegion() " << "cannot start at frame number " << regionStartFrame); } diff --git a/Modules/Video/Core/test/itkVideoSourceTest.cxx b/Modules/Video/Core/test/itkVideoSourceTest.cxx index 9b20176654d..78a7320389e 100644 --- a/Modules/Video/Core/test/itkVideoSourceTest.cxx +++ b/Modules/Video/Core/test/itkVideoSourceTest.cxx @@ -84,8 +84,8 @@ class DummyVideoSource : public VideoSource // unit output size if (frameDuration != this->TemporalProcessObject::m_UnitOutputNumberOfFrames) { - itkExceptionMacro(<< "Trying to generate output of non-unit size. Got: " << frameDuration - << " Expected: " << this->TemporalProcessObject::m_UnitOutputNumberOfFrames); + itkExceptionMacro("Trying to generate output of non-unit size. Got: " + << frameDuration << " Expected: " << this->TemporalProcessObject::m_UnitOutputNumberOfFrames); } for (SizeValueType i = startFrame; i < startFrame + frameDuration; ++i) diff --git a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx index 203f490abc1..ead847a2603 100644 --- a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx @@ -127,13 +127,13 @@ class DummyVideoToVideoFilter : public VideoToVideoFilterTemporalProcessObject::m_UnitOutputNumberOfFrames) { - itkExceptionMacro(<< "Trying to generate output of non-unit size. Got: " << outputDuration - << " Expected: " << this->TemporalProcessObject::m_UnitOutputNumberOfFrames); + itkExceptionMacro("Trying to generate output of non-unit size. Got: " + << outputDuration << " Expected: " << this->TemporalProcessObject::m_UnitOutputNumberOfFrames); } if (inputDuration < this->TemporalProcessObject::m_UnitInputNumberOfFrames) { - itkExceptionMacro(<< "Input buffered region smaller than unit size. Got: " << inputDuration - << " Expected: " << this->TemporalProcessObject::m_UnitInputNumberOfFrames); + itkExceptionMacro("Input buffered region smaller than unit size. Got: " + << inputDuration << " Expected: " << this->TemporalProcessObject::m_UnitInputNumberOfFrames); } // Get the two input frames and average them in the requested spatial region diff --git a/Modules/Video/IO/include/itkVideoFileReader.hxx b/Modules/Video/IO/include/itkVideoFileReader.hxx index 5c5ed802130..f0a68c650e4 100644 --- a/Modules/Video/IO/include/itkVideoFileReader.hxx +++ b/Modules/Video/IO/include/itkVideoFileReader.hxx @@ -58,7 +58,7 @@ VideoFileReader::UpdateOutputInformation() // if (m_VideoIO->GetNumberOfDimensions() != FrameDimension) { - itkExceptionMacro(<< "Output dimension doesn't match dimension of read " + itkExceptionMacro("Output dimension doesn't match dimension of read " << "data. Expected " << FrameDimension << " but the IO " << "method has " << m_VideoIO->GetNumberOfDimensions() << '.'); } diff --git a/Modules/Video/IO/src/itkFileListVideoIO.cxx b/Modules/Video/IO/src/itkFileListVideoIO.cxx index 449771e3a01..7a0d60d0ae2 100644 --- a/Modules/Video/IO/src/itkFileListVideoIO.cxx +++ b/Modules/Video/IO/src/itkFileListVideoIO.cxx @@ -149,7 +149,7 @@ FileListVideoIO::ReadImageInformation() std::string filename = m_FileNames[0]; if (!this->CanReadFile(filename.c_str())) { - itkExceptionMacro(<< "Cannot Read File: " << filename); + itkExceptionMacro("Cannot Read File: " << filename); } // Open the internal IO (don't use local so that spacing, origin, direction @@ -205,7 +205,7 @@ FileListVideoIO::Read(void * buffer) // non-zero) if (m_Dimensions[0] == 0) { - itkExceptionMacro(<< "Cannot read frame with zero dimension. May need to call ReadImageInformation"); + itkExceptionMacro("Cannot read frame with zero dimension. May need to call ReadImageInformation"); } // If video is not already open, open it and keep it open diff --git a/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx b/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx index 45224ebae3a..74a51e1f428 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx +++ b/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx @@ -116,7 +116,7 @@ PyCommand::PyExecute() // we throw a standard ITK exception: this makes it possible for // our standard Swig exception handling logic to take this // through to the invoking Python process - itkExceptionMacro(<< "CommandCallable is not a callable Python object, " + itkExceptionMacro("CommandCallable is not a callable Python object, " << "or it has not been set."); } else @@ -134,7 +134,7 @@ PyCommand::PyExecute() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro(<< "There was an error executing the " + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } diff --git a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx index b0cd37f17be..d109c042da3 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx +++ b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx @@ -171,7 +171,7 @@ PyImageFilter::GenerateOutputInformation() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro(<< "There was an error executing the " + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } @@ -204,7 +204,7 @@ PyImageFilter::EnlargeOutputRequestedRegion(DataObjec PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro(<< "There was an error executing the " + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } @@ -236,7 +236,7 @@ PyImageFilter::GenerateInputRequestedRegion() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro(<< "There was an error executing the " + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } @@ -252,7 +252,7 @@ PyImageFilter::GenerateData() // we throw a standard ITK exception: this makes it possible for // our standard Swig exception handling logic to take this // through to the invoking Python process - itkExceptionMacro(<< "CommandCallable is not a callable Python object, " + itkExceptionMacro("CommandCallable is not a callable Python object, " << "or it has not been set."); } else @@ -273,7 +273,7 @@ PyImageFilter::GenerateData() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro(<< "There was an error executing the " + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } }