From e39284b354a047a8f7931bc9d541f193480ad1b3 Mon Sep 17 00:00:00 2001 From: maekclena Date: Thu, 6 Jun 2019 17:21:27 +0200 Subject: [PATCH] STYLE: Add ITK prefix to testing macros --- .../Deprecated/test/itkBarrierTest.cxx | 2 +- .../test/itkVectorResampleImageFilterTest.cxx | 22 +- ...nRegularizedHeavisideStepFunctionTest1.cxx | 4 +- .../Core/Common/test/itkColorTableTest.cxx | 2 +- .../test/itkCommandObserverObjectTest.cxx | 36 +- ...ellInteriorExteriorSpatialFunctionTest.cxx | 14 +- .../itkDataObjectAndProcessObjectTest.cxx | 342 +++++++++--------- Modules/Core/Common/test/itkDecoratorTest.cxx | 18 +- .../Core/Common/test/itkExtractImageTest.cxx | 10 +- .../test/itkFrustumSpatialFunctionTest.cxx | 18 +- .../test/itkGaussianSpatialFunctionTest.cxx | 14 +- .../test/itkImageAlgorithmCopyTest2.cxx | 10 +- .../itkImageRegionSplitterDirectionTest.cxx | 38 +- ...mageRegionSplitterMultidimensionalTest.cxx | 42 +-- ...tkImageRegionSplitterSlowDimensionTest.cxx | 26 +- .../test/itkImageToImageToleranceTest.cxx | 20 +- ...ageVectorOptimizerParametersHelperTest.cxx | 4 +- .../Core/Common/test/itkImportImageTest.cxx | 2 +- Modules/Core/Common/test/itkMathTest.cxx | 34 +- .../test/itkMemoryProbesCollecterBaseTest.cxx | 4 +- ...senneTwisterRandomVariateGeneratorTest.cxx | 4 +- .../itkMinimumMaximumImageCalculatorTest.cxx | 18 +- .../Common/test/itkMultiThreaderBaseTest.cxx | 2 +- .../test/itkOptimizerParametersTest.cxx | 6 +- .../Core/Common/test/itkRealTimeClockTest.cxx | 2 +- ...nRegularizedHeavisideStepFunctionTest1.cxx | 4 +- .../Common/test/itkStdStreamStateSaveTest.cxx | 18 +- ...rusInteriorExteriorSpatialFunctionTest.cxx | 8 +- .../Core/Common/test/itkTreeContainerTest.cxx | 12 +- Modules/Core/Common/test/itkVersionTest.cxx | 2 +- .../test/itkNthElementPixelAccessorTest.cxx | 2 +- .../ImageAdaptors/test/itkVectorImageTest.cxx | 58 +-- .../test/itkVectorImageToImageAdaptorTest.cxx | 4 +- ...itkBSplineDecompositionImageFilterTest.cxx | 8 +- ...ralDifferenceImageFunctionOnVectorTest.cxx | 2 +- .../test/itkCovarianceImageFunctionTest.cxx | 4 +- ...itkGaussianDerivativeImageFunctionTest.cxx | 2 +- ...tkGaussianInterpolateImageFunctionTest.cxx | 8 +- .../itkLinearInterpolateImageFunctionTest.cxx | 2 +- ...obisDistanceThresholdImageFunctionTest.cxx | 12 +- .../test/itkMeanImageFunctionTest.cxx | 4 +- ...stNeighborInterpolateImageFunctionTest.cxx | 2 +- ...itkRayCastInterpolateImageFunctionTest.cxx | 4 +- ...ndowedSincInterpolateImageFunctionTest.cxx | 2 +- .../itkRayCastInterpolateImageFunction.wrap | 2 +- ...tkTriangleMeshToBinaryImageFilterTest1.cxx | 10 +- .../test/itkContourSpatialObjectPointTest.cxx | 36 +- .../itkSpatialObjectToPointSetFilterTest.cxx | 10 +- .../TestKernel/include/itkTestingMacros.h | 42 +-- .../itkTestingExtractSliceImageFilterTest.cxx | 36 +- ...TestingStretchIntensityImageFilterTest.cxx | 20 +- .../itkBSplineTransformInitializerTest1.cxx | 8 +- .../itkBSplineTransformInitializerTest2.cxx | 8 +- .../test/itkIdentityTransformTest.cxx | 4 +- .../Transform/test/itkMultiTransformTest.cxx | 6 +- .../test/itkRigid2DTransformTest.cxx | 4 +- .../itkAntiAliasBinaryImageFilterTest.cxx | 4 +- .../itkMRIBiasFieldCorrectionFilterTest.cxx | 82 ++--- .../test/itkCustomColormapFunctionTest.cxx | 6 +- .../itkScalarToRGBColormapImageFilterTest.cxx | 2 +- ...onvolutionImageFilterDeltaFunctionTest.cxx | 10 +- .../test/itkFFTConvolutionImageFilterTest.cxx | 36 +- .../itkFFTConvolutionImageFilterTestInt.cxx | 16 +- ...itkInverseDeconvolutionImageFilterTest.cxx | 4 +- ...astSquaresDeconvolutionImageFilterTest.cxx | 4 +- ...tkTikhonovDeconvolutionImageFilterTest.cxx | 4 +- .../itkWienerDeconvolutionImageFilterTest.cxx | 4 +- ...chBasedDenoisingImageFilterDefaultTest.cxx | 8 +- .../itkPatchBasedDenoisingImageFilterTest.cxx | 36 +- ...itkDisplacementFieldTransformCloneTest.cxx | 2 +- .../itkDisplacementFieldTransformTest.cxx | 32 +- ...ximateSignedDistanceMapImageFilterTest.cxx | 12 +- .../itkFastMarchingImageFilterBaseTest.cxx | 16 +- .../itkFastMarchingImageFilterRealTest1.cxx | 4 +- .../itkFastMarchingImageFilterRealTest2.cxx | 4 +- .../test/itkCheckerBoardImageFilterTest.cxx | 6 +- ...strainedValueDifferenceImageFilterTest.cxx | 4 +- .../itkTestingComparisonImageFilterTest.cxx | 28 +- .../test/itkJoinSeriesImageFilterTest.cxx | 6 +- .../itkCannyEdgeDetectionImageFilterTest.cxx | 12 +- .../itkCannyEdgeDetectionImageFilterTest2.cxx | 24 +- ...creteGaussianDerivativeImageFilterTest.cxx | 20 +- ...sianToObjectnessMeasureImageFilterTest.cxx | 24 +- .../itkHoughTransform2DCirclesImageTest.cxx | 28 +- .../itkHoughTransform2DLinesImageTest.cxx | 12 +- ...kSimpleContourExtractorImageFilterTest.cxx | 10 +- .../test/itkUnsharpMaskImageFilterTest.cxx | 14 +- .../itkUnsharpMaskImageFilterTestSimple.cxx | 16 +- ...askNeighborhoodOperatorImageFilterTest.cxx | 4 +- .../test/itkFrequencyBandImageFilterTest.cxx | 54 +-- .../test/itkLabelMapToRGBImageFilterTest1.cxx | 6 +- .../test/itkGradientImageFilterTest.cxx | 4 +- .../test/itkGradientImageFilterTest2.cxx | 2 +- .../itkBSplineControlPointImageFilterTest.cxx | 12 +- ...tkBSplineControlPointImageFunctionTest.cxx | 2 +- ...ScatteredDataPointSetToImageFilterTest.cxx | 22 +- ...catteredDataPointSetToImageFilterTest2.cxx | 10 +- ...catteredDataPointSetToImageFilterTest3.cxx | 12 +- ...catteredDataPointSetToImageFilterTest4.cxx | 4 +- ...catteredDataPointSetToImageFilterTest5.cxx | 6 +- .../test/itkBinShrinkImageFilterTest1.cxx | 20 +- .../test/itkCropImageFilter3DTest.cxx | 8 +- .../ImageGrid/test/itkCropImageFilterTest.cxx | 6 +- .../ImageGrid/test/itkFlipImageFilterTest.cxx | 6 +- .../itkInterpolateImagePointsFilterTest.cxx | 6 +- .../test/itkMirrorPadImageFilterTest.cxx | 6 +- .../test/itkOrientImageFilterTest.cxx | 2 +- .../test/itkOrientImageFilterTest2.cxx | 2 +- .../test/itkPasteImageFilterTest.cxx | 12 +- .../itkRegionOfInterestImageFilterTest.cxx | 4 +- .../ImageGrid/test/itkResampleImageTest.cxx | 16 +- .../ImageGrid/test/itkResampleImageTest2.cxx | 42 +-- .../test/itkResampleImageTest2Streaming.cxx | 22 +- .../ImageGrid/test/itkResampleImageTest3.cxx | 12 +- .../ImageGrid/test/itkResampleImageTest4.cxx | 16 +- .../ImageGrid/test/itkResampleImageTest5.cxx | 16 +- .../ImageGrid/test/itkResampleImageTest6.cxx | 16 +- .../ImageGrid/test/itkResampleImageTest7.cxx | 28 +- .../test/itkShrinkImageStreamingTest.cxx | 2 +- .../test/itkSliceBySliceImageFilterTest.cxx | 14 +- .../test/itkAbsImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkAcosImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkAddImageFilterTest.cxx | 8 +- .../test/itkAddImageFilterTest2.cxx | 6 +- .../test/itkAndImageFilterTest.cxx | 4 +- .../test/itkAsinImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkAtan2ImageFilterTest.cxx | 2 +- .../test/itkAtanImageFilterAndAdaptorTest.cxx | 4 +- .../itkBinaryMagnitudeImageFilterTest.cxx | 2 +- .../test/itkClampImageFilterTest.cxx | 2 +- ...ComplexToImaginaryFilterAndAdaptorTest.cxx | 4 +- ...tkComplexToModulusFilterAndAdaptorTest.cxx | 4 +- .../itkComplexToPhaseFilterAndAdaptorTest.cxx | 4 +- .../itkComplexToRealFilterAndAdaptorTest.cxx | 4 +- ...onstrainedValueAdditionImageFilterTest.cxx | 4 +- .../test/itkCosImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkDivideImageFilterTest.cxx | 6 +- .../test/itkDivideImageFilterTest2.cxx | 6 +- .../itkIntensityWindowingImageFilterTest.cxx | 16 +- .../itkInvertIntensityImageFilterTest.cxx | 6 +- .../itkLog10ImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkLogImageFilterAndAdaptorTest.cxx | 4 +- ...nitudeAndPhaseToComplexImageFilterTest.cxx | 4 +- ...itkMatrixIndexSelectionImageFilterTest.cxx | 4 +- .../test/itkMaximumImageFilterTest.cxx | 6 +- .../test/itkMinimumImageFilterTest.cxx | 6 +- .../test/itkModulusImageFilterTest.cxx | 6 +- .../test/itkMultiplyImageFilterTest.cxx | 4 +- .../test/itkNaryAddImageFilterTest.cxx | 10 +- .../test/itkNaryMaximumImageFilterTest.cxx | 2 +- .../itkNormalizeToConstantImageFilterTest.cxx | 6 +- .../test/itkNotImageFilterTest.cxx | 8 +- .../test/itkNthElementPixelAccessorTest2.cxx | 4 +- .../test/itkOrImageFilterTest.cxx | 4 +- .../test/itkPolylineMaskImageFilterTest.cxx | 12 +- .../test/itkPowImageFilterTest.cxx | 16 +- ...GBToLuminanceImageFilterAndAdaptorTest.cxx | 4 +- .../itkRescaleIntensityImageFilterTest.cxx | 8 +- .../test/itkSigmoidImageFilterTest.cxx | 10 +- .../test/itkSinImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkSqrtImageFilterAndAdaptorTest.cxx | 4 +- .../test/itkSquareImageFilterTest.cxx | 2 +- .../test/itkSubtractImageFilterTest.cxx | 4 +- ...kSymmetricEigenAnalysisImageFilterTest.cxx | 18 +- .../test/itkTanImageFilterAndAdaptorTest.cxx | 4 +- .../itkTernaryMagnitudeImageFilterTest.cxx | 4 +- ...TernaryMagnitudeSquaredImageFilterTest.cxx | 2 +- .../itkTernaryOperatorImageFilterTest.cxx | 2 +- ...kVectorRescaleIntensityImageFilterTest.cxx | 6 +- .../test/itkXorImageFilterTest.cxx | 4 +- .../test/itkBinaryContourImageFilterTest.cxx | 8 +- .../test/itkLabelContourImageFilterTest.cxx | 8 +- ...tkAdditiveGaussianNoiseImageFilterTest.cxx | 8 +- .../itkSaltAndPepperNoiseImageFilterTest.cxx | 10 +- .../test/itkShotNoiseImageFilterTest.cxx | 6 +- .../test/itkSpeckleNoiseImageFilterTest.cxx | 6 +- .../test/itkGaborImageSourceTest.cxx | 18 +- .../test/itkGaborKernelFunctionTest.cxx | 14 +- .../test/itkGaussianImageSourceTest.cxx | 22 +- .../test/itkGridImageSourceTest.cxx | 16 +- .../test/itkPhysicalPointImageSourceTest.cxx | 8 +- ...veHistogramEqualizationImageFilterTest.cxx | 8 +- ...itkLabelOverlapMeasuresImageFilterTest.cxx | 2 +- .../test/itkStatisticsImageFilterTest.cxx | 6 +- .../test/itkAggregateLabelMapFilterTest.cxx | 2 +- ...tributeKeepNObjectsLabelMapFilterTest1.cxx | 10 +- .../itkAttributeLabelObjectAccessorsTest1.cxx | 4 +- ...itkAttributeOpeningLabelMapFilterTest1.cxx | 10 +- ...itkAttributeRelabelLabelMapFilterTest1.cxx | 8 +- .../test/itkAutoCropLabelMapFilterTest1.cxx | 6 +- .../test/itkAutoCropLabelMapFilterTest2.cxx | 6 +- .../itkBinaryGrindPeakImageFilterTest1.cxx | 16 +- .../itkBinaryImageToLabelMapFilterTest.cxx | 6 +- .../itkBinaryImageToLabelMapFilterTest2.cxx | 2 +- ...kBinaryImageToShapeLabelMapFilterTest1.cxx | 26 +- ...ryImageToStatisticsLabelMapFilterTest1.cxx | 32 +- ...econstructionByDilationImageFilterTest.cxx | 6 +- ...ReconstructionByErosionImageFilterTest.cxx | 6 +- ...BinaryReconstructionLabelMapFilterTest.cxx | 4 +- ...inaryShapeKeepNObjectsImageFilterTest1.cxx | 24 +- .../itkBinaryShapeOpeningImageFilterTest1.cxx | 22 +- ...StatisticsKeepNObjectsImageFilterTest1.cxx | 22 +- ...inaryStatisticsOpeningImageFilterTest1.cxx | 22 +- .../test/itkChangeLabelLabelMapFilterTest.cxx | 2 +- .../itkChangeRegionLabelMapFilterTest1.cxx | 4 +- .../test/itkConvertLabelMapFilterTest1.cxx | 2 +- .../test/itkConvertLabelMapFilterTest2.cxx | 2 +- .../test/itkCropLabelMapFilterTest1.cxx | 8 +- ...tkLabelImageToShapeLabelMapFilterTest1.cxx | 8 +- ...elImageToStatisticsLabelMapFilterTest1.cxx | 24 +- .../test/itkLabelMapMaskImageFilterTest.cxx | 22 +- ...itkLabelMapToAttributeImageFilterTest1.cxx | 2 +- .../itkLabelMapToBinaryImageFilterTest.cxx | 6 +- ...LabelShapeKeepNObjectsImageFilterTest1.cxx | 16 +- .../itkLabelShapeOpeningImageFilterTest1.cxx | 14 +- ...StatisticsKeepNObjectsImageFilterTest1.cxx | 14 +- ...LabelStatisticsOpeningImageFilterTest1.cxx | 16 +- .../test/itkMergeLabelMapFilterTest1.cxx | 14 +- .../test/itkPadLabelMapFilterTest1.cxx | 18 +- ...RegionFromReferenceLabelMapFilterTest1.cxx | 2 +- .../test/itkRelabelLabelMapFilterTest1.cxx | 2 +- ...tkShapeKeepNObjectsLabelMapFilterTest1.cxx | 12 +- .../itkShapeOpeningLabelMapFilterTest1.cxx | 12 +- .../test/itkShapeRelabelImageFilterTest1.cxx | 14 +- .../itkShapeRelabelLabelMapFilterTest1.cxx | 10 +- .../itkShapeUniqueLabelMapFilterTest1.cxx | 10 +- .../test/itkShiftScaleLabelMapFilterTest1.cxx | 12 +- ...tisticsKeepNObjectsLabelMapFilterTest1.cxx | 10 +- ...tkStatisticsOpeningLabelMapFilterTest1.cxx | 14 +- .../itkStatisticsRelabelImageFilterTest1.cxx | 12 +- ...tkStatisticsRelabelLabelMapFilterTest1.cxx | 10 +- ...itkStatisticsUniqueLabelMapFilterTest1.cxx | 12 +- .../test/itkFlatStructuringElementTest.cxx | 6 +- .../itkGrayscaleFillholeImageFilterTest.cxx | 4 +- ...aleMorphologicalClosingImageFilterTest.cxx | 4 +- ...aleMorphologicalOpeningImageFilterTest.cxx | 4 +- .../test/itkHConcaveImageFilterTest.cxx | 12 +- .../test/itkHConvexConcaveImageFilterTest.cxx | 2 +- .../test/itkHConvexImageFilterTest.cxx | 12 +- .../test/itkHMaximaImageFilterTest.cxx | 12 +- .../test/itkHMaximaMinimaImageFilterTest.cxx | 2 +- .../test/itkHMinimaImageFilterTest.cxx | 12 +- .../test/itkRegionalMaximaImageFilterTest.cxx | 10 +- .../test/itkRegionalMinimaImageFilterTest.cxx | 10 +- ...itkValuedRegionalMaximaImageFilterTest.cxx | 8 +- ...itkValuedRegionalMinimaImageFilterTest.cxx | 8 +- .../Path/test/itkChainCodePath2DTest.cxx | 2 +- .../Path/test/itkChainCodePathTest.cxx | 2 +- ...ChainCodeToFourierSeriesPathFilterTest.cxx | 4 +- ...xtractOrthogonalSwath2DImageFilterTest.cxx | 6 +- .../Path/test/itkFourierSeriesPathTest.cxx | 2 +- .../Path/test/itkHilbertPathTest.cxx | 10 +- .../itkOrthogonalSwath2DPathFilterTest.cxx | 4 +- ...hogonallyCorrected2DParametricPathTest.cxx | 2 +- .../test/itkPathToChainCodePathFilterTest.cxx | 6 +- .../Path/test/itkPathToImageFilterTest.cxx | 12 +- .../test/itkPolyLineParametricPathTest.cxx | 2 +- .../test/itkBorderQuadEdgeMeshFilterTest2.cxx | 2 +- .../Smoothing/test/itkMeanImageFilterTest.cxx | 8 +- .../itkRecursiveGaussianImageFiltersTest.cxx | 4 +- ...othingRecursiveGaussianImageFilterTest.cxx | 16 +- ...itkHuangMaskedThresholdImageFilterTest.cxx | 4 +- .../test/itkHuangThresholdImageFilterTest.cxx | 4 +- ...termodesMaskedThresholdImageFilterTest.cxx | 4 +- .../itkIntermodesThresholdImageFilterTest.cxx | 4 +- ...kIsoDataMaskedThresholdImageFilterTest.cxx | 4 +- .../itkIsoDataThresholdImageFilterTest.cxx | 4 +- ...ingworthMaskedThresholdImageFilterTest.cxx | 4 +- ...lerIllingworthThresholdImageFilterTest.cxx | 4 +- .../itkLiMaskedThresholdImageFilterTest.cxx | 4 +- .../test/itkLiThresholdImageFilterTest.cxx | 4 +- ...mEntropyMaskedThresholdImageFilterTest.cxx | 4 +- ...MaximumEntropyThresholdImageFilterTest.cxx | 4 +- ...kMomentsMaskedThresholdImageFilterTest.cxx | 4 +- .../itkMomentsThresholdImageFilterTest.cxx | 4 +- .../itkOtsuMaskedThresholdImageFilterTest.cxx | 4 +- ...tkOtsuMultipleThresholdsCalculatorTest.cxx | 4 +- ...kOtsuMultipleThresholdsImageFilterTest.cxx | 20 +- .../test/itkOtsuThresholdImageFilterTest.cxx | 6 +- ...iEntropyMaskedThresholdImageFilterTest.cxx | 4 +- ...tkRenyiEntropyThresholdImageFilterTest.cxx | 4 +- ...ShanbhagMaskedThresholdImageFilterTest.cxx | 4 +- .../itkShanbhagThresholdImageFilterTest.cxx | 4 +- .../itkThresholdLabelerImageFilterTest.cxx | 8 +- ...TriangleMaskedThresholdImageFilterTest.cxx | 4 +- .../itkTriangleThresholdImageFilterTest.cxx | 4 +- .../itkYenMaskedThresholdImageFilterTest.cxx | 4 +- .../test/itkYenThresholdImageFilterTest.cxx | 4 +- Modules/IO/BMP/test/itkBMPImageIOTest.cxx | 4 +- Modules/IO/BMP/test/itkBMPImageIOTest2.cxx | 4 +- Modules/IO/BMP/test/itkBMPImageIOTest3.cxx | 8 +- Modules/IO/BMP/test/itkBMPImageIOTest4.cxx | 8 +- Modules/IO/BMP/test/itkBMPImageIOTest5.cxx | 8 +- .../IO/BMP/test/itkBMPImageIOTestPalette.cxx | 10 +- Modules/IO/Bruker/test/itkBrukerImageTest.cxx | 6 +- .../itkCSVNumericObjectFileWriterTest.cxx | 2 +- .../test/itkGDCMImageReadSeriesWriteTest.cxx | 6 +- Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx | 2 +- .../ImageBase/test/itkConvertBufferTest.cxx | 18 +- Modules/IO/MRC/test/itkMRCImageIOTest.cxx | 2 +- Modules/IO/MRC/test/itkMRCImageIOTest2.cxx | 2 +- .../test/itkMeshFileWriteReadTensorTest.cxx | 4 +- .../itkVTKPolyDataMeshCanReadImageTest.cxx | 2 +- Modules/IO/Meta/test/itkMetaImageIOTest2.cxx | 2 +- Modules/IO/Meta/test/testMetaArray.cxx | 24 +- .../IO/NIFTI/test/itkNiftiImageIOTest12.cxx | 2 +- Modules/IO/PNG/test/itkPNGImageIOTest.cxx | 24 +- Modules/IO/PNG/test/itkPNGImageIOTest2.cxx | 14 +- Modules/IO/PNG/test/itkPNGImageIOTest3.cxx | 2 +- .../IO/PNG/test/itkPNGImageIOTestPalette.cxx | 10 +- .../test/itkLargeTIFFImageWriteReadTest.cxx | 4 +- .../test/itkTIFFImageIOCompressionTest.cxx | 54 +-- Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx | 4 +- Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx | 4 +- .../TIFF/test/itkTIFFImageIOTestPalette.cxx | 8 +- .../itkTransformFileReaderTemplateTest.cxx | 4 +- .../itkTransformFileWriterTemplateTest.cxx | 4 +- .../itkThinPlateTransformWriteReadTest.cxx | 4 +- .../test/itkIOTransformTxtTest.cxx | 2 +- Modules/IO/VTK/test/itkVTKImageIO2Test.cxx | 2 +- Modules/IO/VTK/test/itkVTKImageIOTest3.cxx | 2 +- ...eteGaussianDerivativeImageFunctionTest.cxx | 20 +- ...ientMagnitudeGaussianImageFunctionTest.cxx | 22 +- ...screteHessianGaussianImageFunctionTest.cxx | 22 +- .../itkGridForwardWarpImageFilterTest.cxx | 10 +- ...RobustAutomaticThresholdCalculatorTest.cxx | 10 +- ...obustAutomaticThresholdImageFilterTest.cxx | 12 +- .../itkWarpHarmonicEnergyCalculatorTest.cxx | 8 +- .../FEM/test/itkFEMLoadPointTestUser.cxx | 6 +- .../itkGradientDescentOptimizerBasev4Test.cxx | 2 +- .../test/itkLBFGS2Optimizerv4Test.cxx | 2 +- .../test/itkLBFGSBOptimizerv4Test.cxx | 2 +- .../test/itkLBFGSOptimizerv4Test.cxx | 2 +- .../test/itkObjectToObjectMetricBaseTest.cxx | 4 +- .../itkObjectToObjectOptimizerBaseTest.cxx | 12 +- ...terScalesFromPhysicalShiftPointSetTest.cxx | 2 +- ...ularStepGradientDescentOptimizerv4Test.cxx | 14 +- .../test/itkChiSquareDistributionTest.cxx | 28 +- .../test/itkGaussianDistributionTest.cxx | 26 +- .../Statistics/test/itkHistogramTest.cxx | 2 +- .../test/itkMixtureModelComponentBaseTest.cxx | 2 +- .../test/itkStatisticsAlgorithmTest.cxx | 6 +- .../Statistics/test/itkTDistributionTest.cxx | 54 +-- .../itkEuclideanDistancePointMetricTest.cxx | 8 +- .../itkImageRegistrationMethodTest_11.cxx | 36 +- ...tkImageToSpatialObjectRegistrationTest.cxx | 4 +- ...tkKappaStatisticImageToImageMetricTest.cxx | 22 +- ...kLandmarkBasedTransformInitializerTest.cxx | 20 +- .../itkPointSetToImageRegistrationTest.cxx | 18 +- .../itkPointSetToPointSetRegistrationTest.cxx | 24 +- ...itkFEMFiniteDifferenceFunctionLoadTest.cxx | 24 +- .../test/itkFEMRegistrationFilter2DTest.cxx | 44 +-- .../FEM/test/itkFEMRegistrationFilterTest.cxx | 44 +-- .../test/itkFEMRegistrationFilterTest2.cxx | 44 +-- .../test/itkMIRegistrationFunctionTest.cxx | 2 +- ...icsBasedNonRigidRegistrationMethodTest.cxx | 36 +- .../itkDemonsImageToImageMetricv4Test.cxx | 2 +- ...tkEuclideanDistancePointSetMetricTest2.cxx | 4 +- .../test/itkImageToImageMetricv4Test.cxx | 2 +- .../itkObjectToObjectMultiMetricv4Test.cxx | 6 +- .../itkBSplineSyNImageRegistrationTest.cxx | 2 +- .../test/itkSimpleImageRegistrationTest3.cxx | 4 +- .../test/itkSimpleImageRegistrationTest4.cxx | 2 +- .../test/itkSyNImageRegistrationTest.cxx | 2 +- ...lineVelocityFieldImageRegistrationTest.cxx | 2 +- ...yingVelocityFieldImageRegistrationTest.cxx | 2 +- .../itkBayesianClassifierImageFilterTest.cxx | 24 +- .../itkScalarImageKmeansImageFilterTest.cxx | 2 +- .../test/itkLabelVotingImageFilterTest.cxx | 2 +- ...VotingBinaryHoleFillingImageFilterTest.cxx | 10 +- .../test/itkVotingBinaryImageFilterTest.cxx | 12 +- ...icActiveContourLevelSetImageFilterTest.cxx | 2 +- ...ontourLevelSetImageFilterZeroSigmaTest.cxx | 2 +- ...ntourShapePriorLevelSetImageFilterTest.cxx | 2 +- ...ourShapePriorLevelSetImageFilterTest_2.cxx | 2 +- .../itkConnectedThresholdImageFilterTest.cxx | 20 +- .../Voronoi/test/itkVoronoiDiagram2DTest.cxx | 4 +- .../itkVoronoiSegmentationImageFilterTest.cxx | 14 +- .../itkIsolatedWatershedImageFilterTest.cxx | 26 +- ...calWatershedFromMarkersImageFilterTest.cxx | 18 +- ...kMorphologicalWatershedImageFilterTest.cxx | 14 +- .../test/itkTobogganImageFilterTest.cxx | 10 +- .../test/itkWatershedImageFilterTest.cxx | 20 +- .../Core/test/itkVideoToVideoFilterTest.cxx | 2 +- .../Video/IO/test/itkFileListVideoIOTest.cxx | 2 +- .../IO/test/itkVideoFileReaderWriterTest.cxx | 4 +- 386 files changed, 2131 insertions(+), 2131 deletions(-) diff --git a/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx b/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx index 0a317440356..c3acfdc3912 100644 --- a/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkBarrierTest.cxx @@ -124,7 +124,7 @@ ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION BarrierSpecialTest( void *ptr ) int itkBarrierTest(int argc, char *argv[]) { itk::Barrier::Pointer barrier = itk::Barrier::New(); - EXERCISE_BASIC_OBJECT_METHODS( barrier, Barrier, LightObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( barrier, Barrier, LightObject ); itk::ThreadIdType number_of_threads = 4; if (argc > 1) diff --git a/Modules/Compatibility/Deprecated/test/itkVectorResampleImageFilterTest.cxx b/Modules/Compatibility/Deprecated/test/itkVectorResampleImageFilterTest.cxx index b369a179d90..8d321111a00 100644 --- a/Modules/Compatibility/Deprecated/test/itkVectorResampleImageFilterTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkVectorResampleImageFilterTest.cxx @@ -42,7 +42,7 @@ int itkVectorResampleImageFilterTest( int argc, char * argv[] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, VectorResampleImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, VectorResampleImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watcher(filter); @@ -53,13 +53,13 @@ int itkVectorResampleImageFilterTest( int argc, char * argv[] ) InterpolatorType::Pointer interpolator = InterpolatorType::New(); filter->SetInterpolator( interpolator ); - TEST_SET_GET_VALUE( interpolator, filter->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interpolator, filter->GetInterpolator() ); using TransformType = itk::IdentityTransform< double, Dimension >; TransformType::Pointer transform = TransformType::New(); filter->SetTransform( transform ); - TEST_SET_GET_VALUE( transform, filter->GetTransform() ); + ITK_TEST_SET_GET_VALUE( transform, filter->GetTransform() ); ImageType::SpacingType spacing; spacing.Fill( 1.0 ); @@ -107,44 +107,44 @@ int itkVectorResampleImageFilterTest( int argc, char * argv[] ) blackValue.Fill( 0 ); filter->SetDefaultPixelValue( blackValue ); - TEST_SET_GET_VALUE( blackValue, filter->GetDefaultPixelValue() ); + ITK_TEST_SET_GET_VALUE( blackValue, filter->GetDefaultPixelValue() ); // Set the spacing for the resampling spacing[0] *= 2.0; spacing[1] *= 2.0; filter->SetOutputSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, filter->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, filter->GetOutputSpacing() ); // Keep the input image origin filter->SetOutputOrigin( origin ); - TEST_SET_GET_VALUE( origin, filter->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, filter->GetOutputOrigin() ); // Set the size size[0] /= 2; size[1] /= 2; filter->SetSize( size ); - TEST_SET_GET_VALUE( size, filter->GetSize() ); + ITK_TEST_SET_GET_VALUE( size, filter->GetSize() ); // Set the output direction FilterType::DirectionType outputDirection = image->GetDirection(); filter->SetOutputDirection( outputDirection ); - TEST_SET_GET_VALUE( outputDirection, filter->GetOutputDirection() ); + ITK_TEST_SET_GET_VALUE( outputDirection, filter->GetOutputDirection() ); // Set the start index FilterType::IndexType outputStartIndex = image->GetLargestPossibleRegion().GetIndex(); filter->SetOutputStartIndex( outputStartIndex ); - TEST_SET_GET_VALUE( outputStartIndex, filter->GetOutputStartIndex() ); + ITK_TEST_SET_GET_VALUE( outputStartIndex, filter->GetOutputStartIndex() ); filter->SetInput( image ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Write an image for regression testing using WriterType = itk::ImageFileWriter< ImageType >; @@ -152,7 +152,7 @@ int itkVectorResampleImageFilterTest( int argc, char * argv[] ) writer->SetInput (filter->GetOutput()); writer->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx b/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx index 36833fecba5..d94d4c7f90f 100644 --- a/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx +++ b/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx @@ -34,10 +34,10 @@ int itkAtanRegularizedHeavisideStepFunctionTest1( int, char* [] ) constexpr double epsilon0 = 1.0; const double epsilon1 = 1e-4; - TEST_SET_GET_VALUE( epsilon0, functionBase0->GetEpsilon() ); + ITK_TEST_SET_GET_VALUE( epsilon0, functionBase0->GetEpsilon() ); functionBase0->SetEpsilon( epsilon1 ); - TEST_SET_GET_VALUE( epsilon1, functionBase0->GetEpsilon() ); + ITK_TEST_SET_GET_VALUE( epsilon1, functionBase0->GetEpsilon() ); constexpr double epsilon2 = 0.5; functionBase0->SetEpsilon( epsilon2 ); diff --git a/Modules/Core/Common/test/itkColorTableTest.cxx b/Modules/Core/Common/test/itkColorTableTest.cxx index 5302c898b85..9e1d4f2fee9 100644 --- a/Modules/Core/Common/test/itkColorTableTest.cxx +++ b/Modules/Core/Common/test/itkColorTableTest.cxx @@ -188,7 +188,7 @@ int itkColorTableTest( int argc, char* argv[] ) using ColorTableType = itk::ColorTable< unsigned char >; ColorTableType::Pointer colors = ColorTableType::New(); - EXERCISE_BASIC_OBJECT_METHODS( colors, ColorTable, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( colors, ColorTable, Object ); auto numberOfColors = static_cast< unsigned int >( std::stoi( argv[1] ) ); diff --git a/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx b/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx index e35add8f37a..a1d94c614cd 100644 --- a/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx +++ b/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx @@ -89,16 +89,16 @@ int testDeleteObserverDuringEvent() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); onAnyCount = 0; o->InvokeEvent( itk::UserEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); o->RemoveAllObservers(); @@ -110,16 +110,16 @@ int testDeleteObserverDuringEvent() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); onAnyCount = 0; o->InvokeEvent( itk::UserEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); o->RemoveAllObservers(); @@ -131,16 +131,16 @@ int testDeleteObserverDuringEvent() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); onAnyCount = 0; o->InvokeEvent( itk::UserEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); o->RemoveAllObservers(); @@ -152,16 +152,16 @@ int testDeleteObserverDuringEvent() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); onAnyCount = 0; o->InvokeEvent( itk::UserEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); o->RemoveAllObservers(); @@ -185,17 +185,17 @@ int testCommandConstObject() removeCmd->SetObjectName("Remove Command"); co->AddObserver(itk::AnyEvent(), cmd); - TEST_EXPECT_TRUE( co->HasObserver( itk::AnyEvent() ) ); + ITK_TEST_EXPECT_TRUE( co->HasObserver( itk::AnyEvent() ) ); // the constant command doesn't get executed from the non-const // invocation onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 0 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 0 ); onAnyCount = 0; co->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 1 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 1 ); return EXIT_SUCCESS; } @@ -232,7 +232,7 @@ int testCommandRecursiveObject() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); o->RemoveAllObservers(); @@ -244,7 +244,7 @@ int testCommandRecursiveObject() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 2 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 2 ); o->RemoveAllObservers(); @@ -256,7 +256,7 @@ int testCommandRecursiveObject() onAnyCount = 0; o->InvokeEvent( itk::AnyEvent() ); - TEST_EXPECT_TRUE( onAnyCount == 0 ); + ITK_TEST_EXPECT_TRUE( onAnyCount == 0 ); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkConicShellInteriorExteriorSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkConicShellInteriorExteriorSpatialFunctionTest.cxx index f3681373fc6..3537fca33b5 100644 --- a/Modules/Core/Common/test/itkConicShellInteriorExteriorSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkConicShellInteriorExteriorSpatialFunctionTest.cxx @@ -43,7 +43,7 @@ int itkConicShellInteriorExteriorSpatialFunctionTest( int, char *[] ) ConicShellInteriorExteriorSpatialFunctionType::Pointer conicShellInteriorExteriorSpatialFunction = ConicShellInteriorExteriorSpatialFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( conicShellInteriorExteriorSpatialFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( conicShellInteriorExteriorSpatialFunction, ConicShellInteriorExteriorSpatialFunction, InteriorExteriorSpatialFunction ); @@ -52,7 +52,7 @@ int itkConicShellInteriorExteriorSpatialFunctionTest( int, char *[] ) origin.Fill( 1.0 ); conicShellInteriorExteriorSpatialFunction->SetOrigin( origin ); - TEST_SET_GET_VALUE( origin, conicShellInteriorExteriorSpatialFunction->GetOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, conicShellInteriorExteriorSpatialFunction->GetOrigin() ); ConicShellInteriorExteriorSpatialFunctionType::GradientType originGradient; originGradient.Fill( 1.6 ); @@ -75,18 +75,18 @@ int itkConicShellInteriorExteriorSpatialFunctionTest( int, char *[] ) double distanceMin = 10.0; conicShellInteriorExteriorSpatialFunction->SetDistanceMin( distanceMin ); - TEST_SET_GET_VALUE( distanceMin, conicShellInteriorExteriorSpatialFunction->GetDistanceMin() ); + ITK_TEST_SET_GET_VALUE( distanceMin, conicShellInteriorExteriorSpatialFunction->GetDistanceMin() ); double distanceMax = 50.0; conicShellInteriorExteriorSpatialFunction->SetDistanceMax( distanceMax ); - TEST_SET_GET_VALUE( distanceMax, conicShellInteriorExteriorSpatialFunction->GetDistanceMax() ); + ITK_TEST_SET_GET_VALUE( distanceMax, conicShellInteriorExteriorSpatialFunction->GetDistanceMax() ); double epsilon = 1e-3; conicShellInteriorExteriorSpatialFunction->SetEpsilon( epsilon ); - TEST_SET_GET_VALUE( epsilon, conicShellInteriorExteriorSpatialFunction->GetEpsilon() ); + ITK_TEST_SET_GET_VALUE( epsilon, conicShellInteriorExteriorSpatialFunction->GetEpsilon() ); bool polarity = false; - TEST_SET_GET_BOOLEAN( conicShellInteriorExteriorSpatialFunction, Polarity, polarity ); + ITK_TEST_SET_GET_BOOLEAN( conicShellInteriorExteriorSpatialFunction, Polarity, polarity ); // Define two points to test the function @@ -128,7 +128,7 @@ int itkConicShellInteriorExteriorSpatialFunctionTest( int, char *[] ) // Test for the opposite polarity // polarity = true; - TEST_SET_GET_BOOLEAN( conicShellInteriorExteriorSpatialFunction, Polarity, polarity ); + ITK_TEST_SET_GET_BOOLEAN( conicShellInteriorExteriorSpatialFunction, Polarity, polarity ); insidePoint[0] = 60.0; insidePoint[1] = 60.0; diff --git a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx index a06773a6c6d..3e1545a6fdd 100644 --- a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx +++ b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx @@ -114,76 +114,76 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) // and exercise various methods names = process->GetInputNames(); - TEST_SET_GET_VALUE( 0, names.size() ); + ITK_TEST_SET_GET_VALUE( 0, names.size() ); dataObjects = process->GetInputs(); - TEST_SET_GET_VALUE( 0, dataObjects.size() ); + ITK_TEST_SET_GET_VALUE( 0, dataObjects.size() ); // constDataObjects = process->GetInputs(); -// TEST_SET_GET_VALUE( 0, constDataObjects.size() ); - TEST_SET_GET_VALUE( false, process->HasInput("toto") ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfInputs() ); +// ITK_TEST_SET_GET_VALUE( 0, constDataObjects.size() ); + ITK_TEST_SET_GET_VALUE( false, process->HasInput("toto") ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfInputs() ); names = process->GetOutputNames(); - TEST_SET_GET_VALUE( 0, names.size() ); + ITK_TEST_SET_GET_VALUE( 0, names.size() ); dataObjects = process->GetOutputs(); - TEST_SET_GET_VALUE( 0, dataObjects.size() ); + ITK_TEST_SET_GET_VALUE( 0, dataObjects.size() ); // constDataObjects = process->GetOutputs(); -// TEST_SET_GET_VALUE( 0, constDataObjects.size() ); - TEST_SET_GET_VALUE( false, process->HasOutput("toto") ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfOutputs() ); +// ITK_TEST_SET_GET_VALUE( 0, constDataObjects.size() ); + ITK_TEST_SET_GET_VALUE( false, process->HasOutput("toto") ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfOutputs() ); dataObjects = process->GetIndexedInputs(); - TEST_SET_GET_VALUE( 0, dataObjects.size() ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfValidRequiredInputs() ); + ITK_TEST_SET_GET_VALUE( 0, dataObjects.size() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfValidRequiredInputs() ); dataObjects = process->GetIndexedOutputs(); - TEST_SET_GET_VALUE( 0, dataObjects.size() ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); -// TEST_SET_GET_VALUE( 0, process->GetNumberOfValidRequiredOutputs() ); + ITK_TEST_SET_GET_VALUE( 0, dataObjects.size() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); +// ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfValidRequiredOutputs() ); dataObject = process->MakeOutput( 0 ); - TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); + ITK_TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); dataObject = process->MakeOutput( 1 ); - TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); + ITK_TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); dataObject = process->MakeOutput( 2 ); - TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); + ITK_TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); dataObject = process->MakeOutput( "Not an Index" ); - TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); + ITK_TEST_SET_GET_VALUE( true, dataObject.IsNotNull() ); - TEST_SET_GET_VALUE( false, process->GetAbortGenerateData() ); + ITK_TEST_SET_GET_VALUE( false, process->GetAbortGenerateData() ); process->SetAbortGenerateData( true ); - TEST_SET_GET_VALUE( true, process->GetAbortGenerateData() ); + ITK_TEST_SET_GET_VALUE( true, process->GetAbortGenerateData() ); process->AbortGenerateDataOff(); - TEST_SET_GET_VALUE( false, process->GetAbortGenerateData() ); + ITK_TEST_SET_GET_VALUE( false, process->GetAbortGenerateData() ); process->AbortGenerateDataOn(); - TEST_SET_GET_VALUE( true, process->GetAbortGenerateData() ); + ITK_TEST_SET_GET_VALUE( true, process->GetAbortGenerateData() ); process->AbortGenerateDataOff(); - TEST_SET_GET_VALUE( false, process->GetAbortGenerateData() ); + ITK_TEST_SET_GET_VALUE( false, process->GetAbortGenerateData() ); - TEST_SET_GET_VALUE( 0.0, process->GetProgress() ); + ITK_TEST_SET_GET_VALUE( 0.0, process->GetProgress() ); process->UpdateProgress( 1.0 ); - TEST_SET_GET_VALUE( 1.0, process->GetProgress() ); + ITK_TEST_SET_GET_VALUE( 1.0, process->GetProgress() ); process->UpdateProgress( 10000.0 ); - TEST_SET_GET_VALUE( 1.0, process->GetProgress() ); + ITK_TEST_SET_GET_VALUE( 1.0, process->GetProgress() ); process->UpdateProgress( -1.0 ); - TEST_SET_GET_VALUE( 0.0, process->GetProgress() ); + ITK_TEST_SET_GET_VALUE( 0.0, process->GetProgress() ); process->UpdateProgress( 0.0 ); - TEST_SET_GET_VALUE( 0.0, process->GetProgress() ); + ITK_TEST_SET_GET_VALUE( 0.0, process->GetProgress() ); // shouldn't do anything: there is no output at this point mtime = process->GetMTime(); process->Update(); - TEST_SET_GET_VALUE( mtime, process->GetMTime() ); + ITK_TEST_SET_GET_VALUE( mtime, process->GetMTime() ); // shouldn't do anything: there is no output at this point mtime = process->GetMTime(); process->UpdateLargestPossibleRegion(); - TEST_SET_GET_VALUE( mtime, process->GetMTime() ); + ITK_TEST_SET_GET_VALUE( mtime, process->GetMTime() ); // shouldn't do anything: there is no output at this point mtime = process->GetMTime(); process->UpdateOutputInformation(); - TEST_SET_GET_VALUE( mtime, process->GetMTime() ); + ITK_TEST_SET_GET_VALUE( mtime, process->GetMTime() ); // TODO: how to test those ones? // PropagateRequestedRegion(DataObject *output); @@ -194,40 +194,40 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) // input nor outout mtime = process->GetMTime(); process->ResetPipeline(); - TEST_SET_GET_VALUE( mtime, process->GetMTime() ); + ITK_TEST_SET_GET_VALUE( mtime, process->GetMTime() ); // nothing should change: there is no output - TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); + ITK_TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); process->SetReleaseDataFlag( true ); - TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); + ITK_TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); process->ReleaseDataFlagOff(); - TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); + ITK_TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); process->ReleaseDataFlagOn(); - TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); + ITK_TEST_SET_GET_VALUE( false, process->GetReleaseDataFlag() ); - TEST_SET_GET_VALUE( true, process->GetReleaseDataBeforeUpdateFlag() ); + ITK_TEST_SET_GET_VALUE( true, process->GetReleaseDataBeforeUpdateFlag() ); process->SetReleaseDataBeforeUpdateFlag( false ); - TEST_SET_GET_VALUE( false, process->GetReleaseDataBeforeUpdateFlag() ); + ITK_TEST_SET_GET_VALUE( false, process->GetReleaseDataBeforeUpdateFlag() ); process->ReleaseDataBeforeUpdateFlagOn(); - TEST_SET_GET_VALUE( true, process->GetReleaseDataBeforeUpdateFlag() ); + ITK_TEST_SET_GET_VALUE( true, process->GetReleaseDataBeforeUpdateFlag() ); process->ReleaseDataBeforeUpdateFlagOff(); - TEST_SET_GET_VALUE( false, process->GetReleaseDataBeforeUpdateFlag() ); + ITK_TEST_SET_GET_VALUE( false, process->GetReleaseDataBeforeUpdateFlag() ); process->ReleaseDataBeforeUpdateFlagOn(); - TEST_SET_GET_VALUE( true, process->GetReleaseDataBeforeUpdateFlag() ); + ITK_TEST_SET_GET_VALUE( true, process->GetReleaseDataBeforeUpdateFlag() ); - TEST_EXPECT_TRUE( itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads() <= process->GetNumberOfWorkUnits() ); + ITK_TEST_EXPECT_TRUE( itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads() <= process->GetNumberOfWorkUnits() ); process->SetNumberOfWorkUnits( 11 ); - TEST_SET_GET_VALUE( 11, process->GetNumberOfWorkUnits() ); + ITK_TEST_SET_GET_VALUE( 11, process->GetNumberOfWorkUnits() ); process->SetNumberOfWorkUnits( 0 ); - TEST_SET_GET_VALUE( 1, process->GetNumberOfWorkUnits() ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfWorkUnits() ); process->SetNumberOfWorkUnits( itk::NumericTraits::max() ); - TEST_EXPECT_TRUE( itk::MultiThreaderBase::GetGlobalMaximumNumberOfThreads() <= process->GetNumberOfWorkUnits() ); + ITK_TEST_EXPECT_TRUE( itk::MultiThreaderBase::GetGlobalMaximumNumberOfThreads() <= process->GetNumberOfWorkUnits() ); process->SetNumberOfWorkUnits( itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads() ); - TEST_SET_GET_VALUE( itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads(), process->GetNumberOfWorkUnits() ); + ITK_TEST_SET_GET_VALUE( itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads(), process->GetNumberOfWorkUnits() ); // not sure what to test with that method - at least test that it exist itk::MultiThreaderBase::Pointer multiThreader = process->GetMultiThreader(); - TEST_SET_GET_VALUE( true, multiThreader.IsNotNull() ); + ITK_TEST_SET_GET_VALUE( true, multiThreader.IsNotNull() ); // create some data object that will be used as input and output itk::TestDataObject::Pointer input0 = itk::TestDataObject::New(); @@ -236,54 +236,54 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) itk::TestDataObject::Pointer output1 = itk::TestDataObject::New(); // default input values - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); - TEST_SET_GET_NULL_VALUE( process->GetInput("Primary") ); - TEST_SET_GET_NULL_VALUE( process->GetInput("toto") ); - TEST_SET_GET_NULL_VALUE( process->GetInput(0) ); - TEST_SET_GET_NULL_VALUE( process->GetInput(1) ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput("Primary") ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput("toto") ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput(0) ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput(1) ); process->Print(std::cout); process->SetInput( "Primary", input0 ); names = process->GetInputNames(); - TEST_SET_GET_VALUE( 1, names.size() ); + ITK_TEST_SET_GET_VALUE( 1, names.size() ); - TEST_SET_GET( input0, process->GetPrimaryInput() ); - TEST_SET_GET( input0, process->GetInput(0) ); - TEST_SET_GET( input0, process->GetInput("Primary") ); - TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET( input0, process->GetPrimaryInput() ); + ITK_TEST_SET_GET( input0, process->GetInput(0) ); + ITK_TEST_SET_GET( input0, process->GetInput("Primary") ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); process->SetPrimaryInput( nullptr ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); - TEST_SET_GET_NULL_VALUE( process->GetInput(0) ); - TEST_SET_GET_NULL_VALUE( process->GetInput("Primary") ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput(0) ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput("Primary") ); process->SetNthInput( 0, input0 ); - TEST_SET_GET( input0, process->GetPrimaryInput() ); - TEST_SET_GET( input0, process->GetInput(0) ); - TEST_SET_GET( input0, process->GetInput("Primary") ); + ITK_TEST_SET_GET( input0, process->GetPrimaryInput() ); + ITK_TEST_SET_GET( input0, process->GetInput(0) ); + ITK_TEST_SET_GET( input0, process->GetInput("Primary") ); process->SetPrimaryInputName("First"); - TEST_SET_GET( input0, process->GetPrimaryInput() ); - TEST_SET_GET( input0, process->GetInput(0) ); - TEST_SET_GET( input0, process->GetInput("First") ); + ITK_TEST_SET_GET( input0, process->GetPrimaryInput() ); + ITK_TEST_SET_GET( input0, process->GetInput(0) ); + ITK_TEST_SET_GET( input0, process->GetInput("First") ); process->SetNthInput( 1, input1 ); - TEST_SET_GET( input1, process->GetInput(1) ); - TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET( input1, process->GetInput(1) ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); process->SetNthInput( 1, nullptr ); - TEST_SET_GET_NULL_VALUE( process->GetInput(1) ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput(1) ); process->SetNthInput( 1, input1 ); process->Print(std::cout); process->RemoveInput(1); - TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); process->SetNthInput( 1, input1 ); - TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET( input1, process->GetInput(1) ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET( input1, process->GetInput(1) ); process->RemoveInput(10); - TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); process->PopBackInput(); - TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); itk::TestDataObject::Pointer output = itk::TestDataObject::New(); process->SetNthOutput( 0, output ); @@ -291,206 +291,206 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) process->SetNumberOfRequiredInputs(1); process->AddRequiredInputName( "Foo" ); process->Print( std::cout ); - TRY_EXPECT_EXCEPTION( process->Update() ); + ITK_TRY_EXPECT_EXCEPTION( process->Update() ); process->SetInput( "Foo", input1 ); process->Print( std::cout ); - TRY_EXPECT_NO_EXCEPTION( process->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( process->Update() ); process->AddRequiredInputName( "Bar" ); process->SetInput( "Bar", input1 ); process->SetNumberOfRequiredInputs(0); process->Print( std::cout ); - TRY_EXPECT_NO_EXCEPTION( process->Update() ); - TRY_EXPECT_EXCEPTION( process->SetInput( "", input1 ) ); + ITK_TRY_EXPECT_NO_EXCEPTION( process->Update() ); + ITK_TRY_EXPECT_EXCEPTION( process->SetInput( "", input1 ) ); names = process->GetRequiredInputNames(); - TEST_SET_GET_VALUE( 2, names.size() ); + ITK_TEST_SET_GET_VALUE( 2, names.size() ); process->RemoveRequiredInputName( "Foo" ); process->RemoveRequiredInputName( "Bar" ); - TEST_SET_GET_VALUE( 0, process->GetRequiredInputNames().size() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetRequiredInputNames().size() ); process->SetRequiredInputNames( names ); process->Print( std::cout ); - TEST_SET_GET_VALUE( 2, process->GetRequiredInputNames().size() ); + ITK_TEST_SET_GET_VALUE( 2, process->GetRequiredInputNames().size() ); process->SetPrimaryOutputName( "Outy" ); const std::string primaryOutputName = process->GetPrimaryOutputName(); - TEST_EXPECT_EQUAL( "Outy", primaryOutputName ); + ITK_TEST_EXPECT_EQUAL( "Outy", primaryOutputName ); process = itk::TestProcessObject::New(); process->SetPrimaryInputName("Image1"); - TRY_EXPECT_EXCEPTION( process->AddRequiredInputName( "" ) ); + ITK_TRY_EXPECT_EXCEPTION( process->AddRequiredInputName( "" ) ); process->Print(std::cout); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfRequiredInputs() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfRequiredInputs() ); process->AddRequiredInputName("Image2"); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfRequiredInputs() ); - TEST_EXPECT_EQUAL( 0, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_EXCEPTION( process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfRequiredInputs() ); + ITK_TEST_EXPECT_EQUAL( 0, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_EXCEPTION( process->VerifyPreconditions() ); process->SetInput( "Image1", input0 ); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_EXCEPTION( process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_EXCEPTION( process->VerifyPreconditions() ); process->SetInput( "Image2", input0 ); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); process->SetNumberOfRequiredInputs(2); process->SetInput( "Image2", nullptr ); process->SetNthInput( 10, input0 ); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); process->AddInput( input0 ); - TEST_EXPECT_EQUAL( 2, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 2, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); process->SetInput( "Image2", input0 ); - TEST_EXPECT_EQUAL( 2, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 2, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); // Test AddOptionalInputName process = itk::TestProcessObject::New(); process->AddOptionalInputName("OptImage"); - TEST_EXPECT_EQUAL(0, process->GetRequiredInputNames().size()); - TEST_EXPECT_EQUAL(1, process->GetInputNames().size()); - TEST_EXPECT_EQUAL("OptImage", process->GetInputNames().front()); - TEST_EXPECT_TRUE(!process->IsRequiredInputName("OptImage")); + ITK_TEST_EXPECT_EQUAL(0, process->GetRequiredInputNames().size()); + ITK_TEST_EXPECT_EQUAL(1, process->GetInputNames().size()); + ITK_TEST_EXPECT_EQUAL("OptImage", process->GetInputNames().front()); + ITK_TEST_EXPECT_TRUE(!process->IsRequiredInputName("OptImage")); process = itk::TestProcessObject::New(); process->SetNumberOfRequiredInputs(1); process->AddOptionalInputName("OptImage",1); - TEST_EXPECT_EQUAL(1, process->GetRequiredInputNames().size()); - TEST_EXPECT_EQUAL(2, process->GetInputNames().size()) - TEST_EXPECT_TRUE(!process->IsRequiredInputName("OptImage")); + ITK_TEST_EXPECT_EQUAL(1, process->GetRequiredInputNames().size()); + ITK_TEST_EXPECT_EQUAL(2, process->GetInputNames().size()) + ITK_TEST_EXPECT_TRUE(!process->IsRequiredInputName("OptImage")); process->SetInput( "OptImage", input0 ); - TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); process = itk::TestProcessObject::New(); process->SetNumberOfRequiredInputs(1); process->AddOptionalInputName("OptImage",1); - TEST_EXPECT_EQUAL(1, process->GetRequiredInputNames().size()); - TEST_EXPECT_EQUAL(2, process->GetInputNames().size()); - TEST_EXPECT_TRUE(!process->IsRequiredInputName("OptImage")); + ITK_TEST_EXPECT_EQUAL(1, process->GetRequiredInputNames().size()); + ITK_TEST_EXPECT_EQUAL(2, process->GetInputNames().size()); + ITK_TEST_EXPECT_TRUE(!process->IsRequiredInputName("OptImage")); process->SetInput( "OptImage", input0 ); - TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); - TEST_EXPECT_EQUAL( input0, process->GetInput(1) ); - TEST_EXPECT_EQUAL( 0, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput(1) ); + ITK_TEST_EXPECT_EQUAL( 0, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); process->SetPrimaryInput( input0 ); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); process->SetInput( "OptImage", nullptr ); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); process = itk::TestProcessObject::New(); process->SetNthInput( 1, input0 ); process->AddOptionalInputName("OptImage",1); - TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); - TEST_EXPECT_EQUAL( input0, process->GetInput(1) ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput(1) ); process = itk::TestProcessObject::New(); process->SetInput( "OptImage", input0 ); process->SetNthInput( 1, input1 ); process->AddOptionalInputName("OptImage",1); - TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); - TEST_EXPECT_EQUAL( input0, process->GetInput(1) ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput("OptImage") ); + ITK_TEST_EXPECT_EQUAL( input0, process->GetInput(1) ); process = itk::TestProcessObject::New(); process->SetNumberOfRequiredInputs(2); process->SetPrimaryInputName("Image1"); process->AddRequiredInputName("Image2"); - TEST_EXPECT_EQUAL( 2, process->GetNumberOfRequiredInputs() ); - TEST_EXPECT_EQUAL( 0, process->GetNumberOfValidRequiredInputs() ); + ITK_TEST_EXPECT_EQUAL( 2, process->GetNumberOfRequiredInputs() ); + ITK_TEST_EXPECT_EQUAL( 0, process->GetNumberOfValidRequiredInputs() ); process->SetInput( "Image1", input0 ); - TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); + ITK_TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); process->SetInput( "Image2", input0 ); process->RemoveRequiredInputName( "Image2" ); - TRY_EXPECT_EXCEPTION( process->AddRequiredInputName( "", 1 ) ); + ITK_TRY_EXPECT_EXCEPTION( process->AddRequiredInputName( "", 1 ) ); process->AddRequiredInputName("Image2", 1 ); process->Print(std::cout); - TEST_EXPECT_EQUAL( 2, process->GetNumberOfRequiredInputs() ); - TEST_EXPECT_EQUAL( 2, process->GetNumberOfValidRequiredInputs() ); - TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); + ITK_TEST_EXPECT_EQUAL( 2, process->GetNumberOfRequiredInputs() ); + ITK_TEST_EXPECT_EQUAL( 2, process->GetNumberOfValidRequiredInputs() ); + ITK_TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); // testing SetNumberOfIndexedInputs process = itk::TestProcessObject::New(); process->SetNumberOfIndexedInputs( 1 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); process->SetPrimaryInput( input0 ); - TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_VALUE( input0, process->GetPrimaryInput() ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( input0, process->GetPrimaryInput() ); process->SetNumberOfIndexedInputs( 0 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); process->SetNumberOfIndexedInputs( 3 ); - TEST_SET_GET_VALUE( 3, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_VALUE( 3, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); process->SetNthInput( 1, input1 ); - TEST_SET_GET_VALUE( input1, process->GetInput(1) ); + ITK_TEST_SET_GET_VALUE( input1, process->GetInput(1) ); process->SetNthInput( 2, input1 ); - TEST_SET_GET_VALUE( input1, process->GetInput(2) ); + ITK_TEST_SET_GET_VALUE( input1, process->GetInput(2) ); process->SetNumberOfIndexedInputs( 1 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); // testing RemoveInput process = itk::TestProcessObject::New(); process->SetNumberOfIndexedInputs( 2 ); process->SetPrimaryInput( input0 ); - TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); process->RemoveInput( "Primary" ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); - TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); - TEST_SET_GET_VALUE( 1, process->GetNumberOfInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfInputs() ); process->AddRequiredInputName("Req"); process->SetInput( "Req", input0 ); - TEST_SET_GET_VALUE( input0, process->GetInput("Req") ); + ITK_TEST_SET_GET_VALUE( input0, process->GetInput("Req") ); process->RemoveInput( "Req" ); - TEST_SET_GET_NULL_VALUE( process->GetInput("Req") ); - TEST_EXPECT_TRUE( process->IsRequiredInputName("Req") ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput("Req") ); + ITK_TEST_EXPECT_TRUE( process->IsRequiredInputName("Req") ); process->SetInput( "name", input0 ); - TEST_SET_GET_VALUE( input0, process->GetInput("name") ); + ITK_TEST_SET_GET_VALUE( input0, process->GetInput("name") ); process->RemoveInput( "name" ); - TEST_SET_GET_NULL_VALUE( process->GetInput("name") ); - TEST_SET_GET_VALUE( 2, process->GetNumberOfInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput("name") ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfInputs() ); process->RemoveInput( 99 ); - TEST_SET_GET_NULL_VALUE( process->GetInput("Req") ); - TEST_EXPECT_TRUE( process->IsRequiredInputName("Req") ); - TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetInput("Req") ); + ITK_TEST_EXPECT_TRUE( process->IsRequiredInputName("Req") ); + ITK_TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); process->RemoveInput( 1 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedInputs() ); // testing SetNumberOfIndexedOutputs process = itk::TestProcessObject::New(); process->SetNumberOfIndexedOutputs( 1 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); process->SetPrimaryOutput( input0 ); - TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedOutputs() ); - TEST_SET_GET_VALUE( input0, process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedOutputs() ); + ITK_TEST_SET_GET_VALUE( input0, process->GetPrimaryOutput() ); process->SetNumberOfIndexedOutputs( 0 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); process->SetNumberOfIndexedOutputs( 3 ); - TEST_SET_GET_VALUE( 3, process->GetNumberOfIndexedOutputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_VALUE( 3, process->GetNumberOfIndexedOutputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); process->SetNthOutput( 1, input1 ); - TEST_SET_GET_VALUE( input1, process->GetOutput(1) ); + ITK_TEST_SET_GET_VALUE( input1, process->GetOutput(1) ); process->SetNthOutput( 2, input1 ); - TEST_SET_GET_VALUE( input1, process->GetOutput(2) ); + ITK_TEST_SET_GET_VALUE( input1, process->GetOutput(2) ); process->SetNumberOfIndexedOutputs( 1 ); - TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfIndexedOutputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); process->SetNumberOfRequiredOutputs(1); std::cout << process; @@ -499,12 +499,12 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) // test default state where null is primary output process = itk::TestProcessObject::New(); - TEST_SET_GET_VALUE( 0, process->GetNumberOfOutputs() ); - TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_VALUE( 0, process->GetNumberOfOutputs() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetPrimaryOutput() ); process->SetOutput( "Out", output1 ); process->SetPrimaryOutputName( "Out" ); - TEST_SET_GET_VALUE( output1, process->GetPrimaryOutput() ); - TEST_SET_GET_NULL_VALUE( process->GetOutput("Primary") ); + ITK_TEST_SET_GET_VALUE( output1, process->GetPrimaryOutput() ); + ITK_TEST_SET_GET_NULL_VALUE( process->GetOutput("Primary") ); process->RemoveOutput("Primary"); process = itk::TestProcessObject::New(); diff --git a/Modules/Core/Common/test/itkDecoratorTest.cxx b/Modules/Core/Common/test/itkDecoratorTest.cxx index e2ee5163ec1..15436324faf 100644 --- a/Modules/Core/Common/test/itkDecoratorTest.cxx +++ b/Modules/Core/Common/test/itkDecoratorTest.cxx @@ -64,16 +64,16 @@ int itkDecoratorTest(int, char* [] ) const itk::ModifiedTimeType t1 = decoratedTransform->GetMTime(); transformObject->Modified(); - TEST_EXPECT_TRUE(t1 < decoratedTransform->GetMTime()); + ITK_TEST_EXPECT_TRUE(t1 < decoratedTransform->GetMTime()); TransformObjectType::Pointer decoratedTransform2 = TransformObjectType::New(); decoratedTransform2->Graft( decoratedTransform ); - TEST_EXPECT_EQUAL( decoratedTransform2->Get(), decoratedTransform->Get() ); + ITK_TEST_EXPECT_EQUAL( decoratedTransform2->Get(), decoratedTransform->Get() ); const itk::ModifiedTimeType t2 = decoratedTransform->GetMTime(); decoratedTransform2->GetModifiable()->Modified(); - TEST_EXPECT_TRUE(t2 < decoratedTransform->GetMTime()); + ITK_TEST_EXPECT_TRUE(t2 < decoratedTransform->GetMTime()); std::cout << "Value of decoratedTransform: "; @@ -86,25 +86,25 @@ int itkDecoratorTest(int, char* [] ) TransformBaseObjectType::Pointer decoratedBaseTransform = TransformBaseObjectType::New(); //NOTE: GetPointer is needed to force selection of the correct overloaded function signature. decoratedBaseTransform->Graft( decoratedTransform.GetPointer() ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); + ITK_TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); decoratedBaseTransform->ReleaseData(); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == nullptr ); + ITK_TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == nullptr ); //NOTE: GetPointer is needed to force selection of the correct overloaded function signature. decoratedBaseTransform->Graft( f.GetPointer() ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == nullptr ); + ITK_TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == nullptr ); decoratedBaseTransform->Graft( static_cast(nullptr) ); //NOTE: GetPointer is needed to force selection of the correct overloaded function signature. decoratedBaseTransform->Graft( decoratedTransform.GetPointer() ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); + ITK_TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); decoratedBaseTransform->Graft( static_cast(nullptr) ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); + ITK_TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); decoratedTransform->ReleaseData(); decoratedTransform->Graft( decoratedBaseTransform ); - TEST_EXPECT_TRUE( decoratedTransform->Get() == nullptr ); + ITK_TEST_EXPECT_TRUE( decoratedTransform->Get() == nullptr ); std::cout << "----------------------------------------------------" << std::endl; diff --git a/Modules/Core/Common/test/itkExtractImageTest.cxx b/Modules/Core/Common/test/itkExtractImageTest.cxx index 01ff5f3c665..756bc03f180 100644 --- a/Modules/Core/Common/test/itkExtractImageTest.cxx +++ b/Modules/Core/Common/test/itkExtractImageTest.cxx @@ -51,7 +51,7 @@ bool ExtractImageInPlaceTest() extract->UpdateLargestPossibleRegion(); // check that the it was not run in-place - TEST_EXPECT_TRUE( source->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); + ITK_TEST_EXPECT_TRUE( source->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); // add a filter between which will produce the requested region, and // enable in-place operation @@ -65,10 +65,10 @@ bool ExtractImageInPlaceTest() // this buffer should still be ok - TEST_EXPECT_TRUE( source->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); + ITK_TEST_EXPECT_TRUE( source->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); // this should have been taken by the in-place; - TEST_EXPECT_TRUE( filter->GetOutput()->GetBufferedRegion().GetSize() == zeroSize ); + ITK_TEST_EXPECT_TRUE( filter->GetOutput()->GetBufferedRegion().GetSize() == zeroSize ); // try with in-place disabled extract->InPlaceOff(); @@ -76,8 +76,8 @@ bool ExtractImageInPlaceTest() // these buffers should still be ok - TEST_EXPECT_TRUE( source->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); - TEST_EXPECT_TRUE( filter->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); + ITK_TEST_EXPECT_TRUE( source->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); + ITK_TEST_EXPECT_TRUE( filter->GetOutput()->GetBufferedRegion().GetSize() != zeroSize ); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkFrustumSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkFrustumSpatialFunctionTest.cxx index 39fd79ea499..38bcc87ff8f 100644 --- a/Modules/Core/Common/test/itkFrustumSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkFrustumSpatialFunctionTest.cxx @@ -39,7 +39,7 @@ int itkFrustumSpatialFunctionTest( int, char *[] ) FrustumSpatialFunctionType::Pointer frustrumSpatialFunction = FrustumSpatialFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( frustrumSpatialFunction, FrustumSpatialFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( frustrumSpatialFunction, FrustumSpatialFunction, InteriorExteriorSpatialFunction ); // Set the frustum properties @@ -47,34 +47,34 @@ int itkFrustumSpatialFunctionTest( int, char *[] ) apex.Fill( 1.1 ); frustrumSpatialFunction->SetApex( apex ); - TEST_SET_GET_VALUE( apex, frustrumSpatialFunction->GetApex() ); + ITK_TEST_SET_GET_VALUE( apex, frustrumSpatialFunction->GetApex() ); double topPlane = 50.0; frustrumSpatialFunction->SetTopPlane( topPlane ); - TEST_SET_GET_VALUE( topPlane, frustrumSpatialFunction->GetTopPlane() ); + ITK_TEST_SET_GET_VALUE( topPlane, frustrumSpatialFunction->GetTopPlane() ); double bottomPlane = 10.0; frustrumSpatialFunction->SetBottomPlane( bottomPlane ); - TEST_SET_GET_VALUE( bottomPlane, frustrumSpatialFunction->GetBottomPlane() ); + ITK_TEST_SET_GET_VALUE( bottomPlane, frustrumSpatialFunction->GetBottomPlane() ); double angleZ = 36; frustrumSpatialFunction->SetAngleZ( angleZ ); - TEST_SET_GET_VALUE( angleZ, frustrumSpatialFunction->GetAngleZ() ); + ITK_TEST_SET_GET_VALUE( angleZ, frustrumSpatialFunction->GetAngleZ() ); double apertureAngleX = 54; frustrumSpatialFunction->SetApertureAngleX( apertureAngleX ); - TEST_SET_GET_VALUE( apertureAngleX, frustrumSpatialFunction->GetApertureAngleX() ); + ITK_TEST_SET_GET_VALUE( apertureAngleX, frustrumSpatialFunction->GetApertureAngleX() ); double apertureAngleY = 120; frustrumSpatialFunction->SetApertureAngleY( apertureAngleY ); - TEST_SET_GET_VALUE( apertureAngleY, frustrumSpatialFunction->GetApertureAngleY() ); + ITK_TEST_SET_GET_VALUE( apertureAngleY, frustrumSpatialFunction->GetApertureAngleY() ); // Test for a rotation in the XZ plane // auto rotationPlane = static_cast< FrustumSpatialFunctionType::FrustumRotationPlaneType > ( 1 ); frustrumSpatialFunction->SetRotationPlane( rotationPlane ); - TEST_SET_GET_VALUE( rotationPlane, frustrumSpatialFunction->GetRotationPlane() ); + ITK_TEST_SET_GET_VALUE( rotationPlane, frustrumSpatialFunction->GetRotationPlane() ); // Define inside/outside points to test the function FrustumSpatialFunctionType::InputType insidePoint; @@ -143,7 +143,7 @@ int itkFrustumSpatialFunctionTest( int, char *[] ) rotationPlane = static_cast< FrustumSpatialFunctionType::FrustumRotationPlaneType > ( 2 ); frustrumSpatialFunction->SetRotationPlane( rotationPlane ); - TEST_SET_GET_VALUE( rotationPlane, frustrumSpatialFunction->GetRotationPlane() ); + ITK_TEST_SET_GET_VALUE( rotationPlane, frustrumSpatialFunction->GetRotationPlane() ); insidePoint[0] = 20.0; insidePoint[1] = 15.0; diff --git a/Modules/Core/Common/test/itkGaussianSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkGaussianSpatialFunctionTest.cxx index eee10e2e19d..1cbc1b44f09 100644 --- a/Modules/Core/Common/test/itkGaussianSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkGaussianSpatialFunctionTest.cxx @@ -42,7 +42,7 @@ int itkGaussianSpatialFunctionTest( int argc, char* argv[] ) GaussianSpatialFunctionType::Pointer gaussianSpatialFunction = GaussianSpatialFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( gaussianSpatialFunction, GaussianSpatialFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( gaussianSpatialFunction, GaussianSpatialFunction, SpatialFunction ); ArrayType mean; @@ -50,32 +50,32 @@ int itkGaussianSpatialFunctionTest( int argc, char* argv[] ) mean[1] = 17; mean[2] = 19; gaussianSpatialFunction->SetMean( mean ); - TEST_SET_GET_VALUE( mean, gaussianSpatialFunction->GetMean() ); + ITK_TEST_SET_GET_VALUE( mean, gaussianSpatialFunction->GetMean() ); ArrayType sigma; sigma[0] = 5; sigma[1] = 7; sigma[2] = 9; gaussianSpatialFunction->SetSigma( sigma ); - TEST_SET_GET_VALUE( sigma, gaussianSpatialFunction->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigma, gaussianSpatialFunction->GetSigma() ); double scale = std::stod( argv[1] ); gaussianSpatialFunction->SetScale( scale ); - TEST_SET_GET_VALUE( scale, gaussianSpatialFunction->GetScale() ); + ITK_TEST_SET_GET_VALUE( scale, gaussianSpatialFunction->GetScale() ); auto normalized = static_cast< bool >( std::stoi( argv[2] ) ); gaussianSpatialFunction->SetNormalized( normalized ); - TEST_SET_GET_VALUE( normalized, gaussianSpatialFunction->GetNormalized() ); + ITK_TEST_SET_GET_VALUE( normalized, gaussianSpatialFunction->GetNormalized() ); if( normalized ) { gaussianSpatialFunction->NormalizedOn(); - TEST_SET_GET_VALUE( true, gaussianSpatialFunction->GetNormalized() ); + ITK_TEST_SET_GET_VALUE( true, gaussianSpatialFunction->GetNormalized() ); } else { gaussianSpatialFunction->NormalizedOff(); - TEST_SET_GET_VALUE( false, gaussianSpatialFunction->GetNormalized() ); + ITK_TEST_SET_GET_VALUE( false, gaussianSpatialFunction->GetNormalized() ); } diff --git a/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx b/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx index bfeba639b9a..5b604c9c110 100644 --- a/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx +++ b/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx @@ -87,18 +87,18 @@ int itkImageAlgorithmCopyTest2( int, char *[] ) std::cout << "Copying two images of same type" << std::endl; itk::ImageAlgorithm::Copy( image1.GetPointer(), image2.GetPointer(), region, region ); - TEST_EXPECT_TRUE( CheckBuffer( image2.GetPointer(), 13 ) ); + ITK_TEST_EXPECT_TRUE( CheckBuffer( image2.GetPointer(), 13 ) ); std::cout << "Copying images of different types" << std::endl; itk::ImageAlgorithm::Copy( image1.GetPointer(), image3.GetPointer(), region, region ); - TEST_EXPECT_TRUE( CheckBuffer( image3.GetPointer(), 13 ) ); + ITK_TEST_EXPECT_TRUE( CheckBuffer( image3.GetPointer(), 13 ) ); image1->FillBuffer(0); itk::ImageAlgorithm::Copy( image3.GetPointer(), image1.GetPointer(), region, region ); - TEST_EXPECT_TRUE( CheckBuffer( image1.GetPointer(), 13 ) ); + ITK_TEST_EXPECT_TRUE( CheckBuffer( image1.GetPointer(), 13 ) ); AbsImageType::Pointer absimage = AbsImageType::New(); @@ -108,7 +108,7 @@ int itkImageAlgorithmCopyTest2( int, char *[] ) std::cout << "Copying from adaptor" << std::endl; itk::ImageAlgorithm::Copy( absimage.GetPointer(), image2.GetPointer(), region, region ); - TEST_EXPECT_TRUE( CheckBuffer( image2.GetPointer(), 13 ) ); + ITK_TEST_EXPECT_TRUE( CheckBuffer( image2.GetPointer(), 13 ) ); STDVectorImageType::Pointer image4 = STDVectorImageType::New(); @@ -123,7 +123,7 @@ int itkImageAlgorithmCopyTest2( int, char *[] ) std::cout << "Copying Non-POD pixels" << std::endl; itk::ImageAlgorithm::Copy( image4.GetPointer(), image5.GetPointer(), region, region ); - TEST_EXPECT_TRUE( CheckBuffer( image5.GetPointer(), std::vector( 10, 3.14) ) ); + ITK_TEST_EXPECT_TRUE( CheckBuffer( image5.GetPointer(), std::vector( 10, 3.14) ) ); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx b/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx index 6ac75bc452b..2fb85696e24 100644 --- a/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx @@ -27,7 +27,7 @@ int itkImageRegionSplitterDirectionTest(int, char*[]) itk::ImageRegionSplitterDirection::Pointer splitter = itk::ImageRegionSplitterDirection::New(); - EXERCISE_BASIC_OBJECT_METHODS( splitter, ImageRegionSplitterDirection, + ITK_EXERCISE_BASIC_OBJECT_METHODS( splitter, ImageRegionSplitterDirection, ImageRegionSplitterBase ); itk::ImageRegion<2> region; @@ -39,33 +39,33 @@ int itkImageRegionSplitterDirectionTest(int, char*[]) const itk::ImageRegion<2> lpRegion = region; - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 2 ), 2 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 3 ), 3 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 6 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 11 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 12 ), 11 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 11 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 2 ), 2 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 3 ), 3 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 6 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 11 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 12 ), 11 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 11 ); splitter->SetDirection(1); - TEST_EXPECT_EQUAL( splitter->GetDirection(), 1); + ITK_TEST_EXPECT_EQUAL( splitter->GetDirection(), 1); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 5 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 10 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 10 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 5 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 10 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 10 ); region = lpRegion; splitter->GetSplit(0, 2, region); - TEST_EXPECT_EQUAL(region.GetSize(0), 5); - TEST_EXPECT_EQUAL(region.GetSize(1), 11); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 5); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 11); region = lpRegion; splitter->GetSplit(1, 2, region); - TEST_EXPECT_EQUAL(region.GetSize(0), 5); - TEST_EXPECT_EQUAL(region.GetSize(1), 11); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 5); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 11); return EXIT_SUCCESS; diff --git a/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx b/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx index 02ddf109dde..dee9f302437 100644 --- a/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx @@ -27,7 +27,7 @@ int itkImageRegionSplitterMultidimensionalTest(int, char*[]) itk::ImageRegionSplitterMultidimensional::Pointer splitter = itk::ImageRegionSplitterMultidimensional::New(); - EXERCISE_BASIC_OBJECT_METHODS( splitter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( splitter, ImageRegionSplitterMultidimensional, ImageRegionSplitterBase ); itk::ImageRegion<2> region; @@ -39,40 +39,40 @@ int itkImageRegionSplitterMultidimensionalTest(int, char*[]) const itk::ImageRegion<2> lpRegion = region; - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 2 ), 2 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 3 ), 2 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 6 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 9 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 12 ), 12 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 90 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 2 ), 2 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 3 ), 2 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 6 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 9 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 12 ), 12 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 90 ); region = lpRegion; splitter->GetSplit(0, 2, region); - TEST_EXPECT_EQUAL(region.GetSize(0), 10); - TEST_EXPECT_EQUAL(region.GetSize(1), 5); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 10); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 5); region = lpRegion; splitter->GetSplit(1, 2, region); - TEST_EXPECT_EQUAL(region.GetSize(0), 10); - TEST_EXPECT_EQUAL(region.GetSize(1), 6); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 10); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 6); region = lpRegion; splitter->GetSplit(0, 4, region); - TEST_EXPECT_EQUAL(region.GetIndex(0), 1); - TEST_EXPECT_EQUAL(region.GetIndex(1), 10); - TEST_EXPECT_EQUAL(region.GetSize(0), 5); - TEST_EXPECT_EQUAL(region.GetSize(1), 5); + ITK_TEST_EXPECT_EQUAL(region.GetIndex(0), 1); + ITK_TEST_EXPECT_EQUAL(region.GetIndex(1), 10); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 5); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 5); region = lpRegion; splitter->GetSplit(3, 4, region); - TEST_EXPECT_EQUAL(region.GetIndex(0), 6); - TEST_EXPECT_EQUAL(region.GetIndex(1), 15); - TEST_EXPECT_EQUAL(region.GetSize(0), 5); - TEST_EXPECT_EQUAL(region.GetSize(1), 6); + ITK_TEST_EXPECT_EQUAL(region.GetIndex(0), 6); + ITK_TEST_EXPECT_EQUAL(region.GetIndex(1), 15); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 5); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 6); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx b/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx index e2dd83c5b16..b69076ce6db 100644 --- a/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx @@ -27,7 +27,7 @@ int itkImageRegionSplitterSlowDimensionTest(int, char*[]) itk::ImageRegionSplitterSlowDimension::Pointer splitter = itk::ImageRegionSplitterSlowDimension::New(); - EXERCISE_BASIC_OBJECT_METHODS( splitter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( splitter, ImageRegionSplitterSlowDimension, ImageRegionSplitterBase ); itk::ImageRegion<2> region; @@ -39,25 +39,25 @@ int itkImageRegionSplitterSlowDimensionTest(int, char*[]) const itk::ImageRegion<2> lpRegion = region; - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 2 ), 2 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 3 ), 3 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 6 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 11 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 12 ), 11 ); - TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 11 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 1 ), 1 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 2 ), 2 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 3 ), 3 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 4 ), 4 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 7 ), 6 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 11 ), 11 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 12 ), 11 ); + ITK_TEST_EXPECT_EQUAL( splitter->GetNumberOfSplits( lpRegion, 99 ), 11 ); region = lpRegion; splitter->GetSplit(0, 2, region); - TEST_EXPECT_EQUAL(region.GetSize(0), 10); - TEST_EXPECT_EQUAL(region.GetSize(1), 6); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 10); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 6); region = lpRegion; splitter->GetSplit(1, 2, region); - TEST_EXPECT_EQUAL(region.GetSize(0), 10); - TEST_EXPECT_EQUAL(region.GetSize(1), 5); + ITK_TEST_EXPECT_EQUAL(region.GetSize(0), 10); + ITK_TEST_EXPECT_EQUAL(region.GetSize(1), 5); return EXIT_SUCCESS; diff --git a/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx b/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx index 67314b7e174..7e9c8145899 100644 --- a/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx +++ b/Modules/Core/Common/test/itkImageToImageToleranceTest.cxx @@ -134,24 +134,24 @@ int itkImageToImageToleranceTest( int, char * [] ) } // test global defaults - TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultCoordinateTolerance(), 1.0e-6); - TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultDirectionTolerance(), 1.0e-6); + ITK_TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultCoordinateTolerance(), 1.0e-6); + ITK_TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultDirectionTolerance(), 1.0e-6); addImageFilter = AddImageFilterType::New(); - TEST_EXPECT_EQUAL( addImageFilter->GetCoordinateTolerance(), 1.0e-6); - TEST_EXPECT_EQUAL( addImageFilter->GetDirectionTolerance(), 1.0e-6); + ITK_TEST_EXPECT_EQUAL( addImageFilter->GetCoordinateTolerance(), 1.0e-6); + ITK_TEST_EXPECT_EQUAL( addImageFilter->GetDirectionTolerance(), 1.0e-6); AddImageFilterType::SetGlobalDefaultCoordinateTolerance( 1.0e-4 ); - TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultCoordinateTolerance(), 1.0e-4); - TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultDirectionTolerance(), 1.0e-6); + ITK_TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultCoordinateTolerance(), 1.0e-4); + ITK_TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultDirectionTolerance(), 1.0e-6); itk::ImageToImageFilterCommon::SetGlobalDefaultDirectionTolerance( 1.0e-5 ); - TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultCoordinateTolerance(), 1.0e-4); - TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultDirectionTolerance(), 1.0e-5); + ITK_TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultCoordinateTolerance(), 1.0e-4); + ITK_TEST_EXPECT_EQUAL( AddImageFilterType::GetGlobalDefaultDirectionTolerance(), 1.0e-5); addImageFilter = AddImageFilterType::New(); - TEST_EXPECT_EQUAL( addImageFilter->GetCoordinateTolerance(), 1.0e-4); - TEST_EXPECT_EQUAL( addImageFilter->GetDirectionTolerance(), 1.0e-5); + ITK_TEST_EXPECT_EQUAL( addImageFilter->GetCoordinateTolerance(), 1.0e-4); + ITK_TEST_EXPECT_EQUAL( addImageFilter->GetDirectionTolerance(), 1.0e-5); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx b/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx index 914002fc4dc..01df8a09b9c 100644 --- a/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx +++ b/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx @@ -153,12 +153,12 @@ int itkImageVectorOptimizerParametersHelperTest(int, char *[]) //Test null image pointer params.SetParametersObject( nullptr ); - TRY_EXPECT_EXCEPTION( params.MoveDataPointer( array.data_block() ) ); + ITK_TRY_EXPECT_EXCEPTION( params.MoveDataPointer( array.data_block() ) ); //Test setting an image of wrong type using BadImageType = itk::Image; BadImageType::Pointer badImage = BadImageType::New(); - TRY_EXPECT_EXCEPTION( params.SetParametersObject( badImage ) ); + ITK_TRY_EXPECT_EXCEPTION( params.SetParametersObject( badImage ) ); return result; } diff --git a/Modules/Core/Common/test/itkImportImageTest.cxx b/Modules/Core/Common/test/itkImportImageTest.cxx index bcf5022924f..d90e7b307f9 100644 --- a/Modules/Core/Common/test/itkImportImageTest.cxx +++ b/Modules/Core/Common/test/itkImportImageTest.cxx @@ -40,7 +40,7 @@ int itkImportImageTest( int, char* [] ) // Create an ImportImageFilter filter ImportImageFilter::Pointer basicImport = ImportImageFilter::New(); - EXERCISE_BASIC_OBJECT_METHODS( basicImport, ImportImageFilter, ImageSource ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( basicImport, ImportImageFilter, ImageSource ); ShortImage::Pointer image; itk::ImageRegion< Dimension > region; diff --git a/Modules/Core/Common/test/itkMathTest.cxx b/Modules/Core/Common/test/itkMathTest.cxx index 17d98489d25..b4225f5a602 100644 --- a/Modules/Core/Common/test/itkMathTest.cxx +++ b/Modules/Core/Common/test/itkMathTest.cxx @@ -55,33 +55,33 @@ int ExerciseIsPrime() { int testPassStatus = EXIT_SUCCESS; - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(0)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(1)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(2))), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(3))), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(4)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(5))), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(6)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(7))), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(8)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(9)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(10)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(11))), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(12)) == false), testPassStatus ); - TEST_EXPECT_TRUE_STATUS_VALUE( + ITK_TEST_EXPECT_TRUE_STATUS_VALUE( (itk::Math::IsPrime(static_cast< T >(13))), testPassStatus ); return testPassStatus; @@ -93,11 +93,11 @@ int ExerciseGreatestPrimeFactor() { int testPassStatus = EXIT_SUCCESS; - TEST_EXPECT_EQUAL_STATUS_VALUE( + ITK_TEST_EXPECT_EQUAL_STATUS_VALUE( itk::Math::GreatestPrimeFactor(static_cast< T >(12)), 3, testPassStatus ); - TEST_EXPECT_EQUAL_STATUS_VALUE( + ITK_TEST_EXPECT_EQUAL_STATUS_VALUE( itk::Math::GreatestPrimeFactor(static_cast< T >(75)), 5, testPassStatus ); - TEST_EXPECT_EQUAL_STATUS_VALUE( + ITK_TEST_EXPECT_EQUAL_STATUS_VALUE( itk::Math::GreatestPrimeFactor(static_cast< T >(1024)), 2, testPassStatus ); return testPassStatus; diff --git a/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx b/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx index 81524122b33..a5bf8b486c1 100644 --- a/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx +++ b/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx @@ -68,8 +68,8 @@ int itkMemoryProbesCollecterBaseTest(int, char *[]) delete[] buf; - TRY_EXPECT_EXCEPTION(mcollecter.GetProbe("IDoNotExist")); - TRY_EXPECT_NO_EXCEPTION(mcollecter.GetProbe("Update")); + ITK_TRY_EXPECT_EXCEPTION(mcollecter.GetProbe("IDoNotExist")); + ITK_TRY_EXPECT_NO_EXCEPTION(mcollecter.GetProbe("Update")); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx index 12658d59571..a0b266410d3 100644 --- a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx +++ b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx @@ -32,11 +32,11 @@ int itkMersenneTwisterRandomVariateGeneratorTest( int, char* [] ) // Test Get/SetSeed Twister::GetInstance()->SetSeed( seed ); - TEST_SET_GET_VALUE( seed, Twister::GetInstance()->GetSeed() ); + ITK_TEST_SET_GET_VALUE( seed, Twister::GetInstance()->GetSeed() ); Twister::Pointer twister = Twister::New(); - EXERCISE_BASIC_OBJECT_METHODS( twister, MersenneTwisterRandomVariateGenerator, + ITK_EXERCISE_BASIC_OBJECT_METHODS( twister, MersenneTwisterRandomVariateGenerator, RandomVariateGeneratorBase ); // Does the new instance have the same seed? diff --git a/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx b/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx index f72022ebfc7..09328b48c0a 100644 --- a/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx +++ b/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx @@ -81,18 +81,18 @@ int itkMinimumMaximumImageCalculatorTest( int, char *[] ) // Create and initialize the calculator MinMaxCalculatorType::Pointer calculator = MinMaxCalculatorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( calculator, MinimumMaximumImageCalculator, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( calculator, MinimumMaximumImageCalculator, Object ); calculator->SetImage( image ); calculator->Compute(); // Test minimum of intensity - TEST_SET_GET_VALUE( minimum, calculator->GetMinimum() ); - TEST_SET_GET_VALUE( minIntensityValueIndex, calculator->GetIndexOfMinimum() ); + ITK_TEST_SET_GET_VALUE( minimum, calculator->GetMinimum() ); + ITK_TEST_SET_GET_VALUE( minIntensityValueIndex, calculator->GetIndexOfMinimum() ); // Test maximum of intensity - TEST_SET_GET_VALUE( maximum, calculator->GetMaximum() ); - TEST_SET_GET_VALUE( maxIntensityValueIndex, calculator->GetIndexOfMaximum() ); + ITK_TEST_SET_GET_VALUE( maximum, calculator->GetMaximum() ); + ITK_TEST_SET_GET_VALUE( maxIntensityValueIndex, calculator->GetIndexOfMaximum() ); // Set the region over which perform the computations itk::Size<3> regionSize = {{4, 4, 4}}; @@ -119,14 +119,14 @@ int itkMinimumMaximumImageCalculatorTest( int, char *[] ) calculator->ComputeMinimum(); // Test minimum of intensity - TEST_SET_GET_VALUE( minimum, calculator->GetMinimum() ); - TEST_SET_GET_VALUE( minIntensityValueIndex, calculator->GetIndexOfMinimum() ); + ITK_TEST_SET_GET_VALUE( minimum, calculator->GetMinimum() ); + ITK_TEST_SET_GET_VALUE( minIntensityValueIndex, calculator->GetIndexOfMinimum() ); calculator->ComputeMaximum(); // Test maximum of intensity - TEST_SET_GET_VALUE( maximum, calculator->GetMaximum() ); - TEST_SET_GET_VALUE( maxIntensityValueIndex, calculator->GetIndexOfMaximum() ); + ITK_TEST_SET_GET_VALUE( maximum, calculator->GetMaximum() ); + ITK_TEST_SET_GET_VALUE( maxIntensityValueIndex, calculator->GetIndexOfMaximum() ); return EXIT_SUCCESS; diff --git a/Modules/Core/Common/test/itkMultiThreaderBaseTest.cxx b/Modules/Core/Common/test/itkMultiThreaderBaseTest.cxx index 85194388c6b..675c5a93add 100644 --- a/Modules/Core/Common/test/itkMultiThreaderBaseTest.cxx +++ b/Modules/Core/Common/test/itkMultiThreaderBaseTest.cxx @@ -86,7 +86,7 @@ bool SetAndVerify( int number ) result = false; \ } \ \ - EXERCISE_BASIC_OBJECT_METHODS( threader, ClassName, MultiThreaderBase ); \ + ITK_EXERCISE_BASIC_OBJECT_METHODS( threader, ClassName, MultiThreaderBase ); \ } int itkMultiThreaderBaseTest(int argc, char* argv[]) diff --git a/Modules/Core/Common/test/itkOptimizerParametersTest.cxx b/Modules/Core/Common/test/itkOptimizerParametersTest.cxx index 81ceba3c147..57d63a1c257 100644 --- a/Modules/Core/Common/test/itkOptimizerParametersTest.cxx +++ b/Modules/Core/Common/test/itkOptimizerParametersTest.cxx @@ -118,12 +118,12 @@ bool runTestByType() /* Test SetParametersObject. Should throw exception with default helper. */ typename itk::LightObject::Pointer dummyObj = itk::LightObject::New(); - TRY_EXPECT_EXCEPTION( params.SetParametersObject( dummyObj ) ); + ITK_TRY_EXPECT_EXCEPTION( params.SetParametersObject( dummyObj ) ); /* Test with null helper and expect exception */ params.SetHelper( nullptr ); - TRY_EXPECT_EXCEPTION( params.MoveDataPointer( block ) ); - TRY_EXPECT_EXCEPTION( params.SetParametersObject( dummyObj ) ); + ITK_TRY_EXPECT_EXCEPTION( params.MoveDataPointer( block ) ); + ITK_TRY_EXPECT_EXCEPTION( params.SetParametersObject( dummyObj ) ); /* Test copy operator */ itk::OptimizerParameters params1(4); diff --git a/Modules/Core/Common/test/itkRealTimeClockTest.cxx b/Modules/Core/Common/test/itkRealTimeClockTest.cxx index aa0f33d1aec..5b4147e4af6 100644 --- a/Modules/Core/Common/test/itkRealTimeClockTest.cxx +++ b/Modules/Core/Common/test/itkRealTimeClockTest.cxx @@ -35,7 +35,7 @@ int itkRealTimeClockTest( int, char * [] ) // Create an ITK RealTimeClock itk::RealTimeClock::Pointer clock = itk::RealTimeClock::New(); - EXERCISE_BASIC_OBJECT_METHODS( clock, RealTimeClock, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( clock, RealTimeClock, Object ); std::cout << "Testing itk::RealTimeClock" << std::endl; std::cout << "Frequency: " << clock->GetFrequency() << std::endl; diff --git a/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx b/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx index c1db6b73efb..dcd9ec4b168 100644 --- a/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx +++ b/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx @@ -34,10 +34,10 @@ int itkSinRegularizedHeavisideStepFunctionTest1( int, char* [] ) constexpr double epsilon0 = 1.0; const double epsilon1 = 1e-4; - TEST_SET_GET_VALUE( epsilon0, functionBase0->GetEpsilon() ); + ITK_TEST_SET_GET_VALUE( epsilon0, functionBase0->GetEpsilon() ); functionBase0->SetEpsilon( epsilon1 ); - TEST_SET_GET_VALUE( epsilon1, functionBase0->GetEpsilon() ); + ITK_TEST_SET_GET_VALUE( epsilon1, functionBase0->GetEpsilon() ); constexpr double epsilon2 = 0.5; functionBase0->SetEpsilon( epsilon2 ); diff --git a/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx b/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx index f4c910e57a7..9ec2f6b01b2 100644 --- a/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx +++ b/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx @@ -85,18 +85,18 @@ int itkStdStreamStateSaveTest(int, char* [] ) // is still in effect. int inputInt; stream >> inputInt; - TEST_EXPECT_EQUAL(originalInt, inputInt); + ITK_TEST_EXPECT_EQUAL(originalInt, inputInt); // Verify that the default is reset for std::cout - TEST_EXPECT_EQUAL(std::cout.precision(), defaultPrecision); - TEST_EXPECT_EQUAL(std::cout.width(), defaultWidth); - TEST_EXPECT_EQUAL(std::cout.fill(), defaultFill); - TEST_EXPECT_EQUAL(std::cout.flags(), defaultFlags); + ITK_TEST_EXPECT_EQUAL(std::cout.precision(), defaultPrecision); + ITK_TEST_EXPECT_EQUAL(std::cout.width(), defaultWidth); + ITK_TEST_EXPECT_EQUAL(std::cout.fill(), defaultFill); + ITK_TEST_EXPECT_EQUAL(std::cout.flags(), defaultFlags); - TEST_EXPECT_EQUAL(stream.precision(), defaultPrecision); - TEST_EXPECT_EQUAL(stream.width(), defaultWidth); - TEST_EXPECT_EQUAL(stream.fill(), defaultFill); - TEST_EXPECT_EQUAL(stream.flags(), defaultFlags); + ITK_TEST_EXPECT_EQUAL(stream.precision(), defaultPrecision); + ITK_TEST_EXPECT_EQUAL(stream.width(), defaultWidth); + ITK_TEST_EXPECT_EQUAL(stream.fill(), defaultFill); + ITK_TEST_EXPECT_EQUAL(stream.flags(), defaultFlags); return EXIT_SUCCESS; } diff --git a/Modules/Core/Common/test/itkTorusInteriorExteriorSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkTorusInteriorExteriorSpatialFunctionTest.cxx index 6b4c1b9fff5..e8f131d927c 100644 --- a/Modules/Core/Common/test/itkTorusInteriorExteriorSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkTorusInteriorExteriorSpatialFunctionTest.cxx @@ -40,7 +40,7 @@ int itkTorusInteriorExteriorSpatialFunctionTest( int, char *[] ) TorusInteriorExteriorSpatialFunctionType::Pointer torusInteriorExteriorSpatialFunction = TorusInteriorExteriorSpatialFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( torusInteriorExteriorSpatialFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( torusInteriorExteriorSpatialFunction, TorusInteriorExteriorSpatialFunction, InteriorExteriorSpatialFunction ); @@ -49,15 +49,15 @@ int itkTorusInteriorExteriorSpatialFunctionTest( int, char *[] ) origin.Fill( 1.0 ); torusInteriorExteriorSpatialFunction->SetOrigin( origin ); - TEST_SET_GET_VALUE( origin, torusInteriorExteriorSpatialFunction->GetOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, torusInteriorExteriorSpatialFunction->GetOrigin() ); double majorRadius = 10.0; torusInteriorExteriorSpatialFunction->SetMajorRadius( majorRadius ); - TEST_SET_GET_VALUE( majorRadius, torusInteriorExteriorSpatialFunction->GetMajorRadius() ); + ITK_TEST_SET_GET_VALUE( majorRadius, torusInteriorExteriorSpatialFunction->GetMajorRadius() ); double minorRadius = 4.0; torusInteriorExteriorSpatialFunction->SetMinorRadius( minorRadius ); - TEST_SET_GET_VALUE( minorRadius, torusInteriorExteriorSpatialFunction->GetMinorRadius() ); + ITK_TEST_SET_GET_VALUE( minorRadius, torusInteriorExteriorSpatialFunction->GetMinorRadius() ); // Define a to test the function TorusInteriorExteriorSpatialFunctionType::InputType insidePoint; diff --git a/Modules/Core/Common/test/itkTreeContainerTest.cxx b/Modules/Core/Common/test/itkTreeContainerTest.cxx index 8a9c23fd760..c77daf5620b 100644 --- a/Modules/Core/Common/test/itkTreeContainerTest.cxx +++ b/Modules/Core/Common/test/itkTreeContainerTest.cxx @@ -107,7 +107,7 @@ int itkTreeContainerTest(int, char* []) while(!childIt.IsAtEnd()) { std::cout << childIt.Get() << std::endl; - TEST_EXPECT_EQUAL( childIt.Get(), expectedChild[expectedIndex] ); + ITK_TEST_EXPECT_EQUAL( childIt.Get(), expectedChild[expectedIndex] ); ++expectedIndex; ++childIt; } @@ -160,7 +160,7 @@ int itkTreeContainerTest(int, char* []) while(!leafIt.IsAtEnd()) { std::cout << leafIt.Get() << std::endl; - TEST_EXPECT_EQUAL( leafIt.Get(), expectedLeaf[expectedIndex] ); + ITK_TEST_EXPECT_EQUAL( leafIt.Get(), expectedLeaf[expectedIndex] ); ++expectedIndex; ++leafIt; } @@ -178,7 +178,7 @@ int itkTreeContainerTest(int, char* []) while(!InOrderIt.IsAtEnd()) { std::cout << InOrderIt.Get() << std::endl; - TEST_EXPECT_EQUAL( InOrderIt.Get(), expectedInOrder[expectedIndex] ); + ITK_TEST_EXPECT_EQUAL( InOrderIt.Get(), expectedInOrder[expectedIndex] ); ++expectedIndex; ++InOrderIt; } @@ -195,7 +195,7 @@ int itkTreeContainerTest(int, char* []) while(!PostOrderIt.IsAtEnd()) { std::cout << PostOrderIt.Get() << std::endl; - TEST_EXPECT_EQUAL( PostOrderIt.Get(), expectedPostOrder[expectedIndex] ); + ITK_TEST_EXPECT_EQUAL( PostOrderIt.Get(), expectedPostOrder[expectedIndex] ); ++expectedIndex; ++PostOrderIt; } @@ -211,7 +211,7 @@ int itkTreeContainerTest(int, char* []) while(!RootIt.IsAtEnd()) { std::cout << RootIt.Get() << std::endl; - TEST_EXPECT_EQUAL( RootIt.Get(), expectedRootTree[expectedIndex] ); + ITK_TEST_EXPECT_EQUAL( RootIt.Get(), expectedRootTree[expectedIndex] ); ++expectedIndex; ++RootIt; } @@ -228,7 +228,7 @@ int itkTreeContainerTest(int, char* []) while(!PreOrderIt.IsAtEnd()) { std::cout << PreOrderIt.Get() << std::endl; - TEST_EXPECT_EQUAL( PreOrderIt.Get(), expectedPreOrder[expectedIndex] ); + ITK_TEST_EXPECT_EQUAL( PreOrderIt.Get(), expectedPreOrder[expectedIndex] ); ++expectedIndex; ++PreOrderIt; } diff --git a/Modules/Core/Common/test/itkVersionTest.cxx b/Modules/Core/Common/test/itkVersionTest.cxx index 7dadd6d67d0..bfd1b0b2776 100644 --- a/Modules/Core/Common/test/itkVersionTest.cxx +++ b/Modules/Core/Common/test/itkVersionTest.cxx @@ -28,7 +28,7 @@ int itkVersionTest( int, char* [] ) itk::Version::Pointer version = itk::Version::New(); - EXERCISE_BASIC_OBJECT_METHODS( version, Version, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( version, Version, Object ); const char * itkVersion = itk::Version::GetITKVersion(); std::cout << "itk version: " << itkVersion << std::endl; diff --git a/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx b/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx index 726ae4e888c..3a7a1d5c8c5 100644 --- a/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx @@ -127,7 +127,7 @@ int itkNthElementPixelAccessorTest(int, char* []) { std::cout << it1.Get()[1] << " "; std::cout << it1.Get()[2] << std::endl; - TEST_EXPECT_EQUAL( it1.Get()[0], MY_VALUE); + ITK_TEST_EXPECT_EQUAL( it1.Get()[0], MY_VALUE); ++it1; } diff --git a/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx b/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx index b519ec94ca2..5ee06558ef9 100644 --- a/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx @@ -146,10 +146,10 @@ bool testVectorImageBasicMethods() // test get methods - TEST_EXPECT_EQUAL(f, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(f, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(f, (*image)[idx]); - TEST_EXPECT_EQUAL(f, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(f, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(f, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(f, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(f, (*cimage)[idx]); // test get by reference methods @@ -160,37 +160,37 @@ bool testVectorImageBasicMethods() // note: this VectorImage method requires the compiler to perform return value // optimization to work as expected image->GetPixel(idx).Fill( 2.22f ); - TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, (*image)[idx]); - TEST_EXPECT_EQUAL(v, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(v, (*cimage)[idx]); v.Fill(2.23f); /* // Cannot be used as an l-value image->GetPixel(idx) = v; - TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, (*image)[idx]); - TEST_EXPECT_EQUAL(v, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(v, (*cimage)[idx]); */ typename VectorImageType::PixelType temp = image->GetPixel(idx); temp.Fill(2.24f); v.Fill(2.24f); - TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, (*image)[idx]); - TEST_EXPECT_EQUAL(v, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(v, (*cimage)[idx]); v.Fill(3.33f); (*image)[idx].Fill( 3.33f ); - TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, (*image)[idx]); - TEST_EXPECT_EQUAL(v, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(v, (*cimage)[idx]); // test immutable access methods @@ -204,27 +204,27 @@ bool testVectorImageBasicMethods() // The following line modifies the image and is considered a bug in // the interface design that it works. //temp2.Fill(3.44f); - TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, (*image)[idx]); - TEST_EXPECT_EQUAL(v, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(v, (*cimage)[idx]); // test set method v.Fill(4.44f); image->SetPixel(idx, v); - TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); - TEST_EXPECT_EQUAL(v, (*image)[idx]); - TEST_EXPECT_EQUAL(v, (*cimage)[idx]); + ITK_TEST_EXPECT_EQUAL(v, image->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, cimage->GetPixel(idx)); + ITK_TEST_EXPECT_EQUAL(v, (*image)[idx]); + ITK_TEST_EXPECT_EQUAL(v, (*cimage)[idx]); std::cout << "Testing Get/SetPixel methods [PASSED]" << std::endl; // test Graft method typename VectorImageType::Pointer imageGraft = VectorImageType::New(); imageGraft->Graft(image); - TEST_EXPECT_EQUAL(image->GetPixelContainer(), imageGraft->GetPixelContainer()); + ITK_TEST_EXPECT_EQUAL(image->GetPixelContainer(), imageGraft->GetPixelContainer()); std::cout << "Testing Graft method [PASSED]" << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx b/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx index f0e9782100f..3edb0a12c26 100644 --- a/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx @@ -85,11 +85,11 @@ int itkVectorImageToImageAdaptorTest( int, char* [] ) //test Get/SetPixel() methods VectorImageToImageAdaptorType::IndexType index; index.Fill(10); - TEST_EXPECT_EQUAL(PixelType(componentToExtract), vectorImageToImageAdaptor->GetPixel(index)); + ITK_TEST_EXPECT_EQUAL(PixelType(componentToExtract), vectorImageToImageAdaptor->GetPixel(index)); PixelType v = 4.4f; vectorImageToImageAdaptor->SetPixel(index, v); - TEST_EXPECT_EQUAL(v, vectorImageToImageAdaptor->GetPixel(index)); + ITK_TEST_EXPECT_EQUAL(v, vectorImageToImageAdaptor->GetPixel(index)); return EXIT_SUCCESS; } diff --git a/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx b/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx index 959fd87962d..79f854257c5 100644 --- a/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx +++ b/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx @@ -97,7 +97,7 @@ int itkBSplineDecompositionImageFilterTest( int argc, char* argv[] ) using FilterType = itk::BSplineDecompositionImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineDecompositionImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineDecompositionImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watcher( filter, "BSplineDecompositionImageFilter" ); @@ -106,7 +106,7 @@ int itkBSplineDecompositionImageFilterTest( int argc, char* argv[] ) int unsupportedSplineOrder = 6; - TRY_EXPECT_EXCEPTION( filter->SetSplineOrder( unsupportedSplineOrder ) ); + ITK_TRY_EXPECT_EXCEPTION( filter->SetSplineOrder( unsupportedSplineOrder ) ); filter->SetSplineOrder( interpolator->GetSplineOrder() ); @@ -143,7 +143,7 @@ int itkBSplineDecompositionImageFilterTest( int argc, char* argv[] ) } } - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Set up a BSplineResampleImageFunction. @@ -196,7 +196,7 @@ int itkBSplineDecompositionImageFilterTest( int argc, char* argv[] ) itk::BSplineDecompositionImageFilter< ComplexImageType, ComplexImageType >; ComplexFilterType::Pointer complexFilter = ComplexFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineDecompositionImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineDecompositionImageFilter, ImageToImageFilter ); return EXIT_SUCCESS; diff --git a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx index 0fed17dc7b3..0ae12b254de 100644 --- a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx @@ -351,7 +351,7 @@ int itkCentralDifferenceImageFunctionOnVectorTestRun( ) using BadFunctionType = itk::CentralDifferenceImageFunction; typename BadFunctionType::Pointer badFunction = BadFunctionType::New(); - TRY_EXPECT_EXCEPTION( badFunction->SetInputImage( image ) ); + ITK_TRY_EXPECT_EXCEPTION( badFunction->SetInputImage( image ) ); return result; } diff --git a/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx index 666d41c200a..bd8e1b9726e 100644 --- a/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx @@ -61,14 +61,14 @@ int itkCovarianceImageFunctionTest( int, char* [] ) image->FillBuffer( initialValue ); FunctionType::Pointer function = FunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( function, CovarianceImageFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( function, CovarianceImageFunction, ImageFunction ); function->SetInputImage( image ); unsigned int neighborhoodRadius = 5; function->SetNeighborhoodRadius( neighborhoodRadius ); - TEST_SET_GET_VALUE( neighborhoodRadius, function->GetNeighborhoodRadius() ); + ITK_TEST_SET_GET_VALUE( neighborhoodRadius, function->GetNeighborhoodRadius() ); ImageType::IndexType index; diff --git a/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx index ab573465e30..28a056578a4 100644 --- a/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx @@ -170,7 +170,7 @@ int itkGaussianDerivativeImageFunctionTest( int, char* [] ) DoGFunctionType::Pointer DoG = DoGFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( DoG, GaussianDerivativeImageFunction, ImageFunction ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( DoG, GaussianDerivativeImageFunction, ImageFunction ); std::cout << "\nTesting derivative of Gaussian image function for float" << std::endl; diff --git a/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx index 5039a52c821..18a5c7fece4 100644 --- a/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx @@ -29,16 +29,16 @@ int itkGaussianInterpolateImageFunctionTest( int, char*[] ) InterpolatorType::Pointer interpolator = InterpolatorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( interpolator, GaussianInterpolateImageFunction, InterpolateImageFunction ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( interpolator, GaussianInterpolateImageFunction, InterpolateImageFunction ); InterpolatorType::ArrayType sigma; sigma.Fill(1.0); interpolator->SetSigma(sigma); - TEST_SET_GET_VALUE( sigma, interpolator->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigma, interpolator->GetSigma() ); InterpolatorType::RealType alpha = 1.0; interpolator->SetAlpha(alpha); - TEST_SET_GET_VALUE( alpha, interpolator->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alpha, interpolator->GetAlpha() ); ImageType::Pointer image = ImageType::New(); @@ -76,7 +76,7 @@ int itkGaussianInterpolateImageFunctionTest( int, char*[] ) radius.Fill( 1 ); for ( unsigned int d = 0; d < ImageType::ImageDimension; d++ ) { - TEST_SET_GET_VALUE( radius[d], interpolator->GetRadius()[d] ); + ITK_TEST_SET_GET_VALUE( radius[d], interpolator->GetRadius()[d] ); } InterpolatorType::OutputType expectedValues[5][5] = diff --git a/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx index ad6e3713407..43297499f53 100644 --- a/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx @@ -175,7 +175,7 @@ int RunLinearInterpolateTest() radius.Fill( 1 ); for( unsigned int d = 0; d < Dimensions; ++d ) { - TEST_SET_GET_VALUE( radius[d], interpolator->GetRadius()[d] ); + ITK_TEST_SET_GET_VALUE( radius[d], interpolator->GetRadius()[d] ); } constexpr AccumulatorType incr = 0.2; diff --git a/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx index 063d0b20142..0a13edeb289 100644 --- a/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx @@ -61,7 +61,7 @@ int itkMahalanobisDistanceThresholdImageFunctionTest( int, char* [] ) FunctionType::Pointer function = FunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( function, MahalanobisDistanceThresholdImageFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( function, MahalanobisDistanceThresholdImageFunction, ImageFunction ); function->SetInputImage( image ); @@ -84,8 +84,8 @@ int itkMahalanobisDistanceThresholdImageFunctionTest( int, char* [] ) function->SetCovariance( covariance ); function->SetMean( mean ); - TEST_SET_GET_VALUE( covariance, function->GetCovariance() ); - TEST_SET_GET_VALUE( mean, function->GetMean() ); + ITK_TEST_SET_GET_VALUE( covariance, function->GetCovariance() ); + ITK_TEST_SET_GET_VALUE( mean, function->GetMean() ); ImageType::IndexType index; @@ -93,7 +93,7 @@ int itkMahalanobisDistanceThresholdImageFunctionTest( int, char* [] ) index[1] = 25; index[2] = 25; - TEST_EXPECT_TRUE( function->EvaluateAtIndex( index ) ); + ITK_TEST_EXPECT_TRUE( function->EvaluateAtIndex( index ) ); const double distance = function->EvaluateDistanceAtIndex( index ); std::cout << "function->EvaluateDistanceAtIndex( index ): " << distance << std::endl; @@ -113,7 +113,7 @@ int itkMahalanobisDistanceThresholdImageFunctionTest( int, char* [] ) point[1] = 25; point[2] = 25; - TEST_EXPECT_TRUE( function->Evaluate( point ) ); + ITK_TEST_EXPECT_TRUE( function->Evaluate( point ) ); const double distance2 = function->EvaluateDistance(point); std::cout << "function->EvaluateDistance(point): " << distance2 << std::endl; @@ -132,7 +132,7 @@ int itkMahalanobisDistanceThresholdImageFunctionTest( int, char* [] ) cindex[1] = 25; cindex[2] = 25; - TEST_EXPECT_TRUE( function->EvaluateAtContinuousIndex( cindex ) ); + ITK_TEST_EXPECT_TRUE( function->EvaluateAtContinuousIndex( cindex ) ); // Test GetConstReferenceMacro const double & getThreshold = function->GetThreshold(); diff --git a/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx index c57d15a0bfd..f95caf296ed 100644 --- a/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx @@ -56,13 +56,13 @@ int itkMeanImageFunctionTest( int, char* [] ) FunctionType::Pointer function = FunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( function, MeanImageFunction, ImageFunction ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( function, MeanImageFunction, ImageFunction ); function->SetInputImage( image ); unsigned int neighborhoodRadius = 5; function->SetNeighborhoodRadius( neighborhoodRadius ); - TEST_SET_GET_VALUE( neighborhoodRadius, function->GetNeighborhoodRadius() ); + ITK_TEST_SET_GET_VALUE( neighborhoodRadius, function->GetNeighborhoodRadius() ); ImageType::IndexType index; diff --git a/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx index c05c18df056..2363225a848 100644 --- a/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx @@ -137,7 +137,7 @@ int itkNearestNeighborInterpolateImageFunctionTest( int , char*[] ) radius.Fill( 0 ); for( unsigned int d = 0; d < Dimension; ++d ) { - TEST_SET_GET_VALUE( radius[d], interpolator->GetRadius()[d] ); + ITK_TEST_SET_GET_VALUE( radius[d], interpolator->GetRadius()[d] ); } VectorInterpolatorType::Pointer diff --git a/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx index ca858ddb38e..1fa268aa003 100644 --- a/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx @@ -132,10 +132,10 @@ itkRayCastInterpolateImageFunctionTest( for( unsigned int d = 0; d < ImageDimension; ++d ) { - TEST_SET_GET_VALUE( size[d], interp->GetRadius()[d] ); + ITK_TEST_SET_GET_VALUE( size[d], interp->GetRadius()[d] ); } - TEST_EXPECT_TRUE( itk::Math::FloatAlmostEqual( integral, 1247. ) ); + ITK_TEST_EXPECT_TRUE( itk::Math::FloatAlmostEqual( integral, 1247. ) ); return EXIT_SUCCESS; } diff --git a/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx index a3ef79e678b..809d625c863 100644 --- a/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx @@ -188,7 +188,7 @@ int itkWindowedSincInterpolateImageFunctionTest(int, char* [] ) for( unsigned int d = 0; d < ImageDimension; ++d ) { - TEST_SET_GET_VALUE( 2, interp->GetRadius()[d] ); + ITK_TEST_SET_GET_VALUE( 2, interp->GetRadius()[d] ); } /* Test evaluation at continuous indices and corresponding diff --git a/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap index 5a337f28c80..45bdf8f5a18 100644 --- a/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap @@ -8,4 +8,4 @@ if(has_d_3) itk_wrap_template("${ITKM_I${t}3}${ITKM_F}" "${ITKT_I${t}3},${ITKT_F}") endforeach() itk_end_wrap_class() -endif() \ No newline at end of file +endif() diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx index f4c2f20077d..9284ee60f24 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx @@ -55,11 +55,11 @@ int itkTriangleMeshToBinaryImageFilterTest1(int argc, char * argv[]) using TriangleMeshToBinaryImageFilterType = itk::TriangleMeshToBinaryImageFilter; TriangleMeshToBinaryImageFilterType::Pointer imageFilter = TriangleMeshToBinaryImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS(imageFilter, TriangleMeshToBinaryImageFilter, ImageSource); + ITK_EXERCISE_BASIC_OBJECT_METHODS(imageFilter, TriangleMeshToBinaryImageFilter, ImageSource); imageFilter->SetInput(mySphereMeshSource->GetOutput()); imageFilter->SetInfoImage(im); - TRY_EXPECT_NO_EXCEPTION(imageFilter->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(imageFilter->Update()); using ROIImageFilter = itk::RegionOfInterestImageFilter< ImageType, ImageType >; ROIImageFilter::Pointer roifilter = ROIImageFilter::New(); @@ -68,10 +68,10 @@ int itkTriangleMeshToBinaryImageFilterTest1(int argc, char * argv[]) region.GetModifiableSize().Fill(30); roifilter->SetInput(im); roifilter->SetRegionOfInterest(region); - TRY_EXPECT_NO_EXCEPTION(roifilter->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(roifilter->Update()); ImageType::Pointer roiImage = roifilter->GetOutput(); imageFilter->SetInfoImage(roiImage); - TRY_EXPECT_NO_EXCEPTION(imageFilter->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(imageFilter->Update()); if (argc > 1) { @@ -79,7 +79,7 @@ int itkTriangleMeshToBinaryImageFilterTest1(int argc, char * argv[]) WriterType::Pointer ImageWriter = WriterType::New(); ImageWriter->SetInput(imageFilter->GetOutput()); ImageWriter->SetFileName(argv[1]); - TRY_EXPECT_NO_EXCEPTION(ImageWriter->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(ImageWriter->Update()); } std::cout << "TEST PASSED" << std::endl; diff --git a/Modules/Core/SpatialObjects/test/itkContourSpatialObjectPointTest.cxx b/Modules/Core/SpatialObjects/test/itkContourSpatialObjectPointTest.cxx index 43b9433faa0..6dc1951bbdc 100644 --- a/Modules/Core/SpatialObjects/test/itkContourSpatialObjectPointTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkContourSpatialObjectPointTest.cxx @@ -35,7 +35,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) pickedPoint2D[1] = pickedPointY; contourSpatialObjectPoint2D.SetPickedPointInObjectSpace( pickedPoint2D ); - TEST_SET_GET_VALUE( pickedPoint2D, + ITK_TEST_SET_GET_VALUE( pickedPoint2D, contourSpatialObjectPoint2D.GetPickedPointInObjectSpace() ); constexpr double normalX = 1.0; @@ -45,7 +45,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) normal2D[1] = normalY; contourSpatialObjectPoint2D.SetNormalInObjectSpace( normal2D ); - TEST_SET_GET_VALUE( normal2D, + ITK_TEST_SET_GET_VALUE( normal2D, contourSpatialObjectPoint2D.GetNormalInObjectSpace() ); // Create another ContourSpatialObjectPoint @@ -60,7 +60,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) contourSpatialObjectPoint2DAlt.SetPickedPointInObjectSpace( pickedPoint2DAlt ); - TEST_SET_GET_VALUE( pickedPoint2DAlt, + ITK_TEST_SET_GET_VALUE( pickedPoint2DAlt, contourSpatialObjectPoint2DAlt.GetPickedPointInObjectSpace() ); constexpr double normalXAlt = 7.28; @@ -70,15 +70,15 @@ int itkContourSpatialObjectPointTest( int, char* [] ) normal2DAlt[1] = normalYAlt; contourSpatialObjectPoint2DAlt.SetNormalInObjectSpace( normal2DAlt ); - TEST_SET_GET_VALUE( normal2DAlt, + ITK_TEST_SET_GET_VALUE( normal2DAlt, contourSpatialObjectPoint2DAlt.GetNormalInObjectSpace() ); // Assign the old ContourSpatialObjectPoint object to the alternative one contourSpatialObjectPoint2DAlt = contourSpatialObjectPoint2D; - TEST_SET_GET_VALUE( pickedPoint2D, + ITK_TEST_SET_GET_VALUE( pickedPoint2D, contourSpatialObjectPoint2DAlt.GetPickedPointInObjectSpace() ); - TEST_SET_GET_VALUE( normal2D, + ITK_TEST_SET_GET_VALUE( normal2D, contourSpatialObjectPoint2DAlt.GetNormalInObjectSpace() ); @@ -95,7 +95,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) pickedPoint3D[2] = pickedPointZ; contourSpatialObjectPoint3D.SetPickedPointInObjectSpace( pickedPoint3D ); - TEST_SET_GET_VALUE( pickedPoint3D, + ITK_TEST_SET_GET_VALUE( pickedPoint3D, contourSpatialObjectPoint3D.GetPickedPointInObjectSpace() ); constexpr double normalZ = 1.0; @@ -105,7 +105,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) normal3D[2] = normalZ; contourSpatialObjectPoint3D.SetNormalInObjectSpace( normal3D ); - TEST_SET_GET_VALUE( normal3D, + ITK_TEST_SET_GET_VALUE( normal3D, contourSpatialObjectPoint3D.GetNormalInObjectSpace() ); // Create another ContourSpatialObjectPoint @@ -119,7 +119,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) pickedPoint3DAlt[2] = pickedPointZAlt; contourSpatialObjectPoint3DAlt.SetPickedPointInObjectSpace( pickedPoint3DAlt ); - TEST_SET_GET_VALUE( pickedPoint3DAlt, + ITK_TEST_SET_GET_VALUE( pickedPoint3DAlt, contourSpatialObjectPoint3DAlt.GetPickedPointInObjectSpace() ); constexpr double normalZAlt = 1.4; @@ -129,15 +129,15 @@ int itkContourSpatialObjectPointTest( int, char* [] ) normal3DAlt[2] = normalZAlt; contourSpatialObjectPoint3DAlt.SetNormalInObjectSpace( normal3DAlt ); - TEST_SET_GET_VALUE( normal3DAlt, + ITK_TEST_SET_GET_VALUE( normal3DAlt, contourSpatialObjectPoint3DAlt.GetNormalInObjectSpace() ); // Assign the old ContourSpatialObjectPoint object to the alternative one contourSpatialObjectPoint3DAlt = contourSpatialObjectPoint3D; - TEST_SET_GET_VALUE( pickedPoint3D, + ITK_TEST_SET_GET_VALUE( pickedPoint3D, contourSpatialObjectPoint3DAlt.GetPickedPointInObjectSpace() ); - TEST_SET_GET_VALUE( normal3D, + ITK_TEST_SET_GET_VALUE( normal3D, contourSpatialObjectPoint3DAlt.GetNormalInObjectSpace() ); // Test for 4D @@ -154,7 +154,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) pickedPoint4D[3] = pickedPointW; contourSpatialObjectPoint4D.SetPickedPointInObjectSpace( pickedPoint4D ); - TEST_SET_GET_VALUE( pickedPoint4D, + ITK_TEST_SET_GET_VALUE( pickedPoint4D, contourSpatialObjectPoint4D.GetPickedPointInObjectSpace() ); constexpr double normalW = 3.1; @@ -165,7 +165,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) normal4D[3] = normalW; contourSpatialObjectPoint4D.SetNormalInObjectSpace( normal4D ); - TEST_SET_GET_VALUE( normal4D, + ITK_TEST_SET_GET_VALUE( normal4D, contourSpatialObjectPoint4D.GetNormalInObjectSpace() ); // Create another ContourSpatialObjectPoint @@ -181,7 +181,7 @@ int itkContourSpatialObjectPointTest( int, char* [] ) contourSpatialObjectPoint4DAlt.SetPickedPointInObjectSpace( pickedPoint4DAlt ); - TEST_SET_GET_VALUE( pickedPoint4DAlt, + ITK_TEST_SET_GET_VALUE( pickedPoint4DAlt, contourSpatialObjectPoint4DAlt.GetPickedPointInObjectSpace() ); constexpr double normalWAlt = 4.23; @@ -192,15 +192,15 @@ int itkContourSpatialObjectPointTest( int, char* [] ) normal4DAlt[3] = normalWAlt; contourSpatialObjectPoint4DAlt.SetNormalInObjectSpace( normal4DAlt ); - TEST_SET_GET_VALUE( normal4DAlt, + ITK_TEST_SET_GET_VALUE( normal4DAlt, contourSpatialObjectPoint4DAlt.GetNormalInObjectSpace() ); // Assign the old ContourSpatialObjectPoint object to the alternative one contourSpatialObjectPoint4DAlt = contourSpatialObjectPoint4D; - TEST_SET_GET_VALUE( pickedPoint4D, + ITK_TEST_SET_GET_VALUE( pickedPoint4D, contourSpatialObjectPoint4DAlt.GetPickedPointInObjectSpace() ); - TEST_SET_GET_VALUE( normal4D, + ITK_TEST_SET_GET_VALUE( normal4D, contourSpatialObjectPoint4DAlt.GetNormalInObjectSpace() ); std::cout << "Test finished" << std::endl; diff --git a/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx b/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx index b913307f368..458e044d556 100644 --- a/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx @@ -52,16 +52,16 @@ int itkSpatialObjectToPointSetFilterTest( int, char* [] ) SpatialObjectToPointSetFilterType::Pointer pointSetFilter = SpatialObjectToPointSetFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( pointSetFilter, SpatialObjectToPointSetFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( pointSetFilter, SpatialObjectToPointSetFilter, MeshSource ); unsigned int childrenDepth = 0; pointSetFilter->SetChildrenDepth( childrenDepth ); - TEST_SET_GET_VALUE( childrenDepth, pointSetFilter->GetChildrenDepth() ); + ITK_TEST_SET_GET_VALUE( childrenDepth, pointSetFilter->GetChildrenDepth() ); unsigned int samplingFactor = 1; pointSetFilter->SetSamplingFactor( samplingFactor ); - TEST_SET_GET_VALUE( samplingFactor, pointSetFilter->GetSamplingFactor() ); + ITK_TEST_SET_GET_VALUE( samplingFactor, pointSetFilter->GetSamplingFactor() ); std::cout << " tnop = " << tube1->GetNumberOfPoints() << std::endl; pointSetFilter->SetInput(tube1); @@ -152,12 +152,12 @@ int itkSpatialObjectToPointSetFilterTest( int, char* [] ) SpatialObjectToPointSet3DFilterType::Pointer pointSetFilter3D = SpatialObjectToPointSet3DFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( pointSetFilter3D, + ITK_EXERCISE_BASIC_OBJECT_METHODS( pointSetFilter3D, SpatialObjectToPointSetFilter, MeshSource ); childrenDepth = 999999; pointSetFilter3D->SetChildrenDepth( childrenDepth ); - TEST_SET_GET_VALUE( childrenDepth, pointSetFilter3D->GetChildrenDepth() ); + ITK_TEST_SET_GET_VALUE( childrenDepth, pointSetFilter3D->GetChildrenDepth() ); pointSetFilter3D->SetInput( group3D ); diff --git a/Modules/Core/TestKernel/include/itkTestingMacros.h b/Modules/Core/TestKernel/include/itkTestingMacros.h index 7bdab8e70ae..89aaa9a331f 100644 --- a/Modules/Core/TestKernel/include/itkTestingMacros.h +++ b/Modules/Core/TestKernel/include/itkTestingMacros.h @@ -34,7 +34,7 @@ namespace itk // object's Class must be specified to build on sun studio -#define EXERCISE_BASIC_OBJECT_METHODS( object, Class, SuperClass ) \ +#define ITK_EXERCISE_BASIC_OBJECT_METHODS( object, Class, SuperClass ) \ object->Print( std::cout ); \ std::cout << "Name of Class = " << object->GetNameOfClass() << std::endl; \ std::cout << "Name of Superclass = " << object->Superclass::GetNameOfClass() << std::endl; \ @@ -57,7 +57,7 @@ namespace itk return EXIT_FAILURE; \ } -#define TRY_EXPECT_EXCEPTION( command ) \ +#define ITK_TRY_EXPECT_EXCEPTION( command ) \ try \ { \ std::cout << "Trying " << #command << std::endl; \ @@ -73,7 +73,7 @@ namespace itk } -#define TRY_EXPECT_NO_EXCEPTION( command ) \ +#define ITK_TRY_EXPECT_NO_EXCEPTION( command ) \ try \ { \ std::cout << "Trying " << #command << std::endl; \ @@ -86,46 +86,46 @@ namespace itk return EXIT_FAILURE; \ } -#define TEST_EXPECT_TRUE_STATUS_VALUE( command, statusVal ) \ +#define ITK_TEST_EXPECT_TRUE_STATUS_VALUE( command, statusVal ) \ { \ CLANG_PRAGMA_PUSH \ CLANG_SUPPRESS_Wfloat_equal \ - bool _TEST_EXPECT_TRUE_command(command); \ + bool _ITK_TEST_EXPECT_TRUE_command(command); \ CLANG_PRAGMA_POP \ - if( !(_TEST_EXPECT_TRUE_command) ) \ + if( !(_ITK_TEST_EXPECT_TRUE_command) ) \ { \ std::cerr << "Error in " << #command << std::endl; \ std::cerr << " In " __FILE__ ", line " << __LINE__ << std::endl; \ std::cerr << "Expected true" << std::endl; \ - std::cerr << " but got " << _TEST_EXPECT_TRUE_command << std::endl; \ + std::cerr << " but got " << _ITK_TEST_EXPECT_TRUE_command << std::endl; \ statusVal = EXIT_FAILURE; \ } \ } -#define TEST_EXPECT_TRUE( command ) \ +#define ITK_TEST_EXPECT_TRUE( command ) \ { \ CLANG_PRAGMA_PUSH \ CLANG_SUPPRESS_Wfloat_equal \ - bool _TEST_EXPECT_TRUE_command(command); \ + bool _ITK_TEST_EXPECT_TRUE_command(command); \ CLANG_PRAGMA_POP \ - if( !(_TEST_EXPECT_TRUE_command) ) \ + if( !(_ITK_TEST_EXPECT_TRUE_command) ) \ { \ std::cerr << "Error in " << #command << std::endl; \ std::cerr << " In " __FILE__ ", line " << __LINE__ << std::endl; \ std::cerr << "Expected true" << std::endl; \ - std::cerr << " but got " << _TEST_EXPECT_TRUE_command << std::endl; \ + std::cerr << " but got " << _ITK_TEST_EXPECT_TRUE_command << std::endl; \ return EXIT_FAILURE; \ } \ } -#define TEST_EXPECT_EQUAL_STATUS_VALUE( lh, rh, statusVal ) \ +#define ITK_TEST_EXPECT_EQUAL_STATUS_VALUE( lh, rh, statusVal ) \ { \ CLANG_PRAGMA_PUSH \ CLANG_SUPPRESS_Wfloat_equal \ - bool _TEST_EXPECT_EQUAL_result((lh) == (rh)); \ + bool _ITK_TEST_EXPECT_EQUAL_result((lh) == (rh)); \ CLANG_PRAGMA_POP \ - if( !(_TEST_EXPECT_EQUAL_result) ) \ + if( !(_ITK_TEST_EXPECT_EQUAL_result) ) \ { \ std::cerr << "Error in " << #lh << " == " << #rh << std::endl; \ std::cerr << "\tIn " __FILE__ ", line " << __LINE__ << std::endl; \ @@ -136,13 +136,13 @@ CLANG_PRAGMA_POP \ } \ } -#define TEST_EXPECT_EQUAL( lh, rh ) \ +#define ITK_TEST_EXPECT_EQUAL( lh, rh ) \ { \ CLANG_PRAGMA_PUSH \ CLANG_SUPPRESS_Wfloat_equal \ - bool _TEST_EXPECT_EQUAL_result((lh) == (rh)); \ + bool _ITK_TEST_EXPECT_EQUAL_result((lh) == (rh)); \ CLANG_PRAGMA_POP \ - if( !(_TEST_EXPECT_EQUAL_result) ) \ + if( !(_ITK_TEST_EXPECT_EQUAL_result) ) \ { \ std::cerr << "Error in " << #lh << " == " << #rh << std::endl; \ std::cerr << "\tIn " __FILE__ ", line " << __LINE__ << std::endl; \ @@ -154,7 +154,7 @@ CLANG_PRAGMA_POP \ } -#define TEST_SET_GET( variable, command ) \ +#define ITK_TEST_SET_GET( variable, command ) \ if( variable != command ) \ { \ std::cerr << "Error in " << #command << std::endl; \ @@ -165,7 +165,7 @@ CLANG_PRAGMA_POP \ } -#define TEST_SET_GET_VALUE( variable, command ) \ +#define ITK_TEST_SET_GET_VALUE( variable, command ) \ CLANG_PRAGMA_PUSH \ CLANG_SUPPRESS_Wfloat_equal \ if( variable != command ) \ @@ -178,7 +178,7 @@ CLANG_PRAGMA_POP \ return EXIT_FAILURE; \ } -#define TEST_SET_GET_NULL_VALUE( command ) \ +#define ITK_TEST_SET_GET_NULL_VALUE( command ) \ if( nullptr != command ) \ { \ std::cerr << "Error in " << #command << std::endl; \ @@ -188,7 +188,7 @@ CLANG_PRAGMA_POP \ return EXIT_FAILURE; \ } -#define TEST_SET_GET_BOOLEAN( object, variable, value ) \ +#define ITK_TEST_SET_GET_BOOLEAN( object, variable, value ) \ object->Set##variable( false ); \ object->Set##variable( true ); \ if( object->Get##variable() != 1 ) \ diff --git a/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx b/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx index d2286c5a9ba..efb063fcdb5 100644 --- a/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx +++ b/Modules/Core/TestKernel/test/itkTestingExtractSliceImageFilterTest.cxx @@ -76,52 +76,52 @@ int itkTestingExtractSliceImageFilterTest(int, char* [] ) // expect exception, because for output dimension = 2, one of the size // components must be zero. - TRY_EXPECT_EXCEPTION( filter->SetExtractionRegion( extractRegion ) ); + ITK_TRY_EXPECT_EXCEPTION( filter->SetExtractionRegion( extractRegion ) ); // Set properly, one of the size components to zero. regionSize[2] = 0; extractRegion.SetSize(regionSize); // Now it should be good, with the zero inserted. - TRY_EXPECT_NO_EXCEPTION( filter->SetExtractionRegion( extractRegion ) ); - TEST_SET_GET_VALUE( extractRegion, filter->GetExtractionRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->SetExtractionRegion( extractRegion ) ); + ITK_TEST_SET_GET_VALUE( extractRegion, filter->GetExtractionRegion() ); FilterType::DIRECTIONCOLLAPSESTRATEGY strategy = FilterType::DIRECTIONCOLLAPSETOUNKOWN; - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); - TRY_EXPECT_EXCEPTION( filter->SetDirectionCollapseToStrategy( FilterType::DIRECTIONCOLLAPSETOUNKOWN ) ); + ITK_TRY_EXPECT_EXCEPTION( filter->SetDirectionCollapseToStrategy( FilterType::DIRECTIONCOLLAPSETOUNKOWN ) ); filter->SetDirectionCollapseToIdentity(); strategy = FilterType::DIRECTIONCOLLAPSETOIDENTITY; - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); filter->SetDirectionCollapseToGuess(); strategy = FilterType::DIRECTIONCOLLAPSETOGUESS; - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); filter->SetDirectionCollapseToSubmatrix(); strategy = FilterType::DIRECTIONCOLLAPSETOSUBMATRIX; - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); strategy = FilterType::DIRECTIONCOLLAPSETOIDENTITY; filter->SetDirectionCollapseToStrategy(strategy); - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); strategy = FilterType::DIRECTIONCOLLAPSETOGUESS; filter->SetDirectionCollapseToStrategy(strategy); - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); strategy = FilterType::DIRECTIONCOLLAPSETOSUBMATRIX; filter->SetDirectionCollapseToStrategy(strategy); - TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( strategy, filter->GetDirectionCollapseToStrategy() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); try { diff --git a/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx b/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx index c8ea992d21f..79ca3a86cf1 100644 --- a/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx +++ b/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx @@ -42,7 +42,7 @@ int itkTestingStretchIntensityImageFilterTest( int itkNotUsed( argc ), char* itk StretchFilterType::Pointer stretchFilter = StretchFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( stretchFilter, StretchIntensityImageFilter, ImageSource ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( stretchFilter, StretchIntensityImageFilter, ImageSource ); stretchFilter->SetInput( image ); @@ -53,7 +53,7 @@ int itkTestingStretchIntensityImageFilterTest( int itkNotUsed( argc ), char* itk stretchFilter->SetOutputMinimum( outputMinPix ); stretchFilter->SetOutputMaximum( outputMaxPix ); - TRY_EXPECT_EXCEPTION( stretchFilter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( stretchFilter->Update() ); outputMinimumPixelValue = -5000; outputMaximumPixelValue = 16384; @@ -62,25 +62,25 @@ int itkTestingStretchIntensityImageFilterTest( int itkNotUsed( argc ), char* itk stretchFilter->SetOutputMinimum( outputMinPix ); stretchFilter->SetOutputMaximum( outputMaxPix ); - TEST_SET_GET_VALUE( outputMinimumPixelValue, stretchFilter->GetOutputMinimum() ); - TEST_SET_GET_VALUE( outputMaximumPixelValue, stretchFilter->GetOutputMaximum() ); + ITK_TEST_SET_GET_VALUE( outputMinimumPixelValue, stretchFilter->GetOutputMinimum() ); + ITK_TEST_SET_GET_VALUE( outputMaximumPixelValue, stretchFilter->GetOutputMaximum() ); - TRY_EXPECT_NO_EXCEPTION( stretchFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( stretchFilter->Update() ); std::cout << "Scale: " << stretchFilter->GetScale() << std::endl; std::cout << "Shift: " << stretchFilter->GetShift() << std::endl; - TEST_EXPECT_EQUAL( stretchFilter->GetInputMinimum(), -511 ); - TEST_EXPECT_EQUAL( stretchFilter->GetInputMaximum(), 512 ); + ITK_TEST_EXPECT_EQUAL( stretchFilter->GetInputMinimum(), -511 ); + ITK_TEST_EXPECT_EQUAL( stretchFilter->GetInputMaximum(), 512 ); StatsFilterType::Pointer statsFilter = StatsFilterType::New(); statsFilter->SetInput( stretchFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( statsFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( statsFilter->Update() ); - TEST_EXPECT_EQUAL( outputMinimumPixelValue, statsFilter->GetMinimum() ); - TEST_EXPECT_EQUAL( outputMaximumPixelValue, statsFilter->GetMaximum() ); + ITK_TEST_EXPECT_EQUAL( outputMinimumPixelValue, statsFilter->GetMinimum() ); + ITK_TEST_EXPECT_EQUAL( outputMaximumPixelValue, statsFilter->GetMaximum() ); std::cout << "Output Minimum: " << statsFilter->GetMinimum() << std::endl << "Output Maximum: " << statsFilter->GetMaximum() << std::endl diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx index f94581ae233..39715ee6e58 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx @@ -117,20 +117,20 @@ int itkBSplineTransformInitializerTest1( int argc, char * argv[] ) itk::BSplineTransformInitializer< TransformType, FixedImageType >; InitializerType::Pointer transformInitializer = InitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( transformInitializer, BSplineTransformInitializer, + ITK_EXERCISE_BASIC_OBJECT_METHODS( transformInitializer, BSplineTransformInitializer, Object ); TransformType::MeshSizeType meshSize; meshSize.Fill( 4 ); transformInitializer->SetTransform( bsplineTransform ); - TEST_SET_GET_VALUE( bsplineTransform, transformInitializer->GetTransform() ); + ITK_TEST_SET_GET_VALUE( bsplineTransform, transformInitializer->GetTransform() ); transformInitializer->SetImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, transformInitializer->GetImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, transformInitializer->GetImage() ); transformInitializer->SetTransformDomainMeshSize( meshSize ); - TEST_SET_GET_VALUE( meshSize, transformInitializer->GetTransformDomainMeshSize() ); + ITK_TEST_SET_GET_VALUE( meshSize, transformInitializer->GetTransformDomainMeshSize() ); transformInitializer->InitializeTransform(); diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx index f9c81f4861f..77c2ade0045 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx @@ -89,14 +89,14 @@ int itkBSplineTransformInitializerTest2( int argc, char * argv[] ) InitializerType::Pointer transformInitializer = InitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( transformInitializer, BSplineTransformInitializer, + ITK_EXERCISE_BASIC_OBJECT_METHODS( transformInitializer, BSplineTransformInitializer, Object ); transformInitializer->SetTransform( bsplineTransform ); - TEST_SET_GET_VALUE( bsplineTransform, transformInitializer->GetTransform() ); + ITK_TEST_SET_GET_VALUE( bsplineTransform, transformInitializer->GetTransform() ); transformInitializer->SetImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, transformInitializer->GetImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, transformInitializer->GetImage() ); TransformType::CoefficientImageArray coefficientImages; @@ -142,7 +142,7 @@ int itkBSplineTransformInitializerTest2( int argc, char * argv[] ) TransformType::Pointer bsplineTransform2 = TransformType::New(); InitializerType::Pointer transformInitializer2 = InitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( transformInitializer2, BSplineTransformInitializer, + ITK_EXERCISE_BASIC_OBJECT_METHODS( transformInitializer2, BSplineTransformInitializer, Object ); transformInitializer2->SetTransform( bsplineTransform2 ); diff --git a/Modules/Core/Transform/test/itkIdentityTransformTest.cxx b/Modules/Core/Transform/test/itkIdentityTransformTest.cxx index 682c0c954ce..5fc26483139 100644 --- a/Modules/Core/Transform/test/itkIdentityTransformTest.cxx +++ b/Modules/Core/Transform/test/itkIdentityTransformTest.cxx @@ -170,8 +170,8 @@ int itkIdentityTransformTest(int, char *[] ) } IdentityTransformType::Pointer inv = IdentityTransformType::New(); - TEST_EXPECT_TRUE(transform->GetInverse(inv)); - TEST_EXPECT_TRUE(!transform->GetInverse(nullptr)); + ITK_TEST_EXPECT_TRUE(transform->GetInverse(inv)); + ITK_TEST_EXPECT_TRUE(!transform->GetInverse(nullptr)); return EXIT_SUCCESS; diff --git a/Modules/Core/Transform/test/itkMultiTransformTest.cxx b/Modules/Core/Transform/test/itkMultiTransformTest.cxx index b4125410b7e..cd283ae90cf 100644 --- a/Modules/Core/Transform/test/itkMultiTransformTest.cxx +++ b/Modules/Core/Transform/test/itkMultiTransformTest.cxx @@ -578,17 +578,17 @@ int itkMultiTransformTest(int, char *[] ) /* Test with wrong size for update */ update.SetSize(1); - TRY_EXPECT_EXCEPTION( multiTransform->UpdateTransformParameters( update, factor ) ); + ITK_TRY_EXPECT_EXCEPTION( multiTransform->UpdateTransformParameters( update, factor ) ); } /* Test SetParameters with wrong size array */ std::cout << std::endl << "Test SetParameters with wrong size array. EXPECT EXCEPTION:" << std::endl; parametersTruth.SetSize(1); - TRY_EXPECT_EXCEPTION( multiTransform->SetParameters( parametersTruth ) ); + ITK_TRY_EXPECT_EXCEPTION( multiTransform->SetParameters( parametersTruth ) ); /* Test SetFixedParameters with wrong size array */ std::cout << std::endl << "Test SetFixedParameters with wrong size array. EXPECT EXCEPTION:" << std::endl; - TRY_EXPECT_EXCEPTION( multiTransform->SetFixedParameters( parametersTruth ) ); + ITK_TRY_EXPECT_EXCEPTION( multiTransform->SetFixedParameters( parametersTruth ) ); /* GetTransformCategory */ if( multiTransform->GetTransformCategory() != MultiTransformType::UnknownTransformCategory ) diff --git a/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx b/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx index 39b46190118..e5f837f7768 100644 --- a/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx @@ -252,9 +252,9 @@ int itkRigid2DTransformTest(int ,char * [] ) rotation->SetMatrix( mrotation ); - TRY_EXPECT_NO_EXCEPTION( rotation->SetMatrix( mrotation, 1e-8 ) ); + ITK_TRY_EXPECT_NO_EXCEPTION( rotation->SetMatrix( mrotation, 1e-8 ) ); mrotation[0][0] += 1e-7; - TRY_EXPECT_EXCEPTION( rotation->SetMatrix( mrotation, 1e-8 ) ); + ITK_TRY_EXPECT_EXCEPTION( rotation->SetMatrix( mrotation, 1e-8 ) ); mrotation[0][0] -= 1e-7; TransformType::OffsetType ioffset; diff --git a/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx b/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx index 566a884d0aa..3c95c5d9074 100644 --- a/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx +++ b/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx @@ -120,7 +120,7 @@ int itkAntiAliasBinaryImageFilterTest(int argc, char * argv [] ) // loops if the MaximumRMSError has been set too low. antialiaser->SetNumberOfIterations(100); - TRY_EXPECT_NO_EXCEPTION( antialiaser->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( antialiaser->Update() ); std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; std::cout << "Last RMS change value was: " << antialiaser->GetRMSChange() << std::endl; @@ -141,7 +141,7 @@ int itkAntiAliasBinaryImageFilterTest(int argc, char * argv [] ) WriterType::Pointer writer = WriterType::New(); writer->SetInput( antialiaser->GetOutput() ); writer->SetFileName( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Repeat just to make sure we reinitialize properly. antialiaser->SetNumberOfIterations(200); diff --git a/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx index b72fcdeb878..87f7fe0f987 100644 --- a/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx @@ -169,7 +169,7 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, MRIBiasFieldCorrectionFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, MRIBiasFieldCorrectionFilter, ImageToImageFilter ); // To see the debug output for each iteration, uncomment the // following line. @@ -221,30 +221,30 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetOptimizerGrowthFactor( optimizerGrowthFactor ); filter->SetUsingInterSliceIntensityCorrection( usingInterSliceIntensityCorrection ); - TEST_SET_GET_VALUE( isBiasFieldMultiplicative, filter->GetBiasFieldMultiplicative() ); - TEST_SET_GET_VALUE( usingSlabIdentification, filter->GetUsingSlabIdentification() ); - TEST_SET_GET_VALUE( usingBiasFieldCorrection, filter->GetUsingBiasFieldCorrection() ); - TEST_SET_GET_VALUE( generatingOutput, filter->GetGeneratingOutput() ); - TEST_SET_GET_VALUE( slabNumberOfSamples, filter->GetSlabNumberOfSamples() ); - TEST_SET_GET_VALUE( slabBackgroundMinimumThreshold, filter->GetSlabBackgroundMinimumThreshold() ); - TEST_SET_GET_VALUE( slabTolerance, filter->GetSlabTolerance() ); - TEST_SET_GET_VALUE( biasDegree, filter->GetBiasFieldDegree() ); - TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); - TEST_SET_GET_VALUE( optimizerGrowthFactor, filter->GetOptimizerGrowthFactor() ); - TEST_SET_GET_VALUE( usingInterSliceIntensityCorrection, filter->GetUsingInterSliceIntensityCorrection() ); + ITK_TEST_SET_GET_VALUE( isBiasFieldMultiplicative, filter->GetBiasFieldMultiplicative() ); + ITK_TEST_SET_GET_VALUE( usingSlabIdentification, filter->GetUsingSlabIdentification() ); + ITK_TEST_SET_GET_VALUE( usingBiasFieldCorrection, filter->GetUsingBiasFieldCorrection() ); + ITK_TEST_SET_GET_VALUE( generatingOutput, filter->GetGeneratingOutput() ); + ITK_TEST_SET_GET_VALUE( slabNumberOfSamples, filter->GetSlabNumberOfSamples() ); + ITK_TEST_SET_GET_VALUE( slabBackgroundMinimumThreshold, filter->GetSlabBackgroundMinimumThreshold() ); + ITK_TEST_SET_GET_VALUE( slabTolerance, filter->GetSlabTolerance() ); + ITK_TEST_SET_GET_VALUE( biasDegree, filter->GetBiasFieldDegree() ); + ITK_TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); + ITK_TEST_SET_GET_VALUE( optimizerGrowthFactor, filter->GetOptimizerGrowthFactor() ); + ITK_TEST_SET_GET_VALUE( usingInterSliceIntensityCorrection, filter->GetUsingInterSliceIntensityCorrection() ); filter->SetBiasFieldMultiplicative( true ); // correct with multiplicative bias filter->SetBiasFieldDegree( biasDegree ); // default value = 3 filter->SetTissueClassStatistics( classMeans, classSigmas ); - //TEST_SET_GET_VALUE( classMeans, classSigmas, filter->GetTissueClassStatistics() ); + //ITK_TEST_SET_GET_VALUE( classMeans, classSigmas, filter->GetTissueClassStatistics() ); filter->SetSlicingDirection( slicingDirection ); - //TEST_SET_GET_VALUE( slicingDirection, filter->GetSlicingDirection() ); + //ITK_TEST_SET_GET_VALUE( slicingDirection, filter->GetSlicingDirection() ); filter->SetInitialBiasFieldCoefficients( initCoefficients ); - //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); + //ITK_TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); //timing long int t1 = time(nullptr); @@ -308,12 +308,12 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetInterSliceCorrectionMaximumIteration(interSliceCorrectionMaximumIteration); filter->SetOptimizerInitialRadius( optimizerInitialRadius ); - TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); + ITK_TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); filter->SetInitialBiasFieldCoefficients( initCoefficients ); - //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); + //ITK_TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); t1 = time(nullptr); filter->Update(); @@ -360,12 +360,12 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetInterSliceCorrectionMaximumIteration( interSliceCorrectionMaximumIteration ); filter->SetOptimizerInitialRadius( optimizerInitialRadius ); - TEST_SET_GET_VALUE( usingInterSliceIntensityCorrection, filter->GetUsingInterSliceIntensityCorrection() ); - TEST_SET_GET_VALUE( usingSlabIdentification, filter->GetUsingSlabIdentification() ); - TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); - TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); + ITK_TEST_SET_GET_VALUE( usingInterSliceIntensityCorrection, filter->GetUsingInterSliceIntensityCorrection() ); + ITK_TEST_SET_GET_VALUE( usingSlabIdentification, filter->GetUsingSlabIdentification() ); + ITK_TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); + ITK_TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); unsigned int numberOfLevels = 1; @@ -377,11 +377,11 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetNumberOfLevels( numberOfLevels ); filter->SetSchedule( schedule ); - TEST_SET_GET_VALUE( numberOfLevels, filter->GetNumberOfLevels() ); - TEST_SET_GET_VALUE( schedule, filter->GetSchedule() ); + ITK_TEST_SET_GET_VALUE( numberOfLevels, filter->GetNumberOfLevels() ); + ITK_TEST_SET_GET_VALUE( schedule, filter->GetSchedule() ); filter->SetInitialBiasFieldCoefficients( initCoefficients ); - //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); + //ITK_TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); t1 = time(nullptr); filter->Update(); @@ -432,16 +432,16 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetNumberOfLevels( numberOfLevels ); filter->SetSchedule( schedule ); - TEST_SET_GET_VALUE( usingInterSliceIntensityCorrection, filter->GetUsingInterSliceIntensityCorrection() ); - TEST_SET_GET_VALUE( usingSlabIdentification, filter->GetUsingSlabIdentification() ); - TEST_SET_GET_VALUE( numberOfLevels, filter->GetNumberOfLevels() ); - TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); - TEST_SET_GET_VALUE( schedule, filter->GetSchedule() ); - TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( usingInterSliceIntensityCorrection, filter->GetUsingInterSliceIntensityCorrection() ); + ITK_TEST_SET_GET_VALUE( usingSlabIdentification, filter->GetUsingSlabIdentification() ); + ITK_TEST_SET_GET_VALUE( numberOfLevels, filter->GetNumberOfLevels() ); + ITK_TEST_SET_GET_VALUE( optimizerInitialRadius, filter->GetOptimizerInitialRadius() ); + ITK_TEST_SET_GET_VALUE( schedule, filter->GetSchedule() ); + ITK_TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); filter->SetInitialBiasFieldCoefficients( initCoefficients ); - //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); + //ITK_TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); t1 = time(nullptr); filter->Update(); @@ -480,11 +480,11 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetVolumeCorrectionMaximumIteration( volumeCorrectionMaximumIteration ); filter->SetInterSliceCorrectionMaximumIteration( interSliceCorrectionMaximumIteration ); - TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); - TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( volumeCorrectionMaximumIteration, filter->GetVolumeCorrectionMaximumIteration() ); + ITK_TEST_SET_GET_VALUE( interSliceCorrectionMaximumIteration, filter->GetInterSliceCorrectionMaximumIteration() ); filter->SetInitialBiasFieldCoefficients( initCoefficients ); - //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); + //ITK_TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); t1 = time(nullptr); filter->Update(); diff --git a/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx b/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx index 0c6b4a9dc9a..4eef1ad33c0 100644 --- a/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx +++ b/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx @@ -68,15 +68,15 @@ class CustomColormapFunctionHelper : public CustomColormapFunction< TScalar, TRG // Test the Get/Set functions for (unsigned int i = 0; i < redChannel.size(); ++i ) { - TEST_SET_GET_VALUE(redChannel[i], colormap->GetRedChannel()[i]); + ITK_TEST_SET_GET_VALUE(redChannel[i], colormap->GetRedChannel()[i]); } for (unsigned int i = 0; i < greenChannel.size(); ++i ) { - TEST_SET_GET_VALUE(greenChannel[i], colormap->GetGreenChannel()[i]); + ITK_TEST_SET_GET_VALUE(greenChannel[i], colormap->GetGreenChannel()[i]); } for (unsigned int i = 0; i < blueChannel.size(); ++i ) { - TEST_SET_GET_VALUE(blueChannel[i], colormap->GetBlueChannel()[i]); + ITK_TEST_SET_GET_VALUE(blueChannel[i], colormap->GetBlueChannel()[i]); } // Set the maximum and minimum input values diff --git a/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx b/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx index eb0c20eee80..da8c564fcbc 100644 --- a/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx +++ b/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx @@ -63,7 +63,7 @@ int itkScalarToRGBColormapImageFilterTest( int argc, char *argv[] ) using RGBFilterType = itk::ScalarToRGBColormapImageFilter; RGBFilterType::Pointer rgbfilter = RGBFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( rgbfilter, ScalarToRGBColormapImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( rgbfilter, ScalarToRGBColormapImageFilter, ImageToImageFilter ); rgbfilter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx index 6d8edd07cb4..7a42a186c15 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx @@ -40,7 +40,7 @@ int itkFFTConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Set up delta function image ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); @@ -61,7 +61,7 @@ int itkFFTConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) using ConvolutionFilterType = itk::FFTConvolutionImageFilter; ConvolutionFilterType::Pointer convolver = ConvolutionFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( convolver, FFTConvolutionImageFilter, ConvolutionImageFilterBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( convolver, FFTConvolutionImageFilter, ConvolutionImageFilterBase ); convolver->SetInput( deltaFunctionImage ); convolver->SetKernelImage( reader->GetOutput() ); @@ -74,16 +74,16 @@ int itkFFTConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) } convolver->SetSizeGreatestPrimeFactor( sizeGreatestPrimeFactor ); - TEST_SET_GET_VALUE( sizeGreatestPrimeFactor, convolver->GetSizeGreatestPrimeFactor() ); + ITK_TEST_SET_GET_VALUE( sizeGreatestPrimeFactor, convolver->GetSizeGreatestPrimeFactor() ); - TRY_EXPECT_NO_EXCEPTION( convolver->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( convolver->Update() ); using WriterType = itk::ImageFileWriter; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( argv[2] ); writer->SetInput( convolver->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx index 263e0efc022..e478f8bf008 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx @@ -51,17 +51,17 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) ReaderType::Pointer reader1 = ReaderType::New(); reader1->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader1->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader1->Update() ); ReaderType::Pointer reader2 = ReaderType::New(); reader2->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( reader2->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader2->Update() ); using ConvolutionFilterType = itk::FFTConvolutionImageFilter< ImageType >; ConvolutionFilterType::Pointer convoluter = ConvolutionFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( convoluter, FFTConvolutionImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( convoluter, FFTConvolutionImageFilter, ConvolutionImageFilterBase ); // Test empty image exception @@ -107,24 +107,24 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) return EXIT_FAILURE; } convoluter->SetSizeGreatestPrimeFactor( sizeGreatestPrimeFactor ); - TEST_SET_GET_VALUE( sizeGreatestPrimeFactor, convoluter->GetSizeGreatestPrimeFactor() ); + ITK_TEST_SET_GET_VALUE( sizeGreatestPrimeFactor, convoluter->GetSizeGreatestPrimeFactor() ); } if( argc >= 6 ) { auto normalize = static_cast( std::stoi( argv[5] ) ); convoluter->SetNormalize( normalize ); - TEST_SET_GET_VALUE( normalize, convoluter->GetNormalize() ); + ITK_TEST_SET_GET_VALUE( normalize, convoluter->GetNormalize() ); if( normalize ) { convoluter->NormalizeOn(); - TEST_EXPECT_TRUE( convoluter->GetNormalize() ); + ITK_TEST_EXPECT_TRUE( convoluter->GetNormalize() ); } else { convoluter->NormalizeOff(); - TEST_EXPECT_TRUE( !convoluter->GetNormalize() ); + ITK_TEST_EXPECT_TRUE( !convoluter->GetNormalize() ); } } @@ -134,12 +134,12 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) if ( outputRegionMode == "SAME" ) { convoluter->SetOutputRegionMode( ConvolutionFilterType::SAME ); - TEST_SET_GET_VALUE( ConvolutionFilterType::SAME, convoluter->GetOutputRegionMode() ); + ITK_TEST_SET_GET_VALUE( ConvolutionFilterType::SAME, convoluter->GetOutputRegionMode() ); } else if ( outputRegionMode == "VALID" ) { convoluter->SetOutputRegionMode( ConvolutionFilterType::VALID ); - TEST_SET_GET_VALUE( ConvolutionFilterType::VALID, convoluter->GetOutputRegionMode() ); + ITK_TEST_SET_GET_VALUE( ConvolutionFilterType::VALID, convoluter->GetOutputRegionMode() ); } else { @@ -151,12 +151,12 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) if( outputRegionMode == "SAME" ) { convoluter->SetOutputRegionModeToSame(); - TEST_SET_GET_VALUE( ConvolutionFilterType::SAME, convoluter->GetOutputRegionMode() ); + ITK_TEST_SET_GET_VALUE( ConvolutionFilterType::SAME, convoluter->GetOutputRegionMode() ); } else { convoluter->SetOutputRegionModeToValid(); - TEST_SET_GET_VALUE( ConvolutionFilterType::VALID, convoluter->GetOutputRegionMode() ); + ITK_TEST_SET_GET_VALUE( ConvolutionFilterType::VALID, convoluter->GetOutputRegionMode() ); } } @@ -170,17 +170,17 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) if ( boundaryCondition == "CONSTANT" ) { convoluter->SetBoundaryCondition( &constantBoundaryCondition ); - TEST_SET_GET_VALUE( &constantBoundaryCondition, convoluter->GetBoundaryCondition() ); + ITK_TEST_SET_GET_VALUE( &constantBoundaryCondition, convoluter->GetBoundaryCondition() ); } else if ( boundaryCondition == "PERIODIC" ) { convoluter->SetBoundaryCondition( &periodicBoundaryCondition ); - TEST_SET_GET_VALUE( &periodicBoundaryCondition, convoluter->GetBoundaryCondition() ); + ITK_TEST_SET_GET_VALUE( &periodicBoundaryCondition, convoluter->GetBoundaryCondition() ); } else if ( boundaryCondition == "ZEROFLUXNEUMANN" ) { convoluter->SetBoundaryCondition( &zeroFluxNeumannBoundaryCondition ); - TEST_SET_GET_VALUE( &zeroFluxNeumannBoundaryCondition, convoluter->GetBoundaryCondition() ); + ITK_TEST_SET_GET_VALUE( &zeroFluxNeumannBoundaryCondition, convoluter->GetBoundaryCondition() ); } else { @@ -192,14 +192,14 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) itk::SimpleFilterWatcher watcher( convoluter, "filter" ); - TRY_EXPECT_NO_EXCEPTION( convoluter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( convoluter->Update() ); using WriterType = itk::ImageFileWriter; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( argv[3] ); writer->SetInput( convoluter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Test VALID output region mode with kernel that is larger than @@ -214,7 +214,7 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) convoluter->SetInput( reader1->GetOutput() ); convoluter->SetKernelImage( largeKernel ); - TRY_EXPECT_EXCEPTION( convoluter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( convoluter->Update() ); // Test for invalid request region. ImageType::IndexType invalidIndex; @@ -224,7 +224,7 @@ int itkFFTConvolutionImageFilterTest( int argc, char * argv[] ) ImageType::RegionType invalidRequestRegion( invalidIndex, invalidSize ); convoluter->GetOutput()->SetRequestedRegion( invalidRequestRegion ); - TRY_EXPECT_EXCEPTION( convoluter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( convoluter->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx index 97133c3fc30..b08a244c2a1 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx @@ -41,24 +41,24 @@ int itkFFTConvolutionImageFilterTestInt(int argc, char * argv[]) ReaderType::Pointer reader1 = ReaderType::New(); reader1->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader1->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader1->Update() ); ReaderType::Pointer reader2 = ReaderType::New(); reader2->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( reader2->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader2->Update() ); using ConvolutionFilterType = itk::FFTConvolutionImageFilter; ConvolutionFilterType::Pointer convolver = ConvolutionFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( convolver, FFTConvolutionImageFilter, ConvolutionImageFilterBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( convolver, FFTConvolutionImageFilter, ConvolutionImageFilterBase ); convolver->SetInput( reader1->GetOutput() ); convolver->SetKernelImage( reader2->GetOutput() ); ConvolutionFilterType::SizeValueType sizeGreatestPrimeFactor = 2; convolver->SetSizeGreatestPrimeFactor( sizeGreatestPrimeFactor ); - TEST_SET_GET_VALUE( sizeGreatestPrimeFactor, convolver->GetSizeGreatestPrimeFactor() ); + ITK_TEST_SET_GET_VALUE( sizeGreatestPrimeFactor, convolver->GetSizeGreatestPrimeFactor() ); itk::SimpleFilterWatcher watcher(convolver, "filter"); @@ -73,13 +73,13 @@ int itkFFTConvolutionImageFilterTestInt(int argc, char * argv[]) if ( outputRegionMode == "SAME" ) { convolver->SetOutputRegionModeToSame(); - TEST_SET_GET_VALUE( ConvolutionFilterType::SAME, convolver->GetOutputRegionMode() ); + ITK_TEST_SET_GET_VALUE( ConvolutionFilterType::SAME, convolver->GetOutputRegionMode() ); std::cout << "OutputRegionMode set to SAME." << std::endl; } else if ( outputRegionMode == "VALID" ) { convolver->SetOutputRegionModeToValid(); - TEST_SET_GET_VALUE( ConvolutionFilterType::VALID, convolver->GetOutputRegionMode() ); + ITK_TEST_SET_GET_VALUE( ConvolutionFilterType::VALID, convolver->GetOutputRegionMode() ); std::cout << "OutputRegionMode set to VALID." << std::endl; } else @@ -90,14 +90,14 @@ int itkFFTConvolutionImageFilterTestInt(int argc, char * argv[]) } } - TRY_EXPECT_NO_EXCEPTION( convolver->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( convolver->Update() ); using WriterType = itk::ImageFileWriter< ImageType >; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( argv[3] ); writer->SetInput( convolver->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx index ecf18495124..8825cf20aa0 100644 --- a/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkInverseDeconvolutionImageFilterTest.cxx @@ -78,10 +78,10 @@ int itkInverseDeconvolutionImageFilterTest(int argc, char * argv[]) deconvolutionFilter->SetSizeGreatestPrimeFactor( 5 ); // Check default KernelZeroMagnitudeThreshold value - TEST_SET_GET_VALUE( 1.0e-4, deconvolutionFilter->GetKernelZeroMagnitudeThreshold() ); + ITK_TEST_SET_GET_VALUE( 1.0e-4, deconvolutionFilter->GetKernelZeroMagnitudeThreshold() ); double zeroMagnitudeThreshold = 1.0e-2; deconvolutionFilter->SetKernelZeroMagnitudeThreshold( zeroMagnitudeThreshold ); - TEST_SET_GET_VALUE( zeroMagnitudeThreshold, + ITK_TEST_SET_GET_VALUE( zeroMagnitudeThreshold, deconvolutionFilter->GetKernelZeroMagnitudeThreshold() ); using WriterType = itk::ImageFileWriter; diff --git a/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx index 136f5ea92ae..9cf1f691301 100644 --- a/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx @@ -244,8 +244,8 @@ int itkParametricBlindLeastSquaresDeconvolutionImageFilterTest(int argc, char* a } // Exercise the setters/getters - TEST_SET_GET_VALUE( alpha, deconvolutionFilter->GetAlpha() ); - TEST_SET_GET_VALUE( beta, deconvolutionFilter->GetBeta() ); + ITK_TEST_SET_GET_VALUE( alpha, deconvolutionFilter->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( beta, deconvolutionFilter->GetBeta() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx index 07b2898ed65..0c0519bd92a 100644 --- a/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkTikhonovDeconvolutionImageFilterTest.cxx @@ -79,10 +79,10 @@ int itkTikhonovDeconvolutionImageFilterTest(int argc, char * argv[]) deconvolutionFilter->SetSizeGreatestPrimeFactor( 5 ); // Check default RegularizationConstant value - TEST_SET_GET_VALUE( 0.0, deconvolutionFilter->GetRegularizationConstant() ); + ITK_TEST_SET_GET_VALUE( 0.0, deconvolutionFilter->GetRegularizationConstant() ); double regularizationConstant = 1.0e-4; deconvolutionFilter->SetRegularizationConstant( regularizationConstant ); - TEST_SET_GET_VALUE( regularizationConstant, + ITK_TEST_SET_GET_VALUE( regularizationConstant, deconvolutionFilter->GetRegularizationConstant() ); using WriterType = itk::ImageFileWriter; diff --git a/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx index 61ce63d3a4e..af0bcbff951 100644 --- a/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkWienerDeconvolutionImageFilterTest.cxx @@ -77,10 +77,10 @@ int itkWienerDeconvolutionImageFilterTest(int argc, char * argv[]) deconvolutionFilter->SetSizeGreatestPrimeFactor( 5 ); // Check default NoiseVariance value - TEST_SET_GET_VALUE( 0.0, deconvolutionFilter->GetNoiseVariance() ); + ITK_TEST_SET_GET_VALUE( 0.0, deconvolutionFilter->GetNoiseVariance() ); double noiseVariance = 1.0; deconvolutionFilter->SetNoiseVariance( noiseVariance ); - TEST_SET_GET_VALUE( noiseVariance, deconvolutionFilter->GetNoiseVariance() ); + ITK_TEST_SET_GET_VALUE( noiseVariance, deconvolutionFilter->GetNoiseVariance() ); using WriterType = itk::ImageFileWriter< ImageType >; WriterType::Pointer writer = WriterType::New(); diff --git a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterDefaultTest.cxx b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterDefaultTest.cxx index d510ea76f1f..f748bd5e237 100644 --- a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterDefaultTest.cxx +++ b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterDefaultTest.cxx @@ -39,7 +39,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( inputFileName ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Create filter and initialize @@ -50,7 +50,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi filter->SetNumberOfWorkUnits( 2 ); // Denoise the image - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Write the denoised image to file @@ -58,7 +58,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi writer->SetFileName( outputFileName ); writer->SetInput( filter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } @@ -84,7 +84,7 @@ int itkPatchBasedDenoisingImageFilterDefaultTest( int argc, char * argv [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, PatchBasedDenoisingImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, PatchBasedDenoisingImageFilter, PatchBasedDenoisingBaseImageFilter ); diff --git a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx index 0b977a2c13b..7420f75d0e5 100644 --- a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx +++ b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx @@ -88,7 +88,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( inputFileName ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Create filter and initialize @@ -98,20 +98,20 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi filter->SetInput( inputImage ); // Set whether conditional derivatives should be used estimating sigma - TEST_SET_GET_BOOLEAN( filter, ComputeConditionalDerivatives, + ITK_TEST_SET_GET_BOOLEAN( filter, ComputeConditionalDerivatives, computeConditionalDerivatives ); // Patch radius is same for all dimensions of the image constexpr unsigned int patchRadius = 4; filter->SetPatchRadius( patchRadius ); - TEST_SET_GET_VALUE( patchRadius, filter->GetPatchRadius() ); + ITK_TEST_SET_GET_VALUE( patchRadius, filter->GetPatchRadius() ); // Instead of directly setting the weights, could also specify type bool useSmoothDiscPatchWeights = true; - TEST_SET_GET_BOOLEAN( filter, UseSmoothDiscPatchWeights, + ITK_TEST_SET_GET_BOOLEAN( filter, UseSmoothDiscPatchWeights, useSmoothDiscPatchWeights ); bool useFastTensorComputations = true; - TEST_SET_GET_BOOLEAN( filter, UseFastTensorComputations, + ITK_TEST_SET_GET_BOOLEAN( filter, UseFastTensorComputations, useFastTensorComputations ); // Noise model to use @@ -133,21 +133,21 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi noiseModel = FilterType::NOMODEL; } filter->SetNoiseModel( noiseModel ); - TEST_SET_GET_VALUE( noiseModel, filter->GetNoiseModel() ); + ITK_TEST_SET_GET_VALUE( noiseModel, filter->GetNoiseModel() ); // Stepsize or weight for smoothing term double smoothingWeight = 1.0; filter->SetSmoothingWeight( smoothingWeight ); - TEST_SET_GET_VALUE( smoothingWeight, filter->GetSmoothingWeight() ); + ITK_TEST_SET_GET_VALUE( smoothingWeight, filter->GetSmoothingWeight() ); // Stepsize or weight for fidelity term filter->SetNoiseModelFidelityWeight( noiseModelFidelityWeight ); - TEST_SET_GET_VALUE( noiseModelFidelityWeight, + ITK_TEST_SET_GET_VALUE( noiseModelFidelityWeight, filter->GetNoiseModelFidelityWeight() ); // Number of iterations over the image of denoising filter->SetNumberOfIterations( numIterations ); - TEST_SET_GET_VALUE( numIterations, filter->GetNumberOfIterations() ); + ITK_TEST_SET_GET_VALUE( numIterations, filter->GetNumberOfIterations() ); // Number of threads to use in parallel filter->SetNumberOfWorkUnits( numThreads ); @@ -167,30 +167,30 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi // Sampler can be complete neighborhood sampler, random neighborhood sampler, // Gaussian sampler, etc. filter->SetSampler( sampler ); - TEST_SET_GET_VALUE( sampler, filter->GetSampler() ); + ITK_TEST_SET_GET_VALUE( sampler, filter->GetSampler() ); // Automatic estimation of the kernel bandwidth bool kernelBandwidthEstimation = true; - TEST_SET_GET_BOOLEAN( filter, KernelBandwidthEstimation, + ITK_TEST_SET_GET_BOOLEAN( filter, KernelBandwidthEstimation, kernelBandwidthEstimation ); // Update bandwidth every 'n' iterations unsigned int kernelBandwidthUpdateFrequency = 3; filter->SetKernelBandwidthUpdateFrequency( kernelBandwidthUpdateFrequency ); - TEST_SET_GET_VALUE( kernelBandwidthUpdateFrequency, + ITK_TEST_SET_GET_VALUE( kernelBandwidthUpdateFrequency, filter->GetKernelBandwidthUpdateFrequency() ); // Use 20% of the pixels for the sigma update calculation double kernelBandwidthFractionPixelsForEstimation = 0.20; filter->SetKernelBandwidthFractionPixelsForEstimation( kernelBandwidthFractionPixelsForEstimation ); - TEST_SET_GET_VALUE( kernelBandwidthFractionPixelsForEstimation, + ITK_TEST_SET_GET_VALUE( kernelBandwidthFractionPixelsForEstimation, filter->GetKernelBandwidthFractionPixelsForEstimation() ); // Multiplication factor modifying the automatically-estimated kernel sigma filter->SetKernelBandwidthMultiplicationFactor( kernelBandwidthMultiplicationFactor ); - TEST_SET_GET_VALUE( kernelBandwidthMultiplicationFactor, + ITK_TEST_SET_GET_VALUE( kernelBandwidthMultiplicationFactor, filter->GetKernelBandwidthMultiplicationFactor() ); // Test the filter exceptions @@ -215,7 +215,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi inputImage->SetPixel( pixelIndex, nonpositivePixelValue ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); // Restore the original pixel value inputImage->SetPixel( pixelIndex, originalPixelValue ); @@ -223,7 +223,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi // Denoise the image - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Exercise the PrintSelf method to know the patch radius in voxels once @@ -290,7 +290,7 @@ int doDenoising( const std::string & inputFileName, const std::string & outputFi writer->SetFileName( outputFileName ); writer->SetInput( filter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished" << std::endl; @@ -324,7 +324,7 @@ int itkPatchBasedDenoisingImageFilterTest( int argc, char * argv [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, PatchBasedDenoisingImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, PatchBasedDenoisingImageFilter, PatchBasedDenoisingBaseImageFilter ); const std::string inFileName( argv[1] ); diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx index 59fbe1deb69..06f0c8a9f35 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx @@ -74,7 +74,7 @@ int itkDisplacementFieldTransformCloneTest( int, char *[] ) DisplacementTransformType::Pointer displacementTransformClone = displacementTransform->Clone(); - EXERCISE_BASIC_OBJECT_METHODS( displacementTransformClone, + ITK_EXERCISE_BASIC_OBJECT_METHODS( displacementTransformClone, DisplacementFieldTransform, Transform ); diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx index b44410f9928..691a480cc0e 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx @@ -185,20 +185,20 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) DisplacementTransformType::Pointer displacementTransform = DisplacementTransformType::New(); - EXERCISE_BASIC_OBJECT_METHODS( displacementTransform, + ITK_EXERCISE_BASIC_OBJECT_METHODS( displacementTransform, DisplacementFieldTransform, Transform ); DisplacementTransformType::DisplacementFieldType::Pointer displacementField = DisplacementTransformType::DisplacementFieldType::New(); displacementTransform->SetDisplacementField( displacementField ); - TEST_SET_GET_VALUE( displacementField, + ITK_TEST_SET_GET_VALUE( displacementField, displacementTransform->GetDisplacementField() ); DisplacementTransformType::DisplacementFieldType::Pointer inverseDisplacementField = DisplacementTransformType::DisplacementFieldType::New(); displacementTransform->SetInverseDisplacementField( inverseDisplacementField ); - TEST_SET_GET_VALUE( inverseDisplacementField, + ITK_TEST_SET_GET_VALUE( inverseDisplacementField, displacementTransform->GetInverseDisplacementField() ); using InterpolatorType = itk::VectorLinearInterpolateImageFunction< @@ -207,22 +207,22 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) InterpolatorType::Pointer interpolator = InterpolatorType::New(); displacementTransform->SetInterpolator( interpolator ); - TEST_SET_GET_VALUE( interpolator, + ITK_TEST_SET_GET_VALUE( interpolator, displacementTransform->GetInterpolator() ); InterpolatorType::Pointer inverseInterpolator = InterpolatorType::New(); displacementTransform->SetInverseInterpolator( inverseInterpolator ); - TEST_SET_GET_VALUE( inverseInterpolator, + ITK_TEST_SET_GET_VALUE( inverseInterpolator, displacementTransform->GetInverseInterpolator() ); double coordinateTolerance = std::stod( argv[1] ); displacementTransform->SetCoordinateTolerance( coordinateTolerance ); - TEST_SET_GET_VALUE( coordinateTolerance, + ITK_TEST_SET_GET_VALUE( coordinateTolerance, displacementTransform->GetCoordinateTolerance() ); double directionTolerance = std::stod( argv[2] ); displacementTransform->SetDirectionTolerance( directionTolerance ); - TEST_SET_GET_VALUE( directionTolerance, + ITK_TEST_SET_GET_VALUE( directionTolerance, displacementTransform->GetDirectionTolerance() ); @@ -244,7 +244,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) field->FillBuffer( zeroVector ); displacementTransform->SetDisplacementField( field ); - TEST_SET_GET_VALUE( field, displacementTransform->GetDisplacementField() ); + ITK_TEST_SET_GET_VALUE( field, displacementTransform->GetDisplacementField() ); // Test the fixed parameters @@ -252,7 +252,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) DisplacementTransformType::ParametersType fixedParameters = displacementTransform->GetFixedParameters(); displacementTransform->SetFixedParameters( fixedParameters ); - TEST_SET_GET_VALUE( fixedParameters, displacementTransform->GetFixedParameters() ); + ITK_TEST_SET_GET_VALUE( fixedParameters, displacementTransform->GetFixedParameters() ); DisplacementFieldType::SizeType size2 = displacementTransform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); @@ -333,7 +333,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) } displacementTransform->SetDisplacementField( field ); - TEST_SET_GET_VALUE( field, displacementTransform->GetDisplacementField() ); + ITK_TEST_SET_GET_VALUE( field, displacementTransform->GetDisplacementField() ); DisplacementTransformType::InputPointType testPoint; testPoint[0] = 10; @@ -452,7 +452,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) return EXIT_FAILURE; } - TRY_EXPECT_EXCEPTION( deformVector = + ITK_TRY_EXPECT_EXCEPTION( deformVector = displacementTransform->TransformVector( testVector ) ); @@ -476,7 +476,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) } - TRY_EXPECT_EXCEPTION( deformVVector = + ITK_TRY_EXPECT_EXCEPTION( deformVVector = displacementTransform->TransformVector( testVVector ) ); @@ -498,7 +498,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) } - TRY_EXPECT_EXCEPTION( deformcVector = + ITK_TRY_EXPECT_EXCEPTION( deformcVector = displacementTransform->TransformCovariantVector( testcVector ) ); @@ -521,7 +521,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) } - TRY_EXPECT_EXCEPTION( deformcVVector = + ITK_TRY_EXPECT_EXCEPTION( deformcVVector = displacementTransform->TransformCovariantVector( testcVVector ) ); @@ -553,7 +553,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) } - TRY_EXPECT_EXCEPTION( deformTensor = + ITK_TRY_EXPECT_EXCEPTION( deformTensor = displacementTransform->TransformDiffusionTensor( testTensor ) ); @@ -562,7 +562,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) DisplacementTransformType::ParametersType paramsWrongSize( 1 ); paramsWrongSize.Fill( 0 ); - TRY_EXPECT_EXCEPTION( displacementTransform->SetParameters( paramsWrongSize ) ); + ITK_TRY_EXPECT_EXCEPTION( displacementTransform->SetParameters( paramsWrongSize ) ); // Test UpdateTransformParameters diff --git a/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx index 3343cc564ff..227adf1b43a 100644 --- a/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx @@ -99,18 +99,18 @@ int itkApproximateSignedDistanceMapImageFilterTest( int argc, char* argv[] ) DistanceMapFilterType::Pointer signedDistanceMapFilter = DistanceMapFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( signedDistanceMapFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( signedDistanceMapFilter, ApproximateSignedDistanceMapImageFilter, ImageToImageFilter ); signedDistanceMapFilter->SetInput( image ); signedDistanceMapFilter->SetInsideValue( insideValue ); - TEST_SET_GET_VALUE( insideValue, signedDistanceMapFilter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( insideValue, signedDistanceMapFilter->GetInsideValue() ); signedDistanceMapFilter->SetOutsideValue( outsideValue ); - TEST_SET_GET_VALUE( outsideValue, signedDistanceMapFilter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( outsideValue, signedDistanceMapFilter->GetOutsideValue() ); - TRY_EXPECT_NO_EXCEPTION( signedDistanceMapFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( signedDistanceMapFilter->Update() ); // Write the output image @@ -121,7 +121,7 @@ int itkApproximateSignedDistanceMapImageFilterTest( int argc, char* argv[] ) rescaler->SetInput( signedDistanceMapFilter->GetOutput() ); rescaler->SetScale( 1000 ); - TRY_EXPECT_NO_EXCEPTION( rescaler->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( rescaler->Update() ); if( rescaler->GetUnderflowCount() + rescaler->GetOverflowCount() > 0 ) @@ -139,7 +139,7 @@ int itkApproximateSignedDistanceMapImageFilterTest( int argc, char* argv[] ) writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); OutputPixelType maxDistance = 0; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterBaseTest.cxx index 7740347b9d7..5c15746d861 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterBaseTest.cxx @@ -41,40 +41,40 @@ static int FastMarchingImageFilterBaseTestFunction() FastMarchingImageFilterType::New(); bool overrideOutputInformation = true; - TEST_SET_GET_BOOLEAN( fastMarchingFilter, OverrideOutputInformation, + ITK_TEST_SET_GET_BOOLEAN( fastMarchingFilter, OverrideOutputInformation, overrideOutputInformation ); typename FastMarchingImageFilterType::OutputSizeType outputSize; outputSize.Fill( 32 ); fastMarchingFilter->SetOutputSize( outputSize ); - TEST_SET_GET_VALUE( outputSize, fastMarchingFilter->GetOutputSize() ); + ITK_TEST_SET_GET_VALUE( outputSize, fastMarchingFilter->GetOutputSize() ); typename FastMarchingImageFilterType::OutputRegionType outputRegion; outputRegion.SetSize( outputSize ); fastMarchingFilter->SetOutputRegion( outputRegion ); - TEST_SET_GET_VALUE( outputRegion, fastMarchingFilter->GetOutputRegion() ); + ITK_TEST_SET_GET_VALUE( outputRegion, fastMarchingFilter->GetOutputRegion() ); typename FastMarchingImageFilterType::OutputSpacingType outputSpacing; outputSpacing.Fill( 1.0 ); fastMarchingFilter->SetOutputSpacing( outputSpacing ); - TEST_SET_GET_VALUE( outputSpacing, fastMarchingFilter->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( outputSpacing, fastMarchingFilter->GetOutputSpacing() ); typename FastMarchingImageFilterType::OutputDirectionType outputDirection; outputDirection.SetIdentity(); fastMarchingFilter->SetOutputDirection( outputDirection ); - TEST_SET_GET_VALUE( outputDirection, fastMarchingFilter->GetOutputDirection() ); + ITK_TEST_SET_GET_VALUE( outputDirection, fastMarchingFilter->GetOutputDirection() ); typename FastMarchingImageFilterType::OutputPointType outputOrigin; outputOrigin.Fill( 0.0 ); fastMarchingFilter->SetOutputOrigin( outputOrigin ); - TEST_SET_GET_VALUE( outputOrigin, fastMarchingFilter->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( outputOrigin, fastMarchingFilter->GetOutputOrigin() ); // DO NOT ATTEMPT TO UPDATE the base class filter. // the base class filter is not sufficiently configured // with trial point, stopping criteria, normalization factors, or speed constants. // or given a valid image. // - // DO NOT ADD TRY_EXPECT_NO_EXCEPTION( fastMarchingFilter->Update() ); + // DO NOT ADD ITK_TRY_EXPECT_NO_EXCEPTION( fastMarchingFilter->Update() ); // DO NOT ADD typename ImageType::Pointer output = fastMarchingFilter->GetOutput(); return EXIT_SUCCESS; @@ -96,7 +96,7 @@ int itkFastMarchingImageFilterBaseTest( int , char * [] ) FastMarchingImageFilterType::Pointer fastMarchingFilter = FastMarchingImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( fastMarchingFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( fastMarchingFilter, FastMarchingImageFilterBase, FastMarchingBase ); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx index 66f8314992d..ddb9d4565de 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx @@ -60,7 +60,7 @@ int itkFastMarchingImageFilterRealTest1( int itkNotUsed( argc ), char* itkNotUse FastMarchingType::Pointer marcher = FastMarchingType::New(); - EXERCISE_BASIC_OBJECT_METHODS( marcher, FastMarchingImageFilterBase, + ITK_EXERCISE_BASIC_OBJECT_METHODS( marcher, FastMarchingImageFilterBase, FastMarchingBase ); @@ -157,7 +157,7 @@ int itkFastMarchingImageFilterRealTest1( int itkNotUsed( argc ), char* itkNotUse marcher->DebugOn(); // Update the Fast Marching filter - TRY_EXPECT_NO_EXCEPTION( marcher->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( marcher->Update() ); // Check the results diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx index 46e3f0a03df..34a0f023ea3 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx @@ -61,7 +61,7 @@ int itkFastMarchingImageFilterRealTest2( int itkNotUsed( argc ), char* itkNotUse FastMarchingType::Pointer marcher = FastMarchingType::New(); - EXERCISE_BASIC_OBJECT_METHODS( marcher, FastMarchingImageFilterBase, + ITK_EXERCISE_BASIC_OBJECT_METHODS( marcher, FastMarchingImageFilterBase, FastMarchingBase ); @@ -176,7 +176,7 @@ int itkFastMarchingImageFilterRealTest2( int itkNotUsed( argc ), char* itkNotUse marcher->DebugOn(); // Update the Fast Marching filter - TRY_EXPECT_NO_EXCEPTION( marcher->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( marcher->Update() ); // Check the results diff --git a/Modules/Filtering/ImageCompare/test/itkCheckerBoardImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkCheckerBoardImageFilterTest.cxx index 42edd16762c..4245f06561d 100644 --- a/Modules/Filtering/ImageCompare/test/itkCheckerBoardImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkCheckerBoardImageFilterTest.cxx @@ -118,7 +118,7 @@ int itkCheckerBoardImageFilterTest( int argc, char* argv[] ) CheckerBoardImageFilterType::Pointer checkerBoard = CheckerBoardImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS(checkerBoard, CheckerBoardImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS(checkerBoard, CheckerBoardImageFilter, ImageToImageFilter); // Set the input images @@ -131,7 +131,7 @@ int itkCheckerBoardImageFilterTest( int argc, char* argv[] ) pattern[2] = 10; // number of checkers along Z checkerBoard->SetCheckerPattern( pattern ); - TEST_SET_GET_VALUE( pattern, checkerBoard->GetCheckerPattern() ); + ITK_TEST_SET_GET_VALUE( pattern, checkerBoard->GetCheckerPattern() ); // Execute the filter checkerBoard->Update(); @@ -148,7 +148,7 @@ int itkCheckerBoardImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx index c383a5997ab..eab106057b3 100644 --- a/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx @@ -120,7 +120,7 @@ int itkConstrainedValueDifferenceImageFilterTest( int argc, char* argv[] ) ConstrainedValueDifferenceImageFilterType::Pointer filter = ConstrainedValueDifferenceImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ConstrainedValueDifferenceImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ConstrainedValueDifferenceImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -143,7 +143,7 @@ int itkConstrainedValueDifferenceImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx index cfeb348b23a..d81f72a995b 100644 --- a/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx @@ -80,13 +80,13 @@ int itkTestingComparisonImageFilterTest(int argc, char *argv [] ) writer->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); unsigned long numberOfPixelsWithDifferences = filter->GetNumberOfPixelsWithDifferences(); char *end; - TEST_EXPECT_EQUAL(numberOfPixelsWithDifferences, std::strtoul( argv[6], &end, 10 ) ); + ITK_TEST_EXPECT_EQUAL(numberOfPixelsWithDifferences, std::strtoul( argv[6], &end, 10 ) ); // Change test input spacing to test that comparison filter fails if spacings are different InputImageType::SpacingType spacing; @@ -95,13 +95,13 @@ int itkTestingComparisonImageFilterTest(int argc, char *argv [] ) // Expect failure reader2->GetOutput()->SetSpacing( spacing ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); // Expect success auto coordinateTolerance = static_cast( spacing[0] ); filter->SetCoordinateTolerance(coordinateTolerance); - TEST_SET_GET_VALUE( coordinateTolerance, filter->GetCoordinateTolerance() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( coordinateTolerance, filter->GetCoordinateTolerance() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Reset filter->SetCoordinateTolerance(1.0e-6); @@ -113,11 +113,11 @@ int itkTestingComparisonImageFilterTest(int argc, char *argv [] ) // Expect failure reader2->GetOutput()->SetOrigin( origin ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); filter->SetCoordinateTolerance( 10 ); // Expect success - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Reset filter->SetCoordinateTolerance( 1.0e-6 ); @@ -132,25 +132,25 @@ int itkTestingComparisonImageFilterTest(int argc, char *argv [] ) // Expect failure reader2->GetOutput()->SetDirection( direction ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); // Expect success filter->SetDirectionTolerance( 2 ); - TEST_SET_GET_VALUE( 2, filter->GetDirectionTolerance() ); + ITK_TEST_SET_GET_VALUE( 2, filter->GetDirectionTolerance() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Reset filter->SetDirectionTolerance( 1.0e-6 ); // Test disabling VerifyInputInformation() filter->SetVerifyInputInformation(false); - TEST_SET_GET_VALUE( false, filter->GetVerifyInputInformation() ); + ITK_TEST_SET_GET_VALUE( false, filter->GetVerifyInputInformation() ); filter->VerifyInputInformationOn(); - TEST_SET_GET_VALUE( true, filter->GetVerifyInputInformation() ); + ITK_TEST_SET_GET_VALUE( true, filter->GetVerifyInputInformation() ); filter->VerifyInputInformationOff(); - TEST_SET_GET_VALUE( false, filter->GetVerifyInputInformation() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TEST_SET_GET_VALUE( false, filter->GetVerifyInputInformation() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index 5e5bc9ae1c8..b7863f3a5d5 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -103,7 +103,7 @@ int itkJoinSeriesImageFilterTest( int, char* [] ) JoinSeriesImageType::Pointer joinSeriesImage = JoinSeriesImageType::New(); - EXERCISE_BASIC_OBJECT_METHODS( joinSeriesImage, JoinSeriesImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( joinSeriesImage, JoinSeriesImageFilter, ImageToImageFilter ); // Check the default values @@ -120,10 +120,10 @@ int itkJoinSeriesImageFilterTest( int, char* [] ) // Setup the filter joinSeriesImage->SetSpacing( spacingValue ); - TEST_SET_GET_VALUE( spacingValue, joinSeriesImage->GetSpacing() ); + ITK_TEST_SET_GET_VALUE( spacingValue, joinSeriesImage->GetSpacing() ); joinSeriesImage->SetOrigin( originValue ); - TEST_SET_GET_VALUE( originValue, joinSeriesImage->GetOrigin() ); + ITK_TEST_SET_GET_VALUE( originValue, joinSeriesImage->GetOrigin() ); for ( int i = 0; i < numInputs; i++ ) { diff --git a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx index ac303245f31..271cd182167 100644 --- a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx @@ -50,7 +50,7 @@ int itkCannyEdgeDetectionImageFilterTest( int argc, char * argv[] ) // Set up the filter CannyEdgeDetectionImageFilterType::Pointer filter = CannyEdgeDetectionImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, CannyEdgeDetectionImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, CannyEdgeDetectionImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watcher( filter ); @@ -58,19 +58,19 @@ int itkCannyEdgeDetectionImageFilterTest( int argc, char * argv[] ) CannyEdgeDetectionImageFilterType::OutputImagePixelType upperThreshold = 30; filter->SetUpperThreshold( upperThreshold ); - TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); + ITK_TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); CannyEdgeDetectionImageFilterType::OutputImagePixelType lowerThreshold = 15; filter->SetLowerThreshold( lowerThreshold ); - TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); + ITK_TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); CannyEdgeDetectionImageFilterType::ArrayType variance = 1.0f; filter->SetVariance( variance ); - TEST_SET_GET_VALUE( variance, filter->GetVariance() ); + ITK_TEST_SET_GET_VALUE( variance, filter->GetVariance() ); CannyEdgeDetectionImageFilterType::ArrayType maximumError = .01f; filter->SetMaximumError( maximumError ); - TEST_SET_GET_VALUE( maximumError, filter->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maximumError, filter->GetMaximumError() ); itk::RescaleIntensityImageFilter::Pointer rescale = @@ -85,7 +85,7 @@ int itkCannyEdgeDetectionImageFilterTest( int argc, char * argv[] ) writer->SetInput( rescale->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx index 2f70d4e1d1e..4616831d65c 100644 --- a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx @@ -47,25 +47,25 @@ int itkCannyEdgeDetectionImageFilterTest2( int argc, char * argv[] ) // Set up the filter CannyEdgeDetectionImageFilterType::Pointer filter = CannyEdgeDetectionImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, CannyEdgeDetectionImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, CannyEdgeDetectionImageFilter, ImageToImageFilter ); filter->SetInput( reader->GetOutput() ); CannyEdgeDetectionImageFilterType::OutputImagePixelType upperThreshold = 25; filter->SetUpperThreshold( upperThreshold ); - TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); + ITK_TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); CannyEdgeDetectionImageFilterType::OutputImagePixelType lowerThreshold = 10; filter->SetLowerThreshold( lowerThreshold ); - TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); + ITK_TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); CannyEdgeDetectionImageFilterType::ArrayType variance = 1.0f; filter->SetVariance(variance); - TEST_SET_GET_VALUE( variance, filter->GetVariance() ); + ITK_TEST_SET_GET_VALUE( variance, filter->GetVariance() ); CannyEdgeDetectionImageFilterType::ArrayType maximumError = .01f; filter->SetMaximumError(maximumError ); - TEST_SET_GET_VALUE( maximumError, filter->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maximumError, filter->GetMaximumError() ); itk::RescaleIntensityImageFilter::Pointer rescale = @@ -80,32 +80,32 @@ int itkCannyEdgeDetectionImageFilterTest2( int argc, char * argv[] ) writer->SetInput( rescale->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Set the Canny filter to other values upperThreshold = 20; filter->SetUpperThreshold( upperThreshold ); - TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); + ITK_TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); lowerThreshold = 5; filter->SetLowerThreshold( lowerThreshold ); - TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); + ITK_TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); - TRY_EXPECT_NO_EXCEPTION( rescale->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( rescale->Update() ); // Set it back expecting the same values upperThreshold = 25; filter->SetUpperThreshold( upperThreshold ); - TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); + ITK_TEST_SET_GET_VALUE( upperThreshold, filter->GetUpperThreshold() ); lowerThreshold = 10; filter->SetLowerThreshold( lowerThreshold ); - TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); + ITK_TEST_SET_GET_VALUE( lowerThreshold, filter->GetLowerThreshold() ); writer->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx index 334829c30ce..f95380da808 100644 --- a/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx @@ -58,14 +58,14 @@ int itkDiscreteGaussianDerivativeImageFilterTest( int argc, char* argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); using DerivativeFilterType = itk::DiscreteGaussianDerivativeImageFilter< ImageType, ImageType >; DerivativeFilterType::Pointer derivativeFilter = DerivativeFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( derivativeFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( derivativeFilter, DiscreteGaussianDerivativeImageFilter, ImageToImageFilter ); @@ -81,7 +81,7 @@ int itkDiscreteGaussianDerivativeImageFilterTest( int argc, char* argv[] ) order[1] = std::stoi( argv[4] ); derivativeFilter->SetOrder( order ); - TEST_SET_GET_VALUE( order, derivativeFilter->GetOrder() ); + ITK_TEST_SET_GET_VALUE( order, derivativeFilter->GetOrder() ); double sigma = std::stod( argv[5] ); @@ -102,29 +102,29 @@ int itkDiscreteGaussianDerivativeImageFilterTest( int argc, char* argv[] ) variance.Fill( sigma * sigma ); derivativeFilter->SetVariance( variance ); - TEST_SET_GET_VALUE( variance, derivativeFilter->GetVariance() ); + ITK_TEST_SET_GET_VALUE( variance, derivativeFilter->GetVariance() ); DerivativeFilterType::ArrayType maxError; maxError.Fill( maxErrorVal ); derivativeFilter->SetMaximumError( maxErrorVal ); - TEST_SET_GET_VALUE( maxError, derivativeFilter->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maxError, derivativeFilter->GetMaximumError() ); derivativeFilter->SetMaximumKernelWidth( maxKernelWidth ); - TEST_SET_GET_VALUE( maxKernelWidth, derivativeFilter->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maxKernelWidth, derivativeFilter->GetMaximumKernelWidth() ); bool useImageSpacing = true; - TEST_SET_GET_BOOLEAN( derivativeFilter, UseImageSpacing, useImageSpacing ); + ITK_TEST_SET_GET_BOOLEAN( derivativeFilter, UseImageSpacing, useImageSpacing ); bool normalizeAcrossScale = false; - TEST_SET_GET_BOOLEAN( derivativeFilter, NormalizeAcrossScale, normalizeAcrossScale ); + ITK_TEST_SET_GET_BOOLEAN( derivativeFilter, NormalizeAcrossScale, normalizeAcrossScale ); unsigned int internalNumberOfStreamDivisions = DerivativeFilterType::InputImageType::GetImageDimension() * DerivativeFilterType::InputImageType::GetImageDimension(); derivativeFilter->SetInternalNumberOfStreamDivisions( internalNumberOfStreamDivisions ); - TEST_SET_GET_VALUE( internalNumberOfStreamDivisions, + ITK_TEST_SET_GET_VALUE( internalNumberOfStreamDivisions, derivativeFilter->GetInternalNumberOfStreamDivisions() ); @@ -142,7 +142,7 @@ int itkDiscreteGaussianDerivativeImageFilterTest( int argc, char* argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/ImageFeature/test/itkHessianToObjectnessMeasureImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkHessianToObjectnessMeasureImageFilterTest.cxx index e6707b74cc6..d1b042b59ce 100644 --- a/Modules/Filtering/ImageFeature/test/itkHessianToObjectnessMeasureImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHessianToObjectnessMeasureImageFilterTest.cxx @@ -58,7 +58,7 @@ int itkHessianToObjectnessMeasureImageFilterTest( int argc, char *argv[] ) FileReaderType::Pointer imageReader = FileReaderType::New(); imageReader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( imageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageReader->Update() ); // Create a Gaussian filter @@ -67,7 +67,7 @@ int itkHessianToObjectnessMeasureImageFilterTest( int argc, char *argv[] ) // Create an objectness filter ObjectnessFilterType::Pointer objectnessFilter = ObjectnessFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( objectnessFilter, HessianToObjectnessMeasureImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( objectnessFilter, HessianToObjectnessMeasureImageFilter, ImageToImageFilter ); @@ -77,47 +77,47 @@ int itkHessianToObjectnessMeasureImageFilterTest( int argc, char *argv[] ) // Set the filter properties bool scaleObjectnessMeasure = false; - TEST_SET_GET_BOOLEAN( objectnessFilter, ScaleObjectnessMeasure, scaleObjectnessMeasure ); + ITK_TEST_SET_GET_BOOLEAN( objectnessFilter, ScaleObjectnessMeasure, scaleObjectnessMeasure ); bool brightObject = true; - TEST_SET_GET_BOOLEAN( objectnessFilter, BrightObject, brightObject ); + ITK_TEST_SET_GET_BOOLEAN( objectnessFilter, BrightObject, brightObject ); double alphaValue = 0.5; objectnessFilter->SetAlpha( alphaValue ); - TEST_SET_GET_VALUE( alphaValue, objectnessFilter->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alphaValue, objectnessFilter->GetAlpha() ); double betaValue = 0.5; objectnessFilter->SetBeta( betaValue ); - TEST_SET_GET_VALUE( betaValue, objectnessFilter->GetBeta() ); + ITK_TEST_SET_GET_VALUE( betaValue, objectnessFilter->GetBeta() ); double gammaValue = 0.5; objectnessFilter->SetGamma( gammaValue ); - TEST_SET_GET_VALUE( gammaValue, objectnessFilter->GetGamma() ); + ITK_TEST_SET_GET_VALUE( gammaValue, objectnessFilter->GetGamma() ); // Check that an exception is thrown if the object dimension is larger than // the image dimension objectnessFilter->SetObjectDimension( 3 ); - TRY_EXPECT_EXCEPTION( objectnessFilter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( objectnessFilter->Update() ); if( argc >= 3 ) { unsigned int objectDimension = std::stoi( argv[3] ); objectnessFilter->SetObjectDimension( objectDimension ); - TEST_SET_GET_VALUE( objectDimension, objectnessFilter->GetObjectDimension() ); + ITK_TEST_SET_GET_VALUE( objectDimension, objectnessFilter->GetObjectDimension() ); } if( argc >= 4 ) { brightObject = std::stoi( argv[4] ); objectnessFilter->SetBrightObject( brightObject ); - TEST_SET_GET_VALUE( brightObject, objectnessFilter->GetBrightObject() ); + ITK_TEST_SET_GET_VALUE( brightObject, objectnessFilter->GetBrightObject() ); } - TRY_EXPECT_NO_EXCEPTION( objectnessFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( objectnessFilter->Update() ); // Write the output image @@ -128,7 +128,7 @@ int itkHessianToObjectnessMeasureImageFilterTest( int argc, char *argv[] ) writer->SetInput( objectnessFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx index 20ab3e62588..a4b4deb53a2 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx @@ -374,58 +374,58 @@ int itkHoughTransform2DCirclesImageTest( int, char* [] ) HoughTransformFilterType::Pointer houghFilter = HoughTransformFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( houghFilter, HoughTransform2DCirclesImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( houghFilter, HoughTransform2DCirclesImageFilter, ImageToImageFilter ); double threshold = 2.3; houghFilter->SetThreshold( threshold ); - TEST_SET_GET_VALUE( threshold, houghFilter->GetThreshold() ); + ITK_TEST_SET_GET_VALUE( threshold, houghFilter->GetThreshold() ); double minMaxRadius = 16.2; houghFilter->SetRadius( minMaxRadius ); - TEST_SET_GET_VALUE( minMaxRadius, houghFilter->GetMinimumRadius() ); - TEST_SET_GET_VALUE( minMaxRadius, houghFilter->GetMaximumRadius() ); + ITK_TEST_SET_GET_VALUE( minMaxRadius, houghFilter->GetMinimumRadius() ); + ITK_TEST_SET_GET_VALUE( minMaxRadius, houghFilter->GetMaximumRadius() ); double minimumRadius = 2.1; houghFilter->SetMinimumRadius( minimumRadius ); - TEST_SET_GET_VALUE( minimumRadius, houghFilter->GetMinimumRadius() ); + ITK_TEST_SET_GET_VALUE( minimumRadius, houghFilter->GetMinimumRadius() ); double maximumRadius = 20.4; houghFilter->SetMaximumRadius( maximumRadius ); - TEST_SET_GET_VALUE( maximumRadius, houghFilter->GetMaximumRadius() ); + ITK_TEST_SET_GET_VALUE( maximumRadius, houghFilter->GetMaximumRadius() ); const double gradientNormThreshold = 1.1; houghFilter->SetGradientNormThreshold(gradientNormThreshold); - TEST_SET_GET_VALUE(gradientNormThreshold, houghFilter->GetGradientNormThreshold()); + ITK_TEST_SET_GET_VALUE(gradientNormThreshold, houghFilter->GetGradientNormThreshold()); double sigmaGradient = 1.2; houghFilter->SetSigmaGradient( sigmaGradient ); - TEST_SET_GET_VALUE( sigmaGradient, houghFilter->GetSigmaGradient() ); + ITK_TEST_SET_GET_VALUE( sigmaGradient, houghFilter->GetSigmaGradient() ); float discRadiusRatio = 1.1; houghFilter->SetDiscRadiusRatio( discRadiusRatio ); - TEST_SET_GET_VALUE( discRadiusRatio, houghFilter->GetDiscRadiusRatio() ); + ITK_TEST_SET_GET_VALUE( discRadiusRatio, houghFilter->GetDiscRadiusRatio() ); float variance = 10; houghFilter->SetVariance( variance ); - TEST_SET_GET_VALUE( variance, houghFilter->GetVariance() ); + ITK_TEST_SET_GET_VALUE( variance, houghFilter->GetVariance() ); float sweepAngle = 0.2; houghFilter->SetSweepAngle( sweepAngle ); - TEST_SET_GET_VALUE( sweepAngle, houghFilter->GetSweepAngle() ); + ITK_TEST_SET_GET_VALUE( sweepAngle, houghFilter->GetSweepAngle() ); auto numberOfCircles = static_cast< HoughTransformFilterType::CirclesListSizeType >( circles ); houghFilter->SetNumberOfCircles( numberOfCircles ); - TEST_SET_GET_VALUE( numberOfCircles, houghFilter->GetNumberOfCircles() ); + ITK_TEST_SET_GET_VALUE( numberOfCircles, houghFilter->GetNumberOfCircles() ); bool useImageSpacing = false; houghFilter->SetUseImageSpacing( useImageSpacing ); - TEST_SET_GET_VALUE( useImageSpacing, houghFilter->GetUseImageSpacing() ); + ITK_TEST_SET_GET_VALUE( useImageSpacing, houghFilter->GetUseImageSpacing() ); houghFilter->SetInput( caster->GetOutput() ); - TRY_EXPECT_EXCEPTION( houghFilter->GetCircles() ); + ITK_TRY_EXPECT_EXCEPTION( houghFilter->GetCircles() ); houghFilter->Update(); diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx index e3bcffedc61..ec22c0f52e8 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx @@ -210,29 +210,29 @@ int itkHoughTransform2DLinesImageTest( int, char* [] ) HoughTransformFilterType::Pointer houghFilter = HoughTransformFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( houghFilter, HoughTransform2DLinesImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( houghFilter, HoughTransform2DLinesImageFilter, ImageToImageFilter ); float threshold = 2.3; houghFilter->SetThreshold( threshold ); - TEST_SET_GET_VALUE( threshold, houghFilter->GetThreshold() ); + ITK_TEST_SET_GET_VALUE( threshold, houghFilter->GetThreshold() ); float angleResolution = 200.0; houghFilter->SetAngleResolution( angleResolution ); - TEST_SET_GET_VALUE( angleResolution, houghFilter->GetAngleResolution() ); + ITK_TEST_SET_GET_VALUE( angleResolution, houghFilter->GetAngleResolution() ); auto numberOfLines = static_cast< HoughTransformFilterType::LinesListSizeType >( lines ); houghFilter->SetNumberOfLines( numberOfLines ); - TEST_SET_GET_VALUE( numberOfLines, houghFilter->GetNumberOfLines() ); + ITK_TEST_SET_GET_VALUE( numberOfLines, houghFilter->GetNumberOfLines() ); float discRadius = 25.0; houghFilter->SetDiscRadius( discRadius ); - TEST_SET_GET_VALUE( discRadius, houghFilter->GetDiscRadius() ); + ITK_TEST_SET_GET_VALUE( discRadius, houghFilter->GetDiscRadius() ); float variance = 10; houghFilter->SetVariance( variance ); - TEST_SET_GET_VALUE( variance, houghFilter->GetVariance() ); + ITK_TEST_SET_GET_VALUE( variance, houghFilter->GetVariance() ); houghFilter->SetInput( threshFilter->GetOutput() ); diff --git a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx index 70684623674..38d6ff8a257 100644 --- a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx @@ -61,7 +61,7 @@ int itkSimpleContourExtractorImageFilterTest( int argc, char* argv [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SimpleContourExtractorImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SimpleContourExtractorImageFilter, BoxImageFilter ); itk::SimpleFilterWatcher watcher(filter, "filter"); @@ -79,19 +79,19 @@ int itkSimpleContourExtractorImageFilterTest( int argc, char* argv [] ) filter->SetInputForegroundValue( inputForegroundValue ); - TEST_SET_GET_VALUE( inputForegroundValue, filter->GetInputForegroundValue() ); + ITK_TEST_SET_GET_VALUE( inputForegroundValue, filter->GetInputForegroundValue() ); filter->SetInputBackgroundValue( inputBackgroundValue ); - TEST_SET_GET_VALUE( inputBackgroundValue, filter->GetInputBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( inputBackgroundValue, filter->GetInputBackgroundValue() ); filter->SetOutputForegroundValue( outputForegroundValue ); - TEST_SET_GET_VALUE( outputForegroundValue, filter->GetOutputForegroundValue() ); + ITK_TEST_SET_GET_VALUE( outputForegroundValue, filter->GetOutputForegroundValue() ); filter->SetOutputBackgroundValue( outputBackgroundValue ); - TEST_SET_GET_VALUE( outputBackgroundValue, filter->GetOutputBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( outputBackgroundValue, filter->GetOutputBackgroundValue() ); FilterType::InputSizeType radius; diff --git a/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTest.cxx index 3f13bdcd42b..040c7522f2c 100644 --- a/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTest.cxx @@ -36,7 +36,7 @@ int RunTest( int argc, char* argv[] ) typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); using OutImageType = itk::Image< OutPixelType, Dimension>; using WriterType = itk::ImageFileWriter< OutImageType >; @@ -48,7 +48,7 @@ int RunTest( int argc, char* argv[] ) typename FilterType::Pointer filter = FilterType::New(); //this does not work from within a templated method (GCC gives an error) - //EXERCISE_BASIC_OBJECT_METHODS(filter, UnsharpMaskImageFilter, ImageToImageFilter); + //ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, UnsharpMaskImageFilter, ImageToImageFilter); filter->SetInput( reader->GetOutput() ); @@ -67,25 +67,25 @@ int RunTest( int argc, char* argv[] ) bool clamp = itk::NumericTraits< typename FilterType::OutputPixelType >::IsInteger; filter->SetClamp( clamp ); - TEST_SET_GET_VALUE( clamp, filter->GetClamp() ); + ITK_TEST_SET_GET_VALUE( clamp, filter->GetClamp() ); if( clamp ) { filter->ClampOn(); - TEST_SET_GET_VALUE( true, filter->GetClamp() ); + ITK_TEST_SET_GET_VALUE( true, filter->GetClamp() ); } else { filter->ClampOff(); - TEST_SET_GET_VALUE( false, filter->GetClamp() ); + ITK_TEST_SET_GET_VALUE( false, filter->GetClamp() ); } - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); writer->SetInput( filter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << std::endl << "Test PASSED ! " << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTestSimple.cxx b/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTestSimple.cxx index a64247cb91b..c131b973cab 100644 --- a/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTestSimple.cxx +++ b/Modules/Filtering/ImageFeature/test/itkUnsharpMaskImageFilterTestSimple.cxx @@ -91,7 +91,7 @@ int itkUnsharpMaskImageFilterTestSimple( int, char* [] ) UnsharpMaskImageFilterFilterType::Pointer filter = UnsharpMaskImageFilterFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS(filter, UnsharpMaskImageFilter, ImageToImageFilter); + ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, UnsharpMaskImageFilter, ImageToImageFilter); itk::SimpleFilterWatcher watchit( filter ); @@ -102,7 +102,7 @@ int itkUnsharpMaskImageFilterTestSimple( int, char* [] ) UnsharpMaskImageFilterFilterType::InternalPrecisionType threshold = -0.1; filter->SetThreshold( threshold ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); // Set the filter properties @@ -130,30 +130,30 @@ int itkUnsharpMaskImageFilterTestSimple( int, char* [] ) UnsharpMaskImageFilterFilterType::InternalPrecisionType amount = 0.8; filter->SetAmount( amount ); - TEST_SET_GET_VALUE( amount, filter->GetAmount() ); + ITK_TEST_SET_GET_VALUE( amount, filter->GetAmount() ); threshold = 0.01; filter->SetThreshold( threshold ); - TEST_SET_GET_VALUE( threshold, filter->GetThreshold() ); + ITK_TEST_SET_GET_VALUE( threshold, filter->GetThreshold() ); bool clamp = itk::NumericTraits< UnsharpMaskImageFilterFilterType::OutputPixelType >::IsInteger; filter->SetClamp( clamp ); - TEST_SET_GET_VALUE( clamp, filter->GetClamp() ); + ITK_TEST_SET_GET_VALUE( clamp, filter->GetClamp() ); if( clamp ) { filter->ClampOn(); - TEST_SET_GET_VALUE( true, filter->GetClamp() ); + ITK_TEST_SET_GET_VALUE( true, filter->GetClamp() ); } else { filter->ClampOff(); - TEST_SET_GET_VALUE( false, filter->GetClamp() ); + ITK_TEST_SET_GET_VALUE( false, filter->GetClamp() ); } // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the Smart Pointer to the Filter Output // It is important to do it AFTER the filter is Updated diff --git a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx index 424aa4c40b4..3cc59ce40a6 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx @@ -101,7 +101,7 @@ int itkMaskNeighborhoodOperatorImageFilterTest(int ac, char* av[] ) FilterType::Pointer filter1 = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter1, MaskNeighborhoodOperatorImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter1, MaskNeighborhoodOperatorImageFilter, NeighborhoodOperatorImageFilter ); filter1->SetInput(input->GetOutput()); @@ -111,7 +111,7 @@ int itkMaskNeighborhoodOperatorImageFilterTest(int ac, char* av[] ) FilterType::Pointer filter2 = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter2, MaskNeighborhoodOperatorImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter2, MaskNeighborhoodOperatorImageFilter, NeighborhoodOperatorImageFilter ); filter2->SetInput(filter1->GetOutput()); diff --git a/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx b/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx index 750c1ece8c2..31ca5c84bd3 100644 --- a/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx +++ b/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx @@ -119,46 +119,46 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) using BandFilterType = itk::FrequencyBandImageFilter< ImageType3D >; auto passBandFilter = BandFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( passBandFilter, FrequencyBandImageFilter, UnaryFrequencyDomainFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( passBandFilter, FrequencyBandImageFilter, UnaryFrequencyDomainFilter ); passBandFilter->SetInput( image ); // Test exception cases BandFilterType::FrequencyValueType lowFreqThreshold = 0.5; passBandFilter->SetLowFrequencyThreshold( lowFreqThreshold ); - TEST_SET_GET_VALUE( lowFreqThreshold, passBandFilter->GetLowFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( lowFreqThreshold, passBandFilter->GetLowFrequencyThreshold() ); BandFilterType::FrequencyValueType highFreqThreshold = 0.0; passBandFilter->SetHighFrequencyThreshold( highFreqThreshold ); - TEST_SET_GET_VALUE( highFreqThreshold, passBandFilter->GetHighFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( highFreqThreshold, passBandFilter->GetHighFrequencyThreshold() ); - TRY_EXPECT_EXCEPTION( passBandFilter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( passBandFilter->Update() ); lowFreqThreshold = 0.0; passBandFilter->SetLowFrequencyThreshold( lowFreqThreshold ); - TEST_SET_GET_VALUE( lowFreqThreshold, passBandFilter->GetLowFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( lowFreqThreshold, passBandFilter->GetLowFrequencyThreshold() ); highFreqThreshold = 0.5; passBandFilter->SetHighFrequencyThreshold( highFreqThreshold ); - TEST_SET_GET_VALUE( highFreqThreshold, passBandFilter->GetHighFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( highFreqThreshold, passBandFilter->GetHighFrequencyThreshold() ); bool passBand = true; - TEST_SET_GET_BOOLEAN( passBandFilter, PassBand, passBand ); + ITK_TEST_SET_GET_BOOLEAN( passBandFilter, PassBand, passBand ); bool passLowFreqThreshold = true; - TEST_SET_GET_BOOLEAN( passBandFilter, PassLowFrequencyThreshold, passLowFreqThreshold ); + ITK_TEST_SET_GET_BOOLEAN( passBandFilter, PassLowFrequencyThreshold, passLowFreqThreshold ); bool passHighFreqThreshold = true; - TEST_SET_GET_BOOLEAN( passBandFilter, PassHighFrequencyThreshold, passHighFreqThreshold ); + ITK_TEST_SET_GET_BOOLEAN( passBandFilter, PassHighFrequencyThreshold, passHighFreqThreshold ); passBandFilter->SetPassBand( passLowFreqThreshold, passHighFreqThreshold ); - TEST_SET_GET_VALUE( passLowFreqThreshold, passBandFilter->GetPassLowFrequencyThreshold() ); - TEST_SET_GET_VALUE( passHighFreqThreshold, passBandFilter->GetPassHighFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( passLowFreqThreshold, passBandFilter->GetPassLowFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( passHighFreqThreshold, passBandFilter->GetPassHighFrequencyThreshold() ); - TRY_EXPECT_NO_EXCEPTION( passBandFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( passBandFilter->Update() ); // Stop-band auto stopBandFilter = BandFilterType::New(); @@ -171,10 +171,10 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) passLowFreqThreshold = false; passHighFreqThreshold = false; stopBandFilter->SetStopBand( passLowFreqThreshold, passHighFreqThreshold ); - TEST_SET_GET_VALUE( passLowFreqThreshold, stopBandFilter->GetPassLowFrequencyThreshold() ); - TEST_SET_GET_VALUE( passHighFreqThreshold, stopBandFilter->GetPassHighFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( passLowFreqThreshold, stopBandFilter->GetPassLowFrequencyThreshold() ); + ITK_TEST_SET_GET_VALUE( passHighFreqThreshold, stopBandFilter->GetPassHighFrequencyThreshold() ); - TRY_EXPECT_NO_EXCEPTION( stopBandFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( stopBandFilter->Update() ); // Regression test // Sum of bandPass and stopBand images with these settings should be equal @@ -206,17 +206,17 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) success = false; } - TRY_EXPECT_NO_EXCEPTION( passBandFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( passBandFilter->Update() ); // Test the non-radial cut-off. // Don't pass negative frequency thresholds. bool radialBand = false; - TEST_SET_GET_BOOLEAN( passBandFilter, RadialBand, radialBand ); + ITK_TEST_SET_GET_BOOLEAN( passBandFilter, RadialBand, radialBand ); bool passNegativeLowFrequencyThreshold = false; - TEST_SET_GET_BOOLEAN( passBandFilter, PassNegativeLowFrequencyThreshold, passNegativeLowFrequencyThreshold ); + ITK_TEST_SET_GET_BOOLEAN( passBandFilter, PassNegativeLowFrequencyThreshold, passNegativeLowFrequencyThreshold ); bool passNegativeHighFrequencyThreshold = false; - TEST_SET_GET_BOOLEAN( passBandFilter, PassNegativeHighFrequencyThreshold, passNegativeHighFrequencyThreshold ); + ITK_TEST_SET_GET_BOOLEAN( passBandFilter, PassNegativeHighFrequencyThreshold, passNegativeHighFrequencyThreshold ); passBandFilter->Update(); // Test with ShiftedIterator. @@ -231,7 +231,7 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) passLowFreqThreshold = false; passHighFreqThreshold = true; passBandShiftedFilter->SetPassBand( passLowFreqThreshold, passHighFreqThreshold ); - TRY_EXPECT_NO_EXCEPTION( passBandShiftedFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( passBandShiftedFilter->Update() ); // Stop-band with InPlaceOn auto stopBandInPlaceFilter = BandFilterType::New(); @@ -246,7 +246,7 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) passHighFreqThreshold = false; stopBandInPlaceFilter->SetStopBand( passLowFreqThreshold, passHighFreqThreshold ); - TRY_EXPECT_NO_EXCEPTION( stopBandInPlaceFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( stopBandInPlaceFilter->Update() ); std::cout << "Comparing stopBand and stopBandInPlaceFilter results" << std::endl; success &= compareImages( stopBandFilter->GetOutput(), stopBandInPlaceFilter->GetOutput() ); @@ -257,7 +257,7 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) using ConstRefFunctionType = UnaryFilterType::ConstRefFunctionType; auto testFilter = UnaryFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( testFilter, UnaryFrequencyDomainFilter, InPlaceImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( testFilter, UnaryFrequencyDomainFilter, InPlaceImageFilter ); struct TestStruct { @@ -286,13 +286,13 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) auto lambdaFilter = UnaryFilterType::New(); lambdaFilter->SetInput( image ); lambdaFilter->SetFunctor( inPlaceLambda ); - TRY_EXPECT_NO_EXCEPTION( lambdaFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( lambdaFilter->Update() ); // Test with C style function pointer auto cfpFilter = UnaryFilterType::New(); cfpFilter->SetInput( image ); cfpFilter->SetFunctor( static_cast< ConstRefFunctionType* >( TestStruct::ConstUnaryFunction ) ); - TRY_EXPECT_NO_EXCEPTION( cfpFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( cfpFilter->Update() ); // Test with std::functional auto stdFilter = UnaryFilterType::New(); @@ -300,13 +300,13 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) std::function< double( const UnaryFilterType::FrequencyIteratorType& ) > func1 = static_cast< ConstRefFunctionType* >( TestStruct::ConstUnaryFunction ); stdFilter->SetFunctor( func1 ); - TRY_EXPECT_NO_EXCEPTION( stdFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( stdFilter->Update() ); // Test with C style function pointer (in-place variant) auto cfpFilterIP = UnaryFilterType::New(); cfpFilterIP->SetInput( image ); cfpFilterIP->SetFunctor( static_cast< ValueFunctionType* >( TestStruct::UnaryFunction ) ); - TRY_EXPECT_NO_EXCEPTION( cfpFilterIP->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( cfpFilterIP->Update() ); // Test with std::functional (in-place variant) auto stdFilterIP = UnaryFilterType::New(); @@ -314,7 +314,7 @@ itkFrequencyBandImageFilterTest( int argc, char* argv[] ) std::function< void( UnaryFilterType::FrequencyIteratorType& ) > func2 = static_cast< ValueFunctionType* >( TestStruct::UnaryFunction ); stdFilterIP->SetFunctor( func2 ); - TRY_EXPECT_NO_EXCEPTION( stdFilterIP->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( stdFilterIP->Update() ); std::cout << "Comparing lambdaFilter and cfpFilter (const functor) results" << std::endl; success &= compareImages( lambdaFilter->GetOutput(), cfpFilter->GetOutput() ); diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx index be459d0b31a..42872e78578 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx @@ -64,11 +64,11 @@ int itkLabelMapToRGBImageFilterTest1(int argc, char * argv[]) functor.ResetColors(); functor.AddColor(0, 0, 255); - TEST_EXPECT_TRUE( colorizer->GetFunctor() != functor ); + ITK_TEST_EXPECT_TRUE( colorizer->GetFunctor() != functor ); colorizer->SetFunctor( functor ); - TEST_EXPECT_TRUE( ColorizerType::ConstPointer(colorizer)->GetFunctor() == functor ); + ITK_TEST_EXPECT_TRUE( ColorizerType::ConstPointer(colorizer)->GetFunctor() == functor ); colorizer->GetFunctor().AddColor(0, 255, 0); - TEST_EXPECT_TRUE( colorizer->GetFunctor() != functor ); + ITK_TEST_EXPECT_TRUE( colorizer->GetFunctor() != functor ); return 0; } diff --git a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx index b9e7e7e9a96..58fe835c243 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx @@ -42,7 +42,7 @@ int itkGradientImageFilterTest(int , char * [] ) // Set up filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); // Run test itk::Size<2> sz; @@ -73,7 +73,7 @@ int itkGradientImageFilterTest(int , char * [] ) //Test the OverrideBoundaryCondition setting; filter->OverrideBoundaryCondition( new PeriodicBoundaryType ); - EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); // Run test itk::Size<3> sz; diff --git a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx index 4b425e1bcfa..e8384e0bcbb 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx @@ -121,7 +121,7 @@ int itkGradientImageFilterTest2(int argc, char * argv[] ) using FilterType = itk::GradientImageFilter; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); const unsigned int dimension = iobase->GetNumberOfDimensions(); diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx index 17f5754532d..68b7f7bd36a 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFilterTest.cxx @@ -61,20 +61,20 @@ int BSpline( int argc, char *argv[] ) typename BSplinerType::ArrayType splineOrder = 3; bspliner->SetSplineOrder( 3 ); - TEST_SET_GET_VALUE( splineOrder, bspliner->GetSplineOrder() ); + ITK_TEST_SET_GET_VALUE( splineOrder, bspliner->GetSplineOrder() ); bspliner->SetSize( size ); - TEST_SET_GET_VALUE( size, bspliner->GetSize() ); + ITK_TEST_SET_GET_VALUE( size, bspliner->GetSize() ); bspliner->SetOrigin( origin ); - TEST_SET_GET_VALUE( origin, bspliner->GetOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, bspliner->GetOrigin() ); bspliner->SetSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, bspliner->GetSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, bspliner->GetSpacing() ); typename BSplinerType::DirectionType direction = reader->GetOutput()->GetDirection(); bspliner->SetDirection( direction ); - TEST_SET_GET_VALUE( direction, bspliner->GetDirection() ); + ITK_TEST_SET_GET_VALUE( direction, bspliner->GetDirection() ); try { @@ -152,7 +152,7 @@ int itkBSplineControlPointImageFilterTest( int argc, char *argv[] ) ScalarFieldType >; BSplinerType::Pointer bspliner = BSplinerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( bspliner, BSplineControlPointImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( bspliner, BSplineControlPointImageFilter, ImageToImageFilter ); int successOrFailure = EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx index 5a6f098d8e5..7d2118e42ba 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx @@ -62,7 +62,7 @@ int itkBSplineControlPointImageFunctionTest( int, char * [] ) using BSplinerType = itk::BSplineControlPointImageFunction; BSplinerType::Pointer bspliner = BSplinerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( bspliner, BSplineControlPointImageFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( bspliner, BSplineControlPointImageFunction, ImageFunction ); // Define the parametric domain [0, 1). diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest.cxx index 63a20dfa876..93b59f88eb2 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest.cxx @@ -87,48 +87,48 @@ int itkBSplineScatteredDataPointSetToImageFilterTest( int argc, char * argv [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter ); unsigned int splineOrder = 0u; - TRY_EXPECT_EXCEPTION( filter->SetSplineOrder( splineOrder ) ); + ITK_TRY_EXPECT_EXCEPTION( filter->SetSplineOrder( splineOrder ) ); FilterType::ArrayType splineOrderArray; splineOrderArray.Fill( 4u ); filter->SetSplineOrder( splineOrderArray ); - TEST_SET_GET_VALUE( splineOrderArray, filter->GetSplineOrder() ); + ITK_TEST_SET_GET_VALUE( splineOrderArray, filter->GetSplineOrder() ); splineOrder = 3u; filter->SetSplineOrder( splineOrder ); splineOrderArray.Fill( splineOrder ); - TEST_SET_GET_VALUE( splineOrderArray, filter->GetSplineOrder() ); + ITK_TEST_SET_GET_VALUE( splineOrderArray, filter->GetSplineOrder() ); unsigned numberOfLevels = 0u; - TRY_EXPECT_EXCEPTION( filter->SetNumberOfLevels( numberOfLevels ) ); + ITK_TRY_EXPECT_EXCEPTION( filter->SetNumberOfLevels( numberOfLevels ) ); FilterType::ArrayType numberOfLevelsArray; numberOfLevelsArray.Fill( 4u ); filter->SetNumberOfLevels( numberOfLevelsArray ); - TEST_SET_GET_VALUE( numberOfLevelsArray, filter->GetNumberOfLevels() ); + ITK_TEST_SET_GET_VALUE( numberOfLevelsArray, filter->GetNumberOfLevels() ); numberOfLevels = 3u; filter->SetNumberOfLevels( numberOfLevels ); numberOfLevelsArray.Fill( numberOfLevels ); - TEST_SET_GET_VALUE( numberOfLevelsArray, filter->GetNumberOfLevels() ); + ITK_TEST_SET_GET_VALUE( numberOfLevelsArray, filter->GetNumberOfLevels() ); FilterType::ArrayType ncps; ncps.Fill( 4u ); filter->SetNumberOfControlPoints( ncps ); - TEST_SET_GET_VALUE( ncps, filter->GetNumberOfControlPoints() ); + ITK_TEST_SET_GET_VALUE( ncps, filter->GetNumberOfControlPoints() ); FilterType::ArrayType close; close.Fill( 0u ); filter->SetCloseDimension( close ); - TEST_SET_GET_VALUE( close, filter->GetCloseDimension() ); + ITK_TEST_SET_GET_VALUE( close, filter->GetCloseDimension() ); // Define the parametric domain. @@ -139,7 +139,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest( int argc, char * argv [] ) filter->SetInput( pointSet ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the current number of control points to increase coverage std::cout << "Current number of control points: " @@ -170,7 +170,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest( int argc, char * argv [] ) writer->SetInput( image ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx index fae820c40a6..c412b84578c 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx @@ -74,7 +74,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest2( int argc, char * argv[] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter ); // Define the parametric domain @@ -92,7 +92,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest2( int argc, char * argv[] ) FilterType::RealType bSplineEpsilon = 1e-4; filter->SetBSplineEpsilon( bSplineEpsilon ); - TEST_SET_GET_VALUE( bSplineEpsilon, filter->GetBSplineEpsilon() ); + ITK_TEST_SET_GET_VALUE( bSplineEpsilon, filter->GetBSplineEpsilon() ); filter->SetSplineOrder( 3 ); FilterType::ArrayType ncps; @@ -114,7 +114,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest2( int argc, char * argv[] ) } filter->SetPointWeights( pointWeights ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); pointWeights->resize( filter->GetInput()->GetNumberOfPoints() ); for( unsigned int i = 0; i < pointWeights->Size(); ++i ) @@ -123,7 +123,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest2( int argc, char * argv[] ) } filter->SetPointWeights( pointWeights ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Cast the PhiLattice using CastImageFilterType = @@ -137,7 +137,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest2( int argc, char * argv[] ) writer->SetFileName( argv[1] ); writer->SetInput( caster->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx index de25ac9c298..034640e1247 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx @@ -91,7 +91,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest3( int argc, char * argv [] FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter ); // Define the parametric domain @@ -119,16 +119,16 @@ int itkBSplineScatteredDataPointSetToImageFilterTest3( int argc, char * argv [] bool generateOutputImage = true; filter->SetGenerateOutputImage( generateOutputImage ); - TEST_SET_GET_VALUE( generateOutputImage, filter->GetGenerateOutputImage() ); + ITK_TEST_SET_GET_VALUE( generateOutputImage, filter->GetGenerateOutputImage() ); filter->GenerateOutputImageOff(); - TEST_SET_GET_VALUE( false, filter->GetGenerateOutputImage() ); + ITK_TEST_SET_GET_VALUE( false, filter->GetGenerateOutputImage() ); filter->GenerateOutputImageOn(); - TEST_SET_GET_VALUE( true, filter->GetGenerateOutputImage() ); + ITK_TEST_SET_GET_VALUE( true, filter->GetGenerateOutputImage() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output ImageType::Pointer outputImage = filter->GetOutput(); @@ -149,7 +149,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest3( int argc, char * argv [] writer->SetInput( caster->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx index 902418439d0..01f0b1857ba 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx @@ -137,7 +137,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest4( int, char * [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter ); // Define the parametric domain. @@ -169,7 +169,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest4( int, char * [] ) filter->SetCloseDimension( close ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Instantiate the BSpline transform diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx index d904871be7f..39b372672a8 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx @@ -82,7 +82,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest5( int argc, char * argv[] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter ); // Define the parametric domain @@ -117,7 +117,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest5( int argc, char * argv[] ) filter->SetCloseDimension( close ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Cast the PhiLattice using CastImageFilterType = @@ -131,7 +131,7 @@ int itkBSplineScatteredDataPointSetToImageFilterTest5( int argc, char * argv[] ) writer->SetFileName( argv[1] ); writer->SetInput( caster->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx index e41923647dd..6e9f9f639ed 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx @@ -58,7 +58,7 @@ int itkBinShrinkImageFilterTest1( int , char *[] ) BinShrinkFilterType::Pointer bin = BinShrinkFilterType::New(); // Exercise some methods for coverage - EXERCISE_BASIC_OBJECT_METHODS( bin, BinShrinkImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( bin, BinShrinkImageFilter, ImageToImageFilter ); bin->SetInput( monitor1->GetOutput() ); @@ -66,27 +66,27 @@ int itkBinShrinkImageFilterTest1( int , char *[] ) itk::ModifiedTimeType t = bin->GetMTime(); std::cout << bin; - TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); + ITK_TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); // test no change bin->SetShrinkFactors(1); - TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); - TEST_EXPECT_EQUAL(t, bin->GetMTime()); + ITK_TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); + ITK_TEST_EXPECT_EQUAL(t, bin->GetMTime()); // test zero value bin->SetShrinkFactors(0); - TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); - TEST_EXPECT_TRUE( t != bin->GetMTime() ); + ITK_TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); + ITK_TEST_EXPECT_TRUE( t != bin->GetMTime() ); t = bin->GetMTime(); // no change bin->SetShrinkFactor(0,1); - TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); - TEST_EXPECT_EQUAL(t, bin->GetMTime()); + ITK_TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); + ITK_TEST_EXPECT_EQUAL(t, bin->GetMTime()); bin->SetShrinkFactor(0,2); - TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 2 ); - TEST_EXPECT_TRUE( t != bin->GetMTime() ); + ITK_TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 2 ); + ITK_TEST_EXPECT_TRUE( t != bin->GetMTime() ); using OutputMonitorFilterType = itk::PipelineMonitorImageFilter; diff --git a/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx b/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx index 473c61c6aa1..8342565be15 100644 --- a/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx @@ -53,7 +53,7 @@ int itkCropImageFilter3DTest( int, char* [] ) itk::CropImageFilter< ImageType, ImageType> ::Pointer cropFilter = itk::CropImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( cropFilter, CropImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( cropFilter, CropImageFilter, ExtractImageFilter ); cropFilter->SetInput( image ); @@ -64,12 +64,12 @@ int itkCropImageFilter3DTest( int, char* [] ) cropFilter->SetBoundaryCropSize( extractSize ); cropFilter->SetUpperBoundaryCropSize( extractSize ); - TEST_SET_GET_VALUE( extractSize, cropFilter->GetUpperBoundaryCropSize() ); + ITK_TEST_SET_GET_VALUE( extractSize, cropFilter->GetUpperBoundaryCropSize() ); cropFilter->SetLowerBoundaryCropSize( extractSize ); - TEST_SET_GET_VALUE( extractSize, cropFilter->GetLowerBoundaryCropSize() ); + ITK_TEST_SET_GET_VALUE( extractSize, cropFilter->GetLowerBoundaryCropSize() ); - TRY_EXPECT_NO_EXCEPTION( cropFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( cropFilter->Update() ); ImageType::Pointer croppedImage = cropFilter->GetOutput(); diff --git a/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx index 16b3d3d98a1..2723e548757 100644 --- a/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx @@ -58,7 +58,7 @@ int itkCropImageFilterTest( int, char* [] ) itk::CropImageFilter< ImageType, ImageType >::Pointer cropFilter = itk::CropImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( cropFilter, CropImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( cropFilter, CropImageFilter, ExtractImageFilter ); itk::SimpleFilterWatcher watcher( cropFilter ); @@ -74,10 +74,10 @@ int itkCropImageFilterTest( int, char* [] ) cropFilter->SetBoundaryCropSize( extractSize ); cropFilter->SetUpperBoundaryCropSize( extractSize ); - TEST_SET_GET_VALUE( extractSize, cropFilter->GetUpperBoundaryCropSize() ); + ITK_TEST_SET_GET_VALUE( extractSize, cropFilter->GetUpperBoundaryCropSize() ); cropFilter->SetLowerBoundaryCropSize( extractSize ); - TEST_SET_GET_VALUE( extractSize, cropFilter->GetLowerBoundaryCropSize() ); + ITK_TEST_SET_GET_VALUE( extractSize, cropFilter->GetLowerBoundaryCropSize() ); cropFilter->UpdateLargestPossibleRegion(); diff --git a/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx index b6036eceff1..09311c28d85 100644 --- a/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx @@ -78,7 +78,7 @@ int itkFlipImageFilterTest( int argc, char* argv[] ) // Flip the image FlipperType::Pointer flipper = FlipperType::New(); - EXERCISE_BASIC_OBJECT_METHODS( flipper, FlipImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( flipper, FlipImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watcher( flipper, "FlipImageFilter" ); @@ -86,10 +86,10 @@ int itkFlipImageFilterTest( int argc, char* argv[] ) FlipperType::FlipAxesArrayType flipAxes( bArray ); flipper->SetFlipAxes( flipAxes ); - TEST_SET_GET_VALUE( flipAxes, flipper->GetFlipAxes() ); + ITK_TEST_SET_GET_VALUE( flipAxes, flipper->GetFlipAxes() ); auto flipAboutOrigin = static_cast< bool >( std::stoi( argv[1] ) ); - TEST_SET_GET_BOOLEAN( flipper, FlipAboutOrigin, flipAboutOrigin ); + ITK_TEST_SET_GET_BOOLEAN( flipper, FlipAboutOrigin, flipAboutOrigin ); flipper->SetInput( inputImage ); diff --git a/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx index ac8ae234d09..249aa87b142 100644 --- a/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx @@ -138,7 +138,7 @@ int test2DInterpolateImagePointsFilter() // Initialize InterpolateImagePointsFilter InterpolatorType2D::Pointer resamp = InterpolatorType2D::New(); - EXERCISE_BASIC_OBJECT_METHODS( resamp, InterpolateImagePointsFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resamp, InterpolateImagePointsFilter, ImageToImageFilter ); unsigned int splineOrder = 3; resamp->GetInterpolator()->SetSplineOrder(splineOrder); @@ -149,7 +149,7 @@ int test2DInterpolateImagePointsFilter() InterpolatorType2D::PixelType defaultPixelValue = DEFAULTPIXELVALUE; resamp->SetDefaultPixelValue( defaultPixelValue ); - TEST_SET_GET_VALUE( defaultPixelValue, resamp->GetDefaultPixelValue() ); + ITK_TEST_SET_GET_VALUE( defaultPixelValue, resamp->GetDefaultPixelValue() ); resamp->Update(); resamp->Print(std::cout); @@ -195,7 +195,7 @@ int test3DInterpolateImagePointsFilter() // Initialize InterpolateImagePointsFilter and set input image InterpolatorType3D::Pointer resamp = InterpolatorType3D::New(); - EXERCISE_BASIC_OBJECT_METHODS( resamp, InterpolateImagePointsFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resamp, InterpolateImagePointsFilter, ImageToImageFilter ); unsigned int splineOrder = 3; resamp->GetInterpolator()->SetSplineOrder(splineOrder); diff --git a/Modules/Filtering/ImageGrid/test/itkMirrorPadImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkMirrorPadImageFilterTest.cxx index 762d8d99e1d..537907c2a3e 100644 --- a/Modules/Filtering/ImageGrid/test/itkMirrorPadImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkMirrorPadImageFilterTest.cxx @@ -34,7 +34,7 @@ int RunTest( int argc, char* argv[] ) typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); using OutImageType = itk::Image< OutPixelType, Dimension>; using WriterType = itk::ImageFileWriter< OutImageType >; @@ -63,9 +63,9 @@ int RunTest( int argc, char* argv[] ) } filter->SetInput( reader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); writer->SetInput( filter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << std::endl << "Test PASSED ! " << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx index 1676855190a..01543d39ac0 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx @@ -71,7 +71,7 @@ int itkOrientImageFilterTest(int, char *[]) itk::OrientImageFilter::Pointer orienter = itk::OrientImageFilter::New(); - EXERCISE_BASIC_OBJECT_METHODS( orienter, OrientImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( orienter, OrientImageFilter, ImageToImageFilter ); orienter->SetGivenCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP); orienter->SetInput(randImage); diff --git a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx index 0682c6ea53b..e38e8c8af6e 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx @@ -178,7 +178,7 @@ int itkOrientImageFilterTest2(int, char *[]) itk::OrientImageFilter::Pointer orienter = itk::OrientImageFilter::New(); - EXERCISE_BASIC_OBJECT_METHODS( orienter, OrientImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( orienter, OrientImageFilter, ImageToImageFilter ); orienter->UseImageDirectionOn(); orienter->SetInput(axialImage); diff --git a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx index ce740b7eaab..b678e847606 100644 --- a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx @@ -47,14 +47,14 @@ int itkPasteImageFilterTest( int argc, char* argv[] ) src->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( src->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( src->Update() ); // Create the filter using FilterType = itk::PasteImageFilter< ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, PasteImageFilter, InPlaceImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, PasteImageFilter, InPlaceImageFilter ); filter->SetDestinationImage( dest->GetOutput() ); filter->SetSourceImage( src->GetOutput() ); @@ -63,7 +63,7 @@ int itkPasteImageFilterTest( int argc, char* argv[] ) destIndex[0] = 100; destIndex[1] = 70; filter->SetDestinationIndex( destIndex ); - TEST_SET_GET_VALUE( destIndex, filter->GetDestinationIndex() ); + ITK_TEST_SET_GET_VALUE( destIndex, filter->GetDestinationIndex() ); FilterType::InputImageIndexType srcIndex; FilterType::InputImageSizeType srcSize; @@ -79,9 +79,9 @@ int itkPasteImageFilterTest( int argc, char* argv[] ) srcRegion.SetSize( srcSize ); filter->SetSourceRegion( srcRegion ); - TEST_SET_GET_VALUE( srcRegion, filter->GetSourceRegion() ); + ITK_TEST_SET_GET_VALUE( srcRegion, filter->GetSourceRegion() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // We'll tie this to a streamer to really exercise the paste code using SplitterType = itk::ImageRegionSplitterMultidimensional; @@ -114,7 +114,7 @@ int itkPasteImageFilterTest( int argc, char* argv[] ) writer->SetInput( streamer->GetOutput() ); writer->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx index 51f734fd197..11a469dd2c7 100644 --- a/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx @@ -43,7 +43,7 @@ int itkRegionOfInterestImageFilterTest( int, char* [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, RegionOfInterestImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, RegionOfInterestImageFilter, ImageToImageFilter ); ImageType::Pointer image = ImageType::New(); @@ -101,7 +101,7 @@ int itkRegionOfInterestImageFilterTest( int, char* [] ) itk::SimpleFilterWatcher watcher(filter); filter->SetRegionOfInterest( regionOfInterest ); - TEST_SET_GET_VALUE( regionOfInterest, filter->GetRegionOfInterest() ); + ITK_TEST_SET_GET_VALUE( regionOfInterest, filter->GetRegionOfInterest() ); filter->Update(); diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx index 616751eeddb..c5ba6e46974 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx @@ -74,33 +74,33 @@ int itkResampleImageTest(int, char* [] ) itk::ResampleImageFilter< ImageType, ImageType >::Pointer resample = itk::ResampleImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); resample->SetInput(image); - TEST_SET_GET_VALUE( image, resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( image, resample->GetInput() ); resample->SetSize(size); - TEST_SET_GET_VALUE( size, resample->GetSize() ); + ITK_TEST_SET_GET_VALUE( size, resample->GetSize() ); resample->SetTransform(aff); - TEST_SET_GET_VALUE( aff, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( aff, resample->GetTransform() ); resample->SetInterpolator(interp); - TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); index.Fill( 0 ); resample->SetOutputStartIndex( index ); - TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); + ITK_TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); ImageType::PointType origin; origin.Fill( 0.0 ); resample->SetOutputOrigin( origin ); - TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); ImageType::SpacingType spacing; spacing.Fill( 1.0 ); resample->SetOutputSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); // Run the resampling filter diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx index 600adbb03a9..a7e2b33d2e1 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx @@ -121,22 +121,22 @@ int itkResampleImageTest2(int argc, char * argv[]) ResampleFilterType::Pointer resample = ResampleFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS(resample, ResampleImageFilter, ImageToImageFilter); + ITK_EXERCISE_BASIC_OBJECT_METHODS(resample, ResampleImageFilter, ImageToImageFilter); - TRY_EXPECT_NO_EXCEPTION( reader1->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader1->Update() ); resample->SetInput(reader1->GetOutput()); - TEST_SET_GET_VALUE(reader1->GetOutput(), resample->GetInput()); + ITK_TEST_SET_GET_VALUE(reader1->GetOutput(), resample->GetInput()); resample->SetTransform(affineTransform); - TEST_SET_GET_VALUE(affineTransform, resample->GetTransform()); + ITK_TEST_SET_GET_VALUE(affineTransform, resample->GetTransform()); resample->SetInterpolator(interpolator); - TEST_SET_GET_VALUE(interpolator, resample->GetInterpolator()); + ITK_TEST_SET_GET_VALUE(interpolator, resample->GetInterpolator()); bool useReferenceImage = std::stoi( argv[7] ); - TEST_SET_GET_BOOLEAN( resample, UseReferenceImage, useReferenceImage ); + ITK_TEST_SET_GET_BOOLEAN( resample, UseReferenceImage, useReferenceImage ); // If the reference image is to be used, read it and set it to the filter; @@ -145,10 +145,10 @@ int itkResampleImageTest2(int argc, char * argv[]) { reader2->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( reader2->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader2->Update() ); resample->SetReferenceImage( reader2->GetOutput() ); - TEST_SET_GET_VALUE( reader2->GetOutput(), resample->GetReferenceImage() ); + ITK_TEST_SET_GET_VALUE( reader2->GetOutput(), resample->GetReferenceImage() ); } else { @@ -186,23 +186,23 @@ int itkResampleImageTest2(int argc, char * argv[]) resample->GetInput()->GetOrigin(); resample->SetOutputSpacing( outputSpacing ); - TEST_SET_GET_VALUE( outputSpacing, resample->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( outputSpacing, resample->GetOutputSpacing() ); resample->SetSize( outputSize ); - TEST_SET_GET_VALUE( outputSize, resample->GetSize() ); + ITK_TEST_SET_GET_VALUE( outputSize, resample->GetSize() ); resample->SetOutputOrigin( outputOrigin ); - TEST_SET_GET_VALUE( outputOrigin, resample->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( outputOrigin, resample->GetOutputOrigin() ); resample->SetOutputDirection( outputDirection ); - TEST_SET_GET_VALUE( outputDirection, resample->GetOutputDirection() ); + ITK_TEST_SET_GET_VALUE( outputDirection, resample->GetOutputDirection() ); } // Run the resampling filter with the normal, linear, affine transform. // This will use ResampleImageFilter::LinearThreadedGenerateData(). std::cout << "Test with normal AffineTransform." << std::endl; - TRY_EXPECT_NO_EXCEPTION(resample->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(resample->Update()); writer1->SetInput(resample->GetOutput()); @@ -217,7 +217,7 @@ int itkResampleImageTest2(int argc, char * argv[]) } } - TRY_EXPECT_NO_EXCEPTION( writer1->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer1->Update() ); // Assign an affine transform that returns @@ -232,11 +232,11 @@ int itkResampleImageTest2(int argc, char * argv[]) nonlinearAffineTransform->Scale(2.0); resample->SetTransform( nonlinearAffineTransform ); - TRY_EXPECT_NO_EXCEPTION( resample->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( resample->Update() ); writer2->SetInput( resample->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer2->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer2->Update() ); // Instead of using the default pixel when sampling outside the input image, @@ -244,13 +244,13 @@ int itkResampleImageTest2(int argc, char * argv[]) std::cout << "Test with nearest neighbor extrapolator, affine transform." << std::endl; resample->SetTransform( affineTransform ); resample->SetExtrapolator( extrapolator ); - TEST_SET_GET_VALUE( extrapolator, resample->GetExtrapolator() ); + ITK_TEST_SET_GET_VALUE( extrapolator, resample->GetExtrapolator() ); - TRY_EXPECT_NO_EXCEPTION( resample->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( resample->Update() ); writer3->SetInput( resample->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer3->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer3->Update() ); // Instead of using the default pixel when sampling outside the input image, @@ -258,11 +258,11 @@ int itkResampleImageTest2(int argc, char * argv[]) std::cout << "Test with nearest neighbor extrapolator, nonlinear transform." << std::endl; resample->SetTransform( nonlinearAffineTransform ); - TRY_EXPECT_NO_EXCEPTION( resample->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( resample->Update() ); writer4->SetInput( resample->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer4->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer4->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2Streaming.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2Streaming.cxx index d653827b17b..e065a8bc27b 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2Streaming.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2Streaming.cxx @@ -119,25 +119,25 @@ int itkResampleImageTest2Streaming( int argc, char * argv [] ) using MonitorFilterType = itk::PipelineMonitorImageFilter< ImageType >; MonitorFilterType::Pointer monitor = MonitorFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); monitor->SetInput( reader1->GetOutput() ); - TEST_SET_GET_VALUE( reader1->GetOutput(), monitor->GetInput() ); + ITK_TEST_SET_GET_VALUE( reader1->GetOutput(), monitor->GetInput() ); resample->SetReferenceImage( reader2->GetOutput() ); - TEST_SET_GET_VALUE( reader2->GetOutput(), resample->GetReferenceImage() ); + ITK_TEST_SET_GET_VALUE( reader2->GetOutput(), resample->GetReferenceImage() ); resample->UseReferenceImageOn(); - TEST_EXPECT_TRUE( resample->GetUseReferenceImage() ); + ITK_TEST_EXPECT_TRUE( resample->GetUseReferenceImage() ); resample->SetTransform( affineTransform ); - TEST_SET_GET_VALUE( affineTransform, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( affineTransform, resample->GetTransform() ); resample->SetInterpolator( interpolator ); - TEST_SET_GET_VALUE( interpolator, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interpolator, resample->GetInterpolator() ); resample->SetInput( monitor->GetOutput() ); - TEST_SET_GET_VALUE( monitor->GetOutput(), resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( monitor->GetOutput(), resample->GetInput() ); writer1->SetInput( resample->GetOutput() ); // Check GetReferenceImage @@ -153,7 +153,7 @@ int itkResampleImageTest2Streaming( int argc, char * argv [] ) std::cout << "Test with normal AffineTransform." << std::endl; writer1->SetNumberOfStreamDivisions(8); //split into 8 pieces for streaming. monitor->ClearPipelineSavedInformation(); - TRY_EXPECT_NO_EXCEPTION( writer1->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer1->Update() ); if( !monitor->VerifyInputFilterExecutedStreaming(8) ) { @@ -177,7 +177,7 @@ int itkResampleImageTest2Streaming( int argc, char * argv [] ) monitor->ClearPipelineSavedInformation(); writer2->SetInput( resample->GetOutput() ); writer2->SetNumberOfStreamDivisions(8); - TRY_EXPECT_NO_EXCEPTION( writer2->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer2->Update() ); std::cout << "We demanded splitting into 8 pieces for streaming, \ but faked non-linearity should disable streaming." << std::endl; @@ -196,7 +196,7 @@ but faked non-linearity should disable streaming." << std::endl; writer3->SetInput( resample->GetOutput() ); std::cout << "Test with nearest neighbor extrapolator, affine transform." << std::endl; writer3->SetNumberOfStreamDivisions(8); //split into 8 pieces for streaming. - TRY_EXPECT_NO_EXCEPTION( writer3->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer3->Update() ); // Instead of using the default pixel when sampling outside the input image, // we use a nearest neighbor extrapolator. @@ -204,7 +204,7 @@ but faked non-linearity should disable streaming." << std::endl; writer4->SetInput( resample->GetOutput() ); std::cout << "Test with nearest neighbor extrapolator, nonlinear transform." << std::endl; writer4->SetNumberOfStreamDivisions(8); //demand splitting into 8 pieces for streaming, but faked non-linearity will disable streaming - TRY_EXPECT_NO_EXCEPTION( writer4->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer4->Update() ); std::cout << "Test passed." << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx index cb650543d46..f631fda2bf2 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx @@ -88,22 +88,22 @@ int itkResampleImageTest3(int argc, char * argv [] ) // Create and configure a resampling filter ResampleFilterType::Pointer resample = ResampleFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); resample->SetInput( reader1->GetOutput() ); - TEST_SET_GET_VALUE( reader1->GetOutput(), resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( reader1->GetOutput(), resample->GetInput() ); resample->SetReferenceImage( changeInfo->GetOutput() ); - TEST_SET_GET_VALUE( changeInfo->GetOutput(), resample->GetReferenceImage() ); + ITK_TEST_SET_GET_VALUE( changeInfo->GetOutput(), resample->GetReferenceImage() ); resample->UseReferenceImageOn(); - TEST_EXPECT_TRUE( resample->GetUseReferenceImage() ); + ITK_TEST_EXPECT_TRUE( resample->GetUseReferenceImage() ); resample->SetTransform( identityTransform ); - TEST_SET_GET_VALUE( identityTransform, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( identityTransform, resample->GetTransform() ); resample->SetInterpolator( interpolator ); - TEST_SET_GET_VALUE( interpolator, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interpolator, resample->GetInterpolator() ); WriterType::Pointer writer1 = WriterType::New(); writer1->SetFileName( argv[2] ); diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx index 05e13593ed8..c1112d3fd31 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx @@ -88,33 +88,33 @@ int itkResampleImageTest4(int argc, char * argv [] ) itk::ResampleImageFilter< ImageType, ImageType >::Pointer resample = itk::ResampleImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); resample->SetInterpolator(interp); resample->SetInput(image); - TEST_SET_GET_VALUE( image, resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( image, resample->GetInput() ); resample->SetSize(osize); - TEST_SET_GET_VALUE( osize, resample->GetSize() ); + ITK_TEST_SET_GET_VALUE( osize, resample->GetSize() ); resample->SetTransform(aff); - TEST_SET_GET_VALUE( aff, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( aff, resample->GetTransform() ); resample->SetInterpolator(interp); - TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); index.Fill( 0 ); resample->SetOutputStartIndex( index ); - TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); + ITK_TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); ImageType::PointType origin; origin.Fill( 0.0 ); resample->SetOutputOrigin( origin ); - TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); resample->SetOutputSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); // Run the resampling filter itk::TimeProbe clock; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx index 6f47183403a..247fbc5bdb6 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx @@ -96,31 +96,31 @@ int itkResampleImageTest5(int argc, char * argv [] ) itk::ResampleImageFilter< ImageType, ImageType >::Pointer resample = itk::ResampleImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); resample->SetInput(image); - TEST_SET_GET_VALUE( image, resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( image, resample->GetInput() ); resample->SetSize(osize); - TEST_SET_GET_VALUE( osize, resample->GetSize() ); + ITK_TEST_SET_GET_VALUE( osize, resample->GetSize() ); resample->SetTransform(aff); - TEST_SET_GET_VALUE( aff, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( aff, resample->GetTransform() ); resample->SetInterpolator(interp); - TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); index.Fill( 0 ); resample->SetOutputStartIndex( index ); - TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); + ITK_TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); ImageType::PointType origin; origin.Fill( 0.0 ); resample->SetOutputOrigin( origin ); - TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); resample->SetOutputSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); // Run the resampling filter itk::TimeProbe clock; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx index 41bf25742d9..74cecf2bb85 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx @@ -104,31 +104,31 @@ int itkResampleImageTest6(int argc, char * argv [] ) itk::ResampleImageFilter< ImageType, ImageType >::Pointer resample = itk::ResampleImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); resample->SetInput(image); - TEST_SET_GET_VALUE( image, resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( image, resample->GetInput() ); resample->SetSize(osize); - TEST_SET_GET_VALUE( osize, resample->GetSize() ); + ITK_TEST_SET_GET_VALUE( osize, resample->GetSize() ); resample->SetTransform(aff); - TEST_SET_GET_VALUE( aff, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( aff, resample->GetTransform() ); resample->SetInterpolator(interp); - TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); index.Fill( 0 ); resample->SetOutputStartIndex( index ); - TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); + ITK_TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); ImageType::PointType origin; origin.Fill( 0.0 ); resample->SetOutputOrigin( origin ); - TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); resample->SetOutputSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); // Run the resampling filter itk::TimeProbe clock; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx index be3ff0afbfa..b5f3e3fe6ab 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx @@ -78,34 +78,34 @@ int itkResampleImageTest7( int , char *[] ) itk::ResampleImageFilter< ImageType, ImageType >::Pointer resample = itk::ResampleImageFilter< ImageType, ImageType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( resample, ResampleImageFilter, ImageToImageFilter ); resample->SetInterpolator(interp); resample->SetInput( image ); - TEST_SET_GET_VALUE( image.GetPointer(), resample->GetInput() ); + ITK_TEST_SET_GET_VALUE( image.GetPointer(), resample->GetInput() ); resample->SetSize( size ); - TEST_SET_GET_VALUE( size, resample->GetSize() ); + ITK_TEST_SET_GET_VALUE( size, resample->GetSize() ); resample->SetTransform(aff); - TEST_SET_GET_VALUE( aff, resample->GetTransform() ); + ITK_TEST_SET_GET_VALUE( aff, resample->GetTransform() ); resample->SetInterpolator(interp); - TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interp, resample->GetInterpolator() ); index.Fill( 0 ); resample->SetOutputStartIndex( index ); - TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); + ITK_TEST_SET_GET_VALUE( index, resample->GetOutputStartIndex() ); ImageType::PointType origin; origin.Fill( 0.0 ); resample->SetOutputOrigin( origin ); - TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); + ITK_TEST_SET_GET_VALUE( origin, resample->GetOutputOrigin() ); ImageType::SpacingType spacing; spacing.Fill( 1.0 ); resample->SetOutputSpacing( spacing ); - TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); + ITK_TEST_SET_GET_VALUE( spacing, resample->GetOutputSpacing() ); using StreamerType = itk::StreamingImageFilter; StreamerType::Pointer streamer = StreamerType::New(); @@ -118,7 +118,7 @@ int itkResampleImageTest7( int , char *[] ) // Run the resampling filter without streaming, i.e. 1 StreamDivisions numStreamDiv= 1; // do not split, i.e. do not stream streamer->SetNumberOfStreamDivisions(numStreamDiv); - TRY_EXPECT_NO_EXCEPTION( streamer->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( streamer->UpdateLargestPossibleRegion() ); ImagePointerType outputNoSDI = streamer->GetOutput(); // save output for later comparison outputNoSDI->DisconnectPipeline(); // disconnect to create new output @@ -127,14 +127,14 @@ int itkResampleImageTest7( int , char *[] ) image->Modified(); numStreamDiv= 8; // split into numStream pieces for streaming. streamer->SetNumberOfStreamDivisions(numStreamDiv); - TRY_EXPECT_NO_EXCEPTION( streamer->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( streamer->UpdateLargestPossibleRegion() ); // Verify that we only requested a smaller chunk when streaming const ImageRegionType finalRequestedRegion( image->GetRequestedRegion() ); - TEST_SET_GET_VALUE( 0, finalRequestedRegion.GetIndex(0) ); - TEST_SET_GET_VALUE( 48, finalRequestedRegion.GetIndex(1) ); - TEST_SET_GET_VALUE( 60, finalRequestedRegion.GetSize(0) ); - TEST_SET_GET_VALUE( 12, finalRequestedRegion.GetSize(1) ); + ITK_TEST_SET_GET_VALUE( 0, finalRequestedRegion.GetIndex(0) ); + ITK_TEST_SET_GET_VALUE( 48, finalRequestedRegion.GetIndex(1) ); + ITK_TEST_SET_GET_VALUE( 60, finalRequestedRegion.GetSize(0) ); + ITK_TEST_SET_GET_VALUE( 12, finalRequestedRegion.GetSize(1) ); ImagePointerType outputSDI = streamer->GetOutput(); outputSDI->DisconnectPipeline(); diff --git a/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx b/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx index 700922b3fd3..0ab0e8ecd38 100644 --- a/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx @@ -93,7 +93,7 @@ int itkShrinkImageStreamingTest(int, char* [] ) // Verify that only the data needed is requested; for (const auto & j : monitor1->GetOutputRequestedRegions() ) { - TEST_EXPECT_TRUE(j.GetSize(1)%factors[1] == 1); + ITK_TEST_EXPECT_TRUE(j.GetSize(1)%factors[1] == 1); } diff --git a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx index a4682d9944e..c6eb7a640ce 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx @@ -147,9 +147,9 @@ int itkSliceBySliceImageFilterTest(int argc, char * argv[]) // check that one slice executed is just one pixel and the input // filter just update that region - TEST_EXPECT_EQUAL( monitor->GetNumberOfUpdates(), 1 ); - TEST_EXPECT_EQUAL( monitor->GetOutputRequestedRegions()[0].GetNumberOfPixels(), 1 ); - TEST_EXPECT_TRUE( monitor->VerifyAllInputCanStream(1) ); + ITK_TEST_EXPECT_EQUAL( monitor->GetNumberOfUpdates(), 1 ); + ITK_TEST_EXPECT_EQUAL( monitor->GetOutputRequestedRegions()[0].GetNumberOfPixels(), 1 ); + ITK_TEST_EXPECT_TRUE( monitor->VerifyAllInputCanStream(1) ); // // Test that a sliced version of the input image information is passed @@ -190,8 +190,8 @@ int itkSliceBySliceImageFilterTest(int argc, char * argv[]) expectedInternalSpacing[internal_i] = spacing[i]; expectedInternalOrigin[internal_i] = origin[i]; } - TEST_EXPECT_EQUAL( monitor->GetUpdatedOutputSpacing(), expectedInternalSpacing ); - TEST_EXPECT_EQUAL( monitor->GetUpdatedOutputOrigin(), expectedInternalOrigin ); + ITK_TEST_EXPECT_EQUAL( monitor->GetUpdatedOutputSpacing(), expectedInternalSpacing ); + ITK_TEST_EXPECT_EQUAL( monitor->GetUpdatedOutputOrigin(), expectedInternalOrigin ); // // Exercise PrintSelf() @@ -242,8 +242,8 @@ int itkSliceBySliceImageFilterTest(int argc, char * argv[]) } // check nullptr input/output - TRY_EXPECT_EXCEPTION(badFilter->SetInputFilter(nullptr)); - TRY_EXPECT_EXCEPTION(badFilter->SetOutputFilter(nullptr)); + ITK_TRY_EXPECT_EXCEPTION(badFilter->SetInputFilter(nullptr)); + ITK_TRY_EXPECT_EXCEPTION(badFilter->SetOutputFilter(nullptr)); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx index b6d21b3bdb2..62272980fb0 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx @@ -93,7 +93,7 @@ int itkAbsImageFilterAndAdaptorTest(int, char* [] ) // Create an Abs Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AbsImageFilter, UnaryGeneratorImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AbsImageFilter, UnaryGeneratorImageFilter ); // Connect the input images filter->SetInput( inputImage ); @@ -142,7 +142,7 @@ int itkAbsImageFilterAndAdaptorTest(int, char* [] ) AdaptorType::Pointer absAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( absAdaptor, AbsImageAdaptor, ImageAdaptor ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( absAdaptor, AbsImageAdaptor, ImageAdaptor ); absAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx index a94d3f783b2..655ab03eeaf 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx @@ -92,7 +92,7 @@ int itkAcosImageFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AcosImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AcosImageFilter, UnaryGeneratorImageFilter ); itk::SimpleFilterWatcher watch(filter); @@ -142,7 +142,7 @@ int itkAcosImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer acosAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( acosAdaptor, AcosImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( acosAdaptor, AcosImageAdaptor, ImageAdaptor ); acosAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest.cxx index 3144c425d44..e1ea11305bd 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest.cxx @@ -99,7 +99,7 @@ int itkAddImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AddImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AddImageFilter, BinaryGeneratorImageFilter ); // Connect the input images @@ -108,7 +108,7 @@ int itkAddImageFilterTest( int, char* [] ) // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output @@ -145,7 +145,7 @@ int itkAddImageFilterTest( int, char* [] ) using FilterType2 = itk::AddImageFilter< ImageType2, ImageType2, ImageType2 >; FilterType2::Pointer filter2 = FilterType2::New(); - TEST_EXPECT_TRUE( !filter2.IsNull() ); + ITK_TEST_EXPECT_TRUE( !filter2.IsNull() ); } { @@ -161,7 +161,7 @@ int itkAddImageFilterTest( int, char* [] ) FilterType3::Pointer filter3 = FilterType3::New(); - TEST_EXPECT_TRUE( !filter3.IsNull() ); + ITK_TEST_EXPECT_TRUE( !filter3.IsNull() ); } diff --git a/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest2.cxx b/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest2.cxx index b2ddb7561ca..2fea6e5affd 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest2.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAddImageFilterTest2.cxx @@ -78,10 +78,10 @@ int itkAddImageFilterTest2(int argc, char* argv[] ) writer->SetNumberOfStreamDivisions( streams ); writer->SetFileName( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); - TEST_EXPECT_TRUE( monitorFilter->VerifyInputFilterExecutedStreaming( streams ) ); - TEST_EXPECT_TRUE( integerMonitorFilter->VerifyInputFilterExecutedStreaming( streams ) ); + ITK_TEST_EXPECT_TRUE( monitorFilter->VerifyInputFilterExecutedStreaming( streams ) ); + ITK_TEST_EXPECT_TRUE( integerMonitorFilter->VerifyInputFilterExecutedStreaming( streams ) ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx index c1f0e7172e6..ee859389141 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx @@ -117,7 +117,7 @@ int itkAndImageFilterTest( int argc, char* argv[] ) // Create the filter AndImageFilterType::Pointer filter = AndImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AndImageFilter, BinaryGeneratorImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AndImageFilter, BinaryGeneratorImageFilter ); // Set the input images filter->SetInput1( inputImageA ); @@ -139,7 +139,7 @@ int itkAndImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx index 52b5d2d64c9..5feb20c048c 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx @@ -92,7 +92,7 @@ int itkAsinImageFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AsinImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AsinImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -140,7 +140,7 @@ int itkAsinImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer asinAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( asinAdaptor, AsinImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( asinAdaptor, AsinImageAdaptor, ImageAdaptor ); asinAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx index 7ac2644acbd..a31984c8322 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx @@ -107,7 +107,7 @@ int itkAtan2ImageFilterTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, Atan2ImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, Atan2ImageFilter, BinaryGeneratorImageFilter ); // Set the input images diff --git a/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx index e6a471c7986..92084570ecf 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx @@ -91,7 +91,7 @@ int itkAtanImageFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AtanImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AtanImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -139,7 +139,7 @@ int itkAtanImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer atanAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( atanAdaptor, AtanImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( atanAdaptor, AtanImageAdaptor, ImageAdaptor ); atanAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkBinaryMagnitudeImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkBinaryMagnitudeImageFilterTest.cxx index 2ec00da85a3..483310a2e87 100644 --- a/Modules/Filtering/ImageIntensity/test/itkBinaryMagnitudeImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkBinaryMagnitudeImageFilterTest.cxx @@ -116,7 +116,7 @@ int itkBinaryMagnitudeImageFilterTest( int, char* [] ) // Create the BinaryMagnitudeImageFilter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, BinaryMagnitudeImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BinaryMagnitudeImageFilter, BinaryGeneratorImageFilter ); // Set the input images diff --git a/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx index a5ce17aedd7..97681a38c6e 100644 --- a/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx @@ -294,7 +294,7 @@ int itkClampImageFilterTest( int, char* [] ) using ImageType = itk::Image< unsigned char, 3 >; using FilterType = itk::ClampImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ClampImageFilter, UnaryFunctorImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ClampImageFilter, UnaryFunctorImageFilter ); bool success = TestClampFrom< char >() && diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx index f3547824501..7dd730a46e6 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx @@ -90,7 +90,7 @@ int itkComplexToImaginaryFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToImaginaryImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToImaginaryImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -136,7 +136,7 @@ int itkComplexToImaginaryFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer imaginaryAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( imaginaryAdaptor, ComplexToImaginaryImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( imaginaryAdaptor, ComplexToImaginaryImageAdaptor, ImageAdaptor ); imaginaryAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx index c175e4fa46c..ef53f8aa7fc 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx @@ -95,7 +95,7 @@ int itkComplexToModulusFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToModulusImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToModulusImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -146,7 +146,7 @@ int itkComplexToModulusFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer imaginaryAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( imaginaryAdaptor, ComplexToModulusImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( imaginaryAdaptor, ComplexToModulusImageAdaptor, ImageAdaptor ); imaginaryAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx index 009f6f3288e..46909cda1fe 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx @@ -90,7 +90,7 @@ int itkComplexToPhaseFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToPhaseImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToPhaseImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -140,7 +140,7 @@ int itkComplexToPhaseFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer imaginaryAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( imaginaryAdaptor, ComplexToPhaseImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( imaginaryAdaptor, ComplexToPhaseImageAdaptor, ImageAdaptor ); imaginaryAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx index eb195568331..63b77277f1e 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx @@ -90,7 +90,7 @@ int itkComplexToRealFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToRealImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ComplexToRealImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -136,7 +136,7 @@ int itkComplexToRealFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer realAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( realAdaptor, ComplexToRealImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( realAdaptor, ComplexToRealImageAdaptor, ImageAdaptor ); realAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx index f5516ba8e4b..403cc9002b6 100644 --- a/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx @@ -121,7 +121,7 @@ int itkConstrainedValueAdditionImageFilterTest( int argc, char* argv[] ) ConstrainedValueAdditionImageFilterType::Pointer filter = ConstrainedValueAdditionImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ConstrainedValueAdditionImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ConstrainedValueAdditionImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -143,7 +143,7 @@ int itkConstrainedValueAdditionImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx index f36d2ee7761..b1cbbf20175 100644 --- a/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx @@ -91,7 +91,7 @@ int itkCosImageFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, CosImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, CosImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -139,7 +139,7 @@ int itkCosImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer cosAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( cosAdaptor, CosImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( cosAdaptor, CosImageAdaptor, ImageAdaptor ); cosAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx index 7eec265279a..fa3f3bce867 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx @@ -97,7 +97,7 @@ int itkDivideImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, DivideImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, DivideImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -106,7 +106,7 @@ int itkDivideImageFilterTest( int, char* [] ) // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output @@ -137,7 +137,7 @@ int itkDivideImageFilterTest( int, char* [] ) // Check for exception if constant is 0 filter->SetInput2( 0.0 ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); // All objects should be automatically destroyed at this point diff --git a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx index 50d2d25f2a4..41195a4fea6 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx @@ -101,7 +101,7 @@ int itkDivideImageFilterTest2( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, DivideImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, DivideImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -110,7 +110,7 @@ int itkDivideImageFilterTest2( int, char* [] ) // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output @@ -146,7 +146,7 @@ int itkDivideImageFilterTest2( int, char* [] ) // Check for exception if constant is 0 filter->SetInput2( 0.0 ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); // All objects should be automatically destroyed at this point diff --git a/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx index 597c9ba265f..0f93a781a7e 100644 --- a/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx @@ -47,7 +47,7 @@ int itkIntensityWindowingImageFilterTest( int, char* [] ) using FilterType = itk::IntensityWindowingImageFilter< TestInputImage, TestOutputImage >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, IntensityWindowingImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, IntensityWindowingImageFilter, UnaryFunctorImageFilter ); // Generate a real image @@ -73,16 +73,16 @@ int itkIntensityWindowingImageFilterTest( int, char* [] ) const float windowMaximum = 50.0f; filter->SetOutputMinimum( desiredMinimum ); - TEST_SET_GET_VALUE( desiredMinimum, filter->GetOutputMinimum() ); + ITK_TEST_SET_GET_VALUE( desiredMinimum, filter->GetOutputMinimum() ); filter->SetOutputMaximum( desiredMaximum ); - TEST_SET_GET_VALUE( desiredMaximum, filter->GetOutputMaximum() ); + ITK_TEST_SET_GET_VALUE( desiredMaximum, filter->GetOutputMaximum() ); filter->SetWindowMinimum( windowMinimum ); - TEST_SET_GET_VALUE( windowMinimum, filter->GetWindowMinimum() ); + ITK_TEST_SET_GET_VALUE( windowMinimum, filter->GetWindowMinimum() ); filter->SetWindowMaximum( windowMaximum ); - TEST_SET_GET_VALUE( windowMaximum, filter->GetWindowMaximum() ); + ITK_TEST_SET_GET_VALUE( windowMaximum, filter->GetWindowMaximum() ); std::cout << "Window minimum:maximum = " << windowMinimum << ":" << windowMaximum @@ -102,9 +102,9 @@ int itkIntensityWindowingImageFilterTest( int, char* [] ) FilterType::RealType >::PrintType >( filter->GetShift() ) << std::endl; - TRY_EXPECT_NO_EXCEPTION( filter->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->UpdateLargestPossibleRegion() ); - TRY_EXPECT_NO_EXCEPTION( filter->SetFunctor( filter->GetFunctor() ) ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->SetFunctor( filter->GetFunctor() ) ); using CalculatorType = itk::MinimumMaximumImageCalculator< TestOutputImage >; CalculatorType::Pointer calculator = CalculatorType::New(); @@ -155,7 +155,7 @@ int itkIntensityWindowingImageFilterTest( int, char* [] ) FilterType::InputPixelType >::PrintType >( filter->GetWindowMaximum() ) << std::endl; - TRY_EXPECT_NO_EXCEPTION( filter->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->UpdateLargestPossibleRegion() ); calculator->Compute(); diff --git a/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx index 2487d3867ef..32325c6580d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx @@ -46,7 +46,7 @@ int itkInvertIntensityImageFilterTest( int argc, char * argv[] ) using FilterType = itk::InvertIntensityImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, InvertIntensityImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, InvertIntensityImageFilter, UnaryFunctorImageFilter ); itk::SimpleFilterWatcher watcher( filter ); @@ -54,7 +54,7 @@ int itkInvertIntensityImageFilterTest( int argc, char * argv[] ) FilterType::InputPixelType maximum = itk::NumericTraits< FilterType::InputPixelType >::max(); filter->SetMaximum( maximum ); - TEST_SET_GET_VALUE( maximum, filter->GetMaximum() ); + ITK_TEST_SET_GET_VALUE( maximum, filter->GetMaximum() ); filter->SetFunctor(filter->GetFunctor()); @@ -65,7 +65,7 @@ int itkInvertIntensityImageFilterTest( int argc, char * argv[] ) writer->SetInput( filter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx index 0c8c5cfdf99..c43581761af 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx @@ -89,7 +89,7 @@ int itkLog10ImageFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, Log10ImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, Log10ImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -137,7 +137,7 @@ int itkLog10ImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer log10Adaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( log10Adaptor, Log10ImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( log10Adaptor, Log10ImageAdaptor, ImageAdaptor ); log10Adaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx index 1f8971b40b1..952439c7255 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx @@ -90,7 +90,7 @@ int itkLogImageFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, LogImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, LogImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -138,7 +138,7 @@ int itkLogImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer logAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( logAdaptor, LogImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( logAdaptor, LogImageAdaptor, ImageAdaptor ); logAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkMagnitudeAndPhaseToComplexImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMagnitudeAndPhaseToComplexImageFilterTest.cxx index 7c9776c2759..0cbd43c69f7 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMagnitudeAndPhaseToComplexImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMagnitudeAndPhaseToComplexImageFilterTest.cxx @@ -66,7 +66,7 @@ int itkMagnitudeAndPhaseToComplexImageFilterTest( int argc, char * argv[] ) MagnitudeAndPhaseToComplexFilterType::Pointer magnitudeAndPhaseToComplexFilter = MagnitudeAndPhaseToComplexFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( magnitudeAndPhaseToComplexFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( magnitudeAndPhaseToComplexFilter, MagnitudeAndPhaseToComplexImageFilter, BinaryGeneratorImageFilter ); magnitudeAndPhaseToComplexFilter->SetInput1( magnitudeReader->GetOutput() ); @@ -77,7 +77,7 @@ int itkMagnitudeAndPhaseToComplexImageFilterTest( int argc, char * argv[] ) writer->SetFileName( complexImageFileName ); writer->SetInput( magnitudeAndPhaseToComplexFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Check that the default template parameters work using DefaultParametersFilterType = itk::MagnitudeAndPhaseToComplexImageFilter< InputImageType >; diff --git a/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx index 93b4b0b019c..013a036176c 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx @@ -112,7 +112,7 @@ int itkMatrixIndexSelectionImageFilterTest( int argc, char* argv[] ) SelectionFilterType::Pointer filter = SelectionFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, MatrixIndexSelectionImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, MatrixIndexSelectionImageFilter, UnaryFunctorImageFilter ); filter->SetInput( image ); @@ -144,7 +144,7 @@ int itkMatrixIndexSelectionImageFilterTest( int argc, char* argv[] ) writer->SetFileName( argv[1] ); writer->SetInput( filter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageIntensity/test/itkMaximumImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMaximumImageFilterTest.cxx index 89e964d84cd..0fd2488b6f0 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMaximumImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMaximumImageFilterTest.cxx @@ -106,7 +106,7 @@ int itkMaximumImageFilterTest( int, char*[] ) // Create the filter MaximumImageFilterType::Pointer maximumImageFilter = MaximumImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( maximumImageFilter, MaximumImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( maximumImageFilter, MaximumImageFilter, BinaryGeneratorImageFilter); // Connect the input images @@ -126,8 +126,8 @@ int itkMaximumImageFilterTest( int, char*[] ) ImageType::IndexType pixelIndex = {{0, 1, 1}}; - TEST_EXPECT_EQUAL( outputImage->GetPixel( start ), largePixelValue ); - TEST_EXPECT_EQUAL( outputImage->GetPixel( pixelIndex ), largePixelValue ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( start ), largePixelValue ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( pixelIndex ), largePixelValue ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkMinimumImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMinimumImageFilterTest.cxx index fed16abab23..63a32952194 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMinimumImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMinimumImageFilterTest.cxx @@ -106,7 +106,7 @@ int itkMinimumImageFilterTest( int, char* [] ) // Create the filter MinimumFilterType::Pointer minimumImageFilter = MinimumFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( minimumImageFilter, MinimumImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( minimumImageFilter, MinimumImageFilter, BinaryGeneratorImageFilter); // Connect the input images @@ -126,8 +126,8 @@ int itkMinimumImageFilterTest( int, char* [] ) ImageType::IndexType pixelIndex = {{0, 1, 1}}; - TEST_EXPECT_EQUAL( outputImage->GetPixel( start ), smallPixelValue ); - TEST_EXPECT_EQUAL( outputImage->GetPixel( pixelIndex ), smallPixelValue ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( start ), smallPixelValue ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( pixelIndex ), smallPixelValue ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx index 4f5e3f4fa84..dd4bfbfe004 100644 --- a/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx @@ -52,14 +52,14 @@ int itkModulusImageFilterTest(int argc, char * argv[]) using FilterType = itk::ModulusImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, ModulusImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ModulusImageFilter, BinaryGeneratorImageFilter ); filter->SetInput( distance->GetOutput() ); FilterType::InputPixelType dividend = 8; filter->SetDividend( dividend ); - TEST_SET_GET_VALUE( dividend, filter->GetDividend() ) + ITK_TEST_SET_GET_VALUE( dividend, filter->GetDividend() ) filter->InPlaceOn(); @@ -76,7 +76,7 @@ int itkModulusImageFilterTest(int argc, char * argv[]) writer->SetInput( rescale->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx index bc1bcdbf7c1..b17a70c4c86 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx @@ -97,7 +97,7 @@ int itkMultiplyImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, MultiplyImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, MultiplyImageFilter, BinaryGeneratorImageFilter ); // Connect the input images @@ -106,7 +106,7 @@ int itkMultiplyImageFilterTest( int, char* [] ) // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output diff --git a/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx index 90c3db6f838..ef9301ff52d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx @@ -86,7 +86,7 @@ int itkNaryAddImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, NaryAddImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, NaryAddImageFilter, NaryFunctorImageFilter ); // Set the input images @@ -97,7 +97,7 @@ int itkNaryAddImageFilterTest( int, char* [] ) filter->SetFunctor( filter->GetFunctor() ); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output @@ -138,7 +138,7 @@ int itkNaryAddImageFilterTest( int, char* [] ) // Execute the filter in place filter->InPlaceOn(); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Test the validity of the output @@ -206,7 +206,7 @@ int itkNaryAddImageFilterTest( int, char* [] ) VectorAdderType::Pointer vectorFilter = VectorAdderType::New(); - EXERCISE_BASIC_OBJECT_METHODS( vectorFilter, NaryAddImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( vectorFilter, NaryAddImageFilter, NaryFunctorImageFilter ); @@ -220,7 +220,7 @@ int itkNaryAddImageFilterTest( int, char* [] ) // Execute the filter - TRY_EXPECT_NO_EXCEPTION( vectorFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( vectorFilter->Update() ); // Test the validity of the output diff --git a/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx index d04b1b98bb7..42d809593a1 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx @@ -128,7 +128,7 @@ int itkNaryMaximumImageFilterTest( int, char* [] ) // Create the itk::NaryMaximumImageFilter filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, NaryMaximumImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, NaryMaximumImageFilter, NaryFunctorImageFilter ); // Set the input images diff --git a/Modules/Filtering/ImageIntensity/test/itkNormalizeToConstantImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNormalizeToConstantImageFilterTest.cxx index 71fd1960b32..e3eb6c5a462 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNormalizeToConstantImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNormalizeToConstantImageFilterTest.cxx @@ -50,12 +50,12 @@ int itkNormalizeToConstantImageFilterTest( int, char* [] ) itk::NormalizeToConstantImageFilter< IntImage, DoubleImage >; NormalizeType::Pointer normalize = NormalizeType::New(); - EXERCISE_BASIC_OBJECT_METHODS( normalize, NormalizeToConstantImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( normalize, NormalizeToConstantImageFilter, ImageToImageFilter ); DoubleImage::PixelType constant = 1.0; normalize->SetConstant( constant ); - TEST_SET_GET_VALUE( constant, normalize->GetConstant() ); + ITK_TEST_SET_GET_VALUE( constant, normalize->GetConstant() ); itk::SimpleFilterWatcher watch( normalize, "NormalizeToConstant" ); @@ -83,7 +83,7 @@ int itkNormalizeToConstantImageFilterTest( int, char* [] ) constant = 134.2; normalize->SetConstant( constant ); - TEST_SET_GET_VALUE( constant, normalize->GetConstant() ); + ITK_TEST_SET_GET_VALUE( constant, normalize->GetConstant() ); normalize->Update(); diff --git a/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx index 8ab638cde86..37aa1608660 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx @@ -88,15 +88,15 @@ int itkNotImageFilterTest( int, char* [] ) // Create the filter NotImageFilterType::Pointer filter = NotImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, NotImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, NotImageFilter, UnaryFunctorImageFilter ); filter->SetForegroundValue(2); - TEST_SET_GET_VALUE( 2, filter->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( 2, filter->GetForegroundValue() ); filter->SetForegroundValue(1); filter->SetBackgroundValue(10); - TEST_SET_GET_VALUE( 10, filter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( 10, filter->GetBackgroundValue() ); filter->SetBackgroundValue(0); // Set the input images @@ -121,7 +121,7 @@ int itkNotImageFilterTest( int, char* [] ) { const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); - TEST_EXPECT_EQUAL( input, !output ); + ITK_TEST_EXPECT_EQUAL( input, !output ); ++ot; ++it; } diff --git a/Modules/Filtering/ImageIntensity/test/itkNthElementPixelAccessorTest2.cxx b/Modules/Filtering/ImageIntensity/test/itkNthElementPixelAccessorTest2.cxx index 68e616168b6..469bfbc71cb 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNthElementPixelAccessorTest2.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNthElementPixelAccessorTest2.cxx @@ -109,7 +109,7 @@ int itkNthElementPixelAccessorTest2(int, char* []) { ScalarImageType::Pointer scalarImage = adaptor->GetOutput(); - TEST_EXPECT_EQUAL( adaptor->GetOutput()->GetPixel(index), referencePixel[0] ); + ITK_TEST_EXPECT_EQUAL( adaptor->GetOutput()->GetPixel(index), referencePixel[0] ); // Test operator AccessorType accessor1; @@ -120,7 +120,7 @@ int itkNthElementPixelAccessorTest2(int, char* []) { adaptor->SetAccessor( accessor); adaptor->Update(); scalarImage = adaptor->GetOutput(); - TEST_EXPECT_EQUAL( adaptor->GetOutput()->GetPixel(index), referencePixel[1] ); + ITK_TEST_EXPECT_EQUAL( adaptor->GetOutput()->GetPixel(index), referencePixel[1] ); } return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx index 0f5100d0f02..1e5b02d75a9 100644 --- a/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx @@ -118,7 +118,7 @@ int itkOrImageFilterTest( int argc, char* argv[] ) // Create the filter OrImageFilterType::Pointer filter = OrImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, OrImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, OrImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -141,7 +141,7 @@ int itkOrImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx index 03e99a8eabe..1901e22d4ab 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx @@ -144,7 +144,7 @@ int itkPolylineMaskImageFilterTest( int argc, char * argv[] ) PolylineMaskImageFilterType::Pointer polylineMaskFilter = PolylineMaskImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( polylineMaskFilter, PolylineMaskImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( polylineMaskFilter, PolylineMaskImageFilter, ImageToImageFilter ); // Set the input image polylineMaskFilter->SetInput1( imageGenerationFilter->GetOutput() ); @@ -155,12 +155,12 @@ int itkPolylineMaskImageFilterTest( int argc, char * argv[] ) // Set the viewing direction vector polylineMaskFilter->SetViewVector( inputViewVector ); - TEST_SET_GET_VALUE( inputViewVector, polylineMaskFilter->GetViewVector() ); + ITK_TEST_SET_GET_VALUE( inputViewVector, polylineMaskFilter->GetViewVector() ); // Set the up direction vector polylineMaskFilter->SetUpVector( inputUpVector ); - TEST_SET_GET_VALUE( inputUpVector, polylineMaskFilter->GetUpVector() ); + ITK_TEST_SET_GET_VALUE( inputUpVector, polylineMaskFilter->GetUpVector() ); // Camera center point PointType cameraCenterPoint; @@ -171,13 +171,13 @@ int itkPolylineMaskImageFilterTest( int argc, char * argv[] ) polylineMaskFilter->SetCameraCenterPoint( cameraCenterPoint ); - TEST_SET_GET_VALUE( cameraCenterPoint, polylineMaskFilter->GetCameraCenterPoint() ); + ITK_TEST_SET_GET_VALUE( cameraCenterPoint, polylineMaskFilter->GetCameraCenterPoint() ); // Set the camera focal distance double focalDistance = 30.0; polylineMaskFilter->SetFocalDistance( focalDistance ); - TEST_SET_GET_VALUE( focalDistance, polylineMaskFilter->GetFocalDistance() ); + ITK_TEST_SET_GET_VALUE( focalDistance, polylineMaskFilter->GetFocalDistance() ); // Set the camera focal point in the projection plane ProjPlanePointType focalpoint; @@ -185,7 +185,7 @@ int itkPolylineMaskImageFilterTest( int argc, char * argv[] ) focalpoint[1] = 20.0; polylineMaskFilter->SetFocalPoint( focalpoint ); - TEST_SET_GET_VALUE( focalpoint, polylineMaskFilter->GetFocalPoint() ); + ITK_TEST_SET_GET_VALUE( focalpoint, polylineMaskFilter->GetFocalPoint() ); polylineMaskFilter->Update(); diff --git a/Modules/Filtering/ImageIntensity/test/itkPowImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPowImageFilterTest.cxx index 70e02de81b4..fd4dc6c037c 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPowImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPowImageFilterTest.cxx @@ -70,7 +70,7 @@ int itkPowImageFilterTest(int, char* [] ) // Create a PowFilter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, PowImageFilter, BinaryGeneratorImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, PowImageFilter, BinaryGeneratorImageFilter ); // Check == and != operators //FilterType::FunctorType func2; @@ -91,31 +91,31 @@ int itkPowImageFilterTest(int, char* [] ) idx1[0] = 1; // Values should be 1.0^1.0 and 2.0^1.0 - TEST_EXPECT_EQUAL( outputImage->GetPixel( idx0 ), 1.0 ); - TEST_EXPECT_EQUAL( outputImage->GetPixel( idx1 ), 2.0 ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( idx0 ), 1.0 ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( idx1 ), 2.0 ); filter->SetInput1( inputImageA ); filter->SetConstant2( 2.0 ); filter->Update(); // Values should be 1.0^2.0 and 2.0^2.0 - TEST_EXPECT_EQUAL( outputImage->GetPixel( idx0 ), 1.0 ); - TEST_EXPECT_EQUAL( outputImage->GetPixel( idx1 ), 4.0 ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( idx0 ), 1.0 ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( idx1 ), 4.0 ); filter->SetConstant1( 2.0 ); filter->SetInput2( inputImageA ); filter->Update(); // Values should be 2.0^1.0 and 2.0^2.0 - TEST_EXPECT_EQUAL( outputImage->GetPixel( idx0 ), 2.0 ); - TEST_EXPECT_EQUAL( outputImage->GetPixel( idx1 ), 4.0 ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( idx0 ), 2.0 ); + ITK_TEST_EXPECT_EQUAL( outputImage->GetPixel( idx1 ), 4.0 ); { using complexFloatFilterType = itk::PowImageFilter, itk::Image >, itk::Image > >; complexFloatFilterType::Pointer tFilter = complexFloatFilterType::New(); - TEST_EXPECT_TRUE(!tFilter.IsNull()); + ITK_TEST_EXPECT_TRUE(!tFilter.IsNull()); } // All objects should be automatically destroyed at this point diff --git a/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx index 8153ddd6921..9debc948aee 100644 --- a/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx @@ -99,7 +99,7 @@ int itkRGBToLuminanceImageFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, RGBToLuminanceImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, RGBToLuminanceImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -148,7 +148,7 @@ int itkRGBToLuminanceImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer luminanceAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( luminanceAdaptor, RGBToLuminanceImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( luminanceAdaptor, RGBToLuminanceImageAdaptor, ImageAdaptor ); luminanceAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkRescaleIntensityImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkRescaleIntensityImageFilterTest.cxx index cbad7668997..df93f2a9a80 100644 --- a/Modules/Filtering/ImageIntensity/test/itkRescaleIntensityImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkRescaleIntensityImageFilterTest.cxx @@ -54,7 +54,7 @@ int itkRescaleIntensityImageFilterTest( int, char* [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, RescaleIntensityImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, RescaleIntensityImageFilter, UnaryFunctorImageFilter ); // Now generate a real image @@ -79,12 +79,12 @@ int itkRescaleIntensityImageFilterTest( int, char* [] ) constexpr double desiredMaximum = 1.0; filter->SetOutputMinimum( desiredMinimum ); - TEST_SET_GET_VALUE( desiredMinimum, filter->GetOutputMinimum() ); + ITK_TEST_SET_GET_VALUE( desiredMinimum, filter->GetOutputMinimum() ); filter->SetOutputMaximum( desiredMaximum ); - TEST_SET_GET_VALUE( desiredMaximum, filter->GetOutputMaximum() ); + ITK_TEST_SET_GET_VALUE( desiredMaximum, filter->GetOutputMaximum() ); - TRY_EXPECT_NO_EXCEPTION( filter->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->UpdateLargestPossibleRegion() ); using CalculatorType = itk::MinimumMaximumImageCalculator< TestOutputImage >; CalculatorType::Pointer calculator = CalculatorType::New(); diff --git a/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx index 171165e4c1e..6abb2d8d4e1 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx @@ -90,7 +90,7 @@ int itkSigmoidImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SigmoidImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SigmoidImageFilter, UnaryFunctorImageFilter ); // Set the input image @@ -101,19 +101,19 @@ int itkSigmoidImageFilterTest( int, char* [] ) constexpr double beta = 3.0; filter->SetAlpha( alpha ); - TEST_SET_GET_VALUE( alpha, filter->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alpha, filter->GetAlpha() ); filter->SetBeta( beta ); - TEST_SET_GET_VALUE( beta, filter->GetBeta() ); + ITK_TEST_SET_GET_VALUE( beta, filter->GetBeta() ); constexpr OutputPixelType maximum = 1.0; const OutputPixelType minimum = -1.0; filter->SetOutputMinimum( minimum ); - TEST_SET_GET_VALUE( minimum, filter->GetOutputMinimum() ); + ITK_TEST_SET_GET_VALUE( minimum, filter->GetOutputMinimum() ); filter->SetOutputMaximum( maximum ); - TEST_SET_GET_VALUE( maximum, filter->GetOutputMaximum() ); + ITK_TEST_SET_GET_VALUE( maximum, filter->GetOutputMaximum() ); filter->SetFunctor( filter->GetFunctor() ); diff --git a/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx index aa02edc6408..cec33c251c0 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx @@ -91,7 +91,7 @@ int itkSinImageFilterAndAdaptorTest( int, char* [] ) // Create the Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SinImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SinImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -139,7 +139,7 @@ int itkSinImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer sinAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( sinAdaptor, SinImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( sinAdaptor, SinImageAdaptor, ImageAdaptor ); sinAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx index 92c2740b097..f08a0893c09 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx @@ -92,7 +92,7 @@ int itkSqrtImageFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SqrtImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SqrtImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -139,7 +139,7 @@ int itkSqrtImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer sqrtAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( sqrtAdaptor, SqrtImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( sqrtAdaptor, SqrtImageAdaptor, ImageAdaptor ); sqrtAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx index 60811447465..d7a182aa117 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx @@ -89,7 +89,7 @@ int itkSquareImageFilterTest( int, char* [] ) // Create a Filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SquareImageFilter, UnaryGeneratorImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SquareImageFilter, UnaryGeneratorImageFilter ); // Connect the input images filter->SetInput( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkSubtractImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSubtractImageFilterTest.cxx index 0818cf3ea9c..88f2f989abb 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSubtractImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSubtractImageFilterTest.cxx @@ -98,7 +98,7 @@ int itkSubtractImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SubtractImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SubtractImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -107,7 +107,7 @@ int itkSubtractImageFilterTest( int, char* [] ) // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output diff --git a/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx index 9c3a411a849..6628f022583 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx @@ -116,7 +116,7 @@ class SymmetricEigenAnalysisImageFilterHelper : SymmetricEigenAnalysisImageFilterType::New(); filter->SetDimension( InputImageType::ImageDimension ); - TEST_SET_GET_VALUE( InputImageType::ImageDimension, filter->GetDimension() ); + ITK_TEST_SET_GET_VALUE( InputImageType::ImageDimension, filter->GetDimension() ); // Set the input image filter->SetInput( inputImage ); @@ -126,7 +126,7 @@ class SymmetricEigenAnalysisImageFilterHelper : filter->OrderEigenValuesBy( order ); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output // It is important to do it AFTER the filter is Updated @@ -143,7 +143,7 @@ class SymmetricEigenAnalysisImageFilterHelper : roundImageFilter->SetInput( internalImage ); - TRY_EXPECT_NO_EXCEPTION( roundImageFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( roundImageFilter->Update() ); // Write the result image using WriterType = itk::ImageFileWriter< OutputImageType >; @@ -154,7 +154,7 @@ class SymmetricEigenAnalysisImageFilterHelper : writer->SetInput( roundImageFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test succeeded." << std::endl; return EXIT_SUCCESS; @@ -261,7 +261,7 @@ class SymmetricEigenAnalysisFixedDimensionImageFilterHelper : filter->OrderEigenValuesBy( order ); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Get the filter output // It is important to do it AFTER the filter is Updated @@ -278,7 +278,7 @@ class SymmetricEigenAnalysisFixedDimensionImageFilterHelper : roundImageFilter->SetInput( internalImage ); - TRY_EXPECT_NO_EXCEPTION( roundImageFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( roundImageFilter->Update() ); // Write the result image using WriterType = itk::ImageFileWriter< OutputImageType >; @@ -289,7 +289,7 @@ class SymmetricEigenAnalysisFixedDimensionImageFilterHelper : writer->SetInput( roundImageFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test succeeded." << std::endl; return EXIT_SUCCESS; @@ -340,7 +340,7 @@ int itkSymmetricEigenAnalysisImageFilterTest( int argc, char* argv[] ) // Create an instance to exercise basic object methods FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SymmetricEigenAnalysisImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SymmetricEigenAnalysisImageFilter, UnaryFunctorImageFilter ); @@ -370,7 +370,7 @@ int itkSymmetricEigenAnalysisImageFilterTest( int argc, char* argv[] ) std::string outputFilenameFixedDimension = argv[3]; // Create an instance to exercise basic object methods auto filterFixedDimension = FilterFixedDimensionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filterFixedDimension, SymmetricEigenAnalysisFixedDimensionImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filterFixedDimension, SymmetricEigenAnalysisFixedDimensionImageFilter, UnaryFunctorImageFilter ); int testFixedDimensionResult = itk::SymmetricEigenAnalysisFixedDimensionImageFilterHelper< diff --git a/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx index 27cc53f4569..fb05eb3bfef 100644 --- a/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx @@ -91,7 +91,7 @@ int itkTanImageFilterAndAdaptorTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, TanImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, TanImageFilter, UnaryGeneratorImageFilter ); // Set the input image @@ -137,7 +137,7 @@ int itkTanImageFilterAndAdaptorTest( int, char* [] ) AdaptorType::Pointer tanAdaptor = AdaptorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( tanAdaptor, TanImageAdaptor, + ITK_EXERCISE_BASIC_OBJECT_METHODS( tanAdaptor, TanImageAdaptor, ImageAdaptor ); tanAdaptor->SetImage( inputImage ); diff --git a/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeImageFilterTest.cxx index e73f33df7fe..c00aace2dd4 100644 --- a/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeImageFilterTest.cxx @@ -137,7 +137,7 @@ int itkTernaryMagnitudeImageFilterTest( int argc, char* argv[] ) TernaryMagnitudeImageFilterType::Pointer filter = TernaryMagnitudeImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, TernaryMagnitudeImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, TernaryMagnitudeImageFilter, TernaryFunctorImageFilter ); // Set the input images @@ -162,7 +162,7 @@ int itkTernaryMagnitudeImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeSquaredImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeSquaredImageFilterTest.cxx index 385732c02ed..7302fe5af4b 100644 --- a/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeSquaredImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkTernaryMagnitudeSquaredImageFilterTest.cxx @@ -133,7 +133,7 @@ int itkTernaryMagnitudeSquaredImageFilterTest( int, char* [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, TernaryMagnitudeSquaredImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, TernaryMagnitudeSquaredImageFilter, TernaryFunctorImageFilter ); // Set the input images diff --git a/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx index 1c351634c74..73ae7d58acb 100644 --- a/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx @@ -102,7 +102,7 @@ int itkTernaryOperatorImageFilterTest( int, char* [] ) itk::TernaryOperatorImageFilter< MaskImageType, GrayImageType >; TernaryType::Pointer tern = TernaryType::New(); - EXERCISE_BASIC_OBJECT_METHODS( tern, TernaryOperatorImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( tern, TernaryOperatorImageFilter, TernaryFunctorImageFilter ); tern->SetInput1( mask ); diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx index 733e4cf5bd6..c5d729286c3 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx @@ -61,18 +61,18 @@ int itkVectorRescaleIntensityImageFilterTest( int, char* [] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, VectorRescaleIntensityImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, VectorRescaleIntensityImageFilter, UnaryFunctorImageFilter ); filter->SetInput( inputImage ); constexpr double desiredMaximum = 2.0; filter->SetOutputMaximumMagnitude( desiredMaximum ); - TEST_SET_GET_VALUE( desiredMaximum, filter->GetOutputMaximumMagnitude() ); + ITK_TEST_SET_GET_VALUE( desiredMaximum, filter->GetOutputMaximumMagnitude() ); filter->SetFunctor( filter->GetFunctor() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); FilterType::InputRealType scale = filter->GetScale(); std::cout << "Input scale value: " << diff --git a/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx index 50c54de5925..918b913b0f4 100644 --- a/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx @@ -116,7 +116,7 @@ int itkXorImageFilterTest( int argc, char* argv[] ) // Create the filter XorImageFilterType::Pointer filter = XorImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, XorImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, XorImageFilter, BinaryGeneratorImageFilter ); // Set the input images @@ -139,7 +139,7 @@ int itkXorImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // All objects should be automatically destroyed at this point return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx b/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx index fe4e3e2ed74..69c8de6a55c 100644 --- a/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx +++ b/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx @@ -46,7 +46,7 @@ int itkBinaryContourImageFilterTest(int argc, char * argv[]) using FilterType = itk::BinaryContourImageFilter< IType, IType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS(filter, BinaryContourImageFilter, InPlaceImageFilter); + ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, BinaryContourImageFilter, InPlaceImageFilter); // test default values if ( filter->GetFullyConnected( ) != false ) @@ -65,9 +65,9 @@ int itkBinaryContourImageFilterTest(int argc, char * argv[]) return EXIT_FAILURE; } - TRY_EXPECT_EXCEPTION(filter->Update()); + ITK_TRY_EXPECT_EXCEPTION(filter->Update()); - TEST_SET_GET_BOOLEAN(filter, FullyConnected, std::stoi(argv[3])); + ITK_TEST_SET_GET_BOOLEAN(filter, FullyConnected, std::stoi(argv[3])); filter->SetForegroundValue( std::stoi(argv[4]) ); if ( filter->GetForegroundValue( ) != std::stoi(argv[4]) ) @@ -92,7 +92,7 @@ int itkBinaryContourImageFilterTest(int argc, char * argv[]) writer->SetInput( filter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION(writer->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(writer->Update()); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx b/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx index a96a1a5a38e..47affe6f45d 100644 --- a/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx +++ b/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx @@ -59,9 +59,9 @@ int itkLabelContourImageFilterTest(int argc, char * argv[]) } // Tests for raising code coverage - EXERCISE_BASIC_OBJECT_METHODS(filter, LabelContourImageFilter, InPlaceImageFilter); - TRY_EXPECT_EXCEPTION(filter->Update()); - TEST_SET_GET_BOOLEAN(filter, FullyConnected, std::stoi(argv[3])); + ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, LabelContourImageFilter, InPlaceImageFilter); + ITK_TRY_EXPECT_EXCEPTION(filter->Update()); + ITK_TEST_SET_GET_BOOLEAN(filter, FullyConnected, std::stoi(argv[3])); filter->SetInput( reader->GetOutput() ); @@ -79,7 +79,7 @@ int itkLabelContourImageFilterTest(int argc, char * argv[]) writer->SetInput( filter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION(writer->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(writer->Update()); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageNoise/test/itkAdditiveGaussianNoiseImageFilterTest.cxx b/Modules/Filtering/ImageNoise/test/itkAdditiveGaussianNoiseImageFilterTest.cxx index d548a71132c..d67defecf7f 100644 --- a/Modules/Filtering/ImageNoise/test/itkAdditiveGaussianNoiseImageFilterTest.cxx +++ b/Modules/Filtering/ImageNoise/test/itkAdditiveGaussianNoiseImageFilterTest.cxx @@ -47,7 +47,7 @@ int itkAdditiveGaussianNoiseImageFilterTest(int argc, char * argv[]) AdditiveGaussianNoiseFilterType::Pointer additiveGaussianNoiseFilter = AdditiveGaussianNoiseFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( additiveGaussianNoiseFilter, AdditiveGaussianNoiseImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( additiveGaussianNoiseFilter, AdditiveGaussianNoiseImageFilter, NoiseBaseImageFilter ); double stdDev = 1.0; @@ -56,7 +56,7 @@ int itkAdditiveGaussianNoiseImageFilterTest(int argc, char * argv[]) stdDev = std::stod( argv[3] ); } additiveGaussianNoiseFilter->SetStandardDeviation( stdDev ); - TEST_SET_GET_VALUE( stdDev, additiveGaussianNoiseFilter->GetStandardDeviation() ); + ITK_TEST_SET_GET_VALUE( stdDev, additiveGaussianNoiseFilter->GetStandardDeviation() ); double mean = 0.0; if( argc >= 5 ) @@ -64,7 +64,7 @@ int itkAdditiveGaussianNoiseImageFilterTest(int argc, char * argv[]) mean = std::stod( argv[4] ); } additiveGaussianNoiseFilter->SetMean( mean ); - TEST_SET_GET_VALUE( mean, additiveGaussianNoiseFilter->GetMean() ); + ITK_TEST_SET_GET_VALUE( mean, additiveGaussianNoiseFilter->GetMean() ); additiveGaussianNoiseFilter->SetInput( reader->GetOutput() ); @@ -75,7 +75,7 @@ int itkAdditiveGaussianNoiseImageFilterTest(int argc, char * argv[]) writer->SetInput( additiveGaussianNoiseFilter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageNoise/test/itkSaltAndPepperNoiseImageFilterTest.cxx b/Modules/Filtering/ImageNoise/test/itkSaltAndPepperNoiseImageFilterTest.cxx index 82be7f8b9da..bcaf28fd412 100644 --- a/Modules/Filtering/ImageNoise/test/itkSaltAndPepperNoiseImageFilterTest.cxx +++ b/Modules/Filtering/ImageNoise/test/itkSaltAndPepperNoiseImageFilterTest.cxx @@ -48,7 +48,7 @@ int itkSaltAndPepperNoiseImageFilterTest(int argc, char * argv[]) SaltAndPepperNoiseImageFilterType::Pointer saltAndPepperNoiseImageFilter = SaltAndPepperNoiseImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( saltAndPepperNoiseImageFilter, SaltAndPepperNoiseImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( saltAndPepperNoiseImageFilter, SaltAndPepperNoiseImageFilter, NoiseBaseImageFilter ); double probability = 0.01; @@ -57,16 +57,16 @@ int itkSaltAndPepperNoiseImageFilterTest(int argc, char * argv[]) probability = std::stod( argv[3] ); } saltAndPepperNoiseImageFilter->SetProbability( probability ); - TEST_SET_GET_VALUE( probability, saltAndPepperNoiseImageFilter->GetProbability() ); + ITK_TEST_SET_GET_VALUE( probability, saltAndPepperNoiseImageFilter->GetProbability() ); // change the default values and then set back to defaults so that // the original test image is still valid. PixelType saltValue = 245; saltAndPepperNoiseImageFilter->SetSaltValue( saltValue ); - TEST_SET_GET_VALUE( saltValue, saltAndPepperNoiseImageFilter->GetSaltValue() ); + ITK_TEST_SET_GET_VALUE( saltValue, saltAndPepperNoiseImageFilter->GetSaltValue() ); PixelType pepperValue = 10; saltAndPepperNoiseImageFilter->SetPepperValue( pepperValue ); - TEST_SET_GET_VALUE( pepperValue, saltAndPepperNoiseImageFilter->GetPepperValue() ); + ITK_TEST_SET_GET_VALUE( pepperValue, saltAndPepperNoiseImageFilter->GetPepperValue() ); saltAndPepperNoiseImageFilter->SetSaltValue( itk::NumericTraits::max() ); saltAndPepperNoiseImageFilter->SetPepperValue( itk::NumericTraits::NonpositiveMin() ); @@ -79,7 +79,7 @@ int itkSaltAndPepperNoiseImageFilterTest(int argc, char * argv[]) writer->SetInput( saltAndPepperNoiseImageFilter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageNoise/test/itkShotNoiseImageFilterTest.cxx b/Modules/Filtering/ImageNoise/test/itkShotNoiseImageFilterTest.cxx index 7409edbef42..27a094e865f 100644 --- a/Modules/Filtering/ImageNoise/test/itkShotNoiseImageFilterTest.cxx +++ b/Modules/Filtering/ImageNoise/test/itkShotNoiseImageFilterTest.cxx @@ -45,7 +45,7 @@ int itkShotNoiseImageFilterTest(int argc, char * argv[]) itk::ShotNoiseImageFilter< ImageType, ImageType >; ShotNoiseImageFilterType::Pointer shotNoiseImageFilter = ShotNoiseImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( shotNoiseImageFilter, ShotNoiseImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( shotNoiseImageFilter, ShotNoiseImageFilter, NoiseBaseImageFilter ); double scale = 1.0; @@ -54,7 +54,7 @@ int itkShotNoiseImageFilterTest(int argc, char * argv[]) scale = std::stod( argv[3] ); } shotNoiseImageFilter->SetScale( scale ); - TEST_SET_GET_VALUE( scale, shotNoiseImageFilter->GetScale() ); + ITK_TEST_SET_GET_VALUE( scale, shotNoiseImageFilter->GetScale() ); shotNoiseImageFilter->SetInput( reader->GetOutput() ); @@ -66,7 +66,7 @@ int itkShotNoiseImageFilterTest(int argc, char * argv[]) writer->SetInput( shotNoiseImageFilter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageNoise/test/itkSpeckleNoiseImageFilterTest.cxx b/Modules/Filtering/ImageNoise/test/itkSpeckleNoiseImageFilterTest.cxx index 44c219d4ef5..8485f731305 100644 --- a/Modules/Filtering/ImageNoise/test/itkSpeckleNoiseImageFilterTest.cxx +++ b/Modules/Filtering/ImageNoise/test/itkSpeckleNoiseImageFilterTest.cxx @@ -45,7 +45,7 @@ int itkSpeckleNoiseImageFilterTest(int argc, char * argv[]) itk::SpeckleNoiseImageFilter< ImageType, ImageType >; SpeckleNoiseImageFilterType::Pointer speckleNoiseImageFilter = SpeckleNoiseImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( speckleNoiseImageFilter, SpeckleNoiseImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( speckleNoiseImageFilter, SpeckleNoiseImageFilter, NoiseBaseImageFilter ); double stdDev = 1.0; @@ -54,7 +54,7 @@ int itkSpeckleNoiseImageFilterTest(int argc, char * argv[]) stdDev = std::stod( argv[3] ); } speckleNoiseImageFilter->SetStandardDeviation( stdDev ); - TEST_SET_GET_VALUE( stdDev, speckleNoiseImageFilter->GetStandardDeviation() ); + ITK_TEST_SET_GET_VALUE( stdDev, speckleNoiseImageFilter->GetStandardDeviation() ); speckleNoiseImageFilter->SetInput( reader->GetOutput() ); @@ -65,7 +65,7 @@ int itkSpeckleNoiseImageFilterTest(int argc, char * argv[]) writer->SetInput( speckleNoiseImageFilter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageSources/test/itkGaborImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkGaborImageSourceTest.cxx index 2def0201ea6..04397bfe914 100644 --- a/Modules/Filtering/ImageSources/test/itkGaborImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGaborImageSourceTest.cxx @@ -51,37 +51,37 @@ int itkGaborImageSourceTestHelper( char* outputFilename, bool calculcateImaginar sigma[2] = 10.0; } gaborImage->SetSigma( sigma ); - TEST_SET_GET_VALUE( sigma, gaborImage->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigma, gaborImage->GetSigma() ); typename GaborSourceType::ArrayType mean = 0.1; gaborImage->SetMean( mean ); - TEST_SET_GET_VALUE( mean, gaborImage->GetMean() ); + ITK_TEST_SET_GET_VALUE( mean, gaborImage->GetMean() ); double frequency = 0.1; gaborImage->SetFrequency( frequency ); - TEST_SET_GET_VALUE( frequency, gaborImage->GetFrequency() ); + ITK_TEST_SET_GET_VALUE( frequency, gaborImage->GetFrequency() ); gaborImage->SetCalculateImaginaryPart( calculcateImaginaryPart ); - TEST_SET_GET_VALUE( calculcateImaginaryPart, gaborImage->GetCalculateImaginaryPart() ); + ITK_TEST_SET_GET_VALUE( calculcateImaginaryPart, gaborImage->GetCalculateImaginaryPart() ); if( calculcateImaginaryPart ) { gaborImage->CalculateImaginaryPartOn(); - TEST_SET_GET_VALUE( true, gaborImage->GetCalculateImaginaryPart() ); + ITK_TEST_SET_GET_VALUE( true, gaborImage->GetCalculateImaginaryPart() ); } else { gaborImage->CalculateImaginaryPartOff(); - TEST_SET_GET_VALUE( false, gaborImage->GetCalculateImaginaryPart() ); + ITK_TEST_SET_GET_VALUE( false, gaborImage->GetCalculateImaginaryPart() ); } - TRY_EXPECT_NO_EXCEPTION( gaborImage->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( gaborImage->Update() ); using WriterType = itk::ImageFileWriter< ImageType >; typename WriterType::Pointer writer = WriterType::New(); writer->SetFileName( outputFilename ); writer->SetInput( gaborImage->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } @@ -107,7 +107,7 @@ int itkGaborImageSourceTest( int argc, char *argv[] ) // Exercise basic object methods // Done outside the helper function in the test because GCC is limited // when calling overloaded base class functions. - EXERCISE_BASIC_OBJECT_METHODS( gaborImage, GaborImageSource, GenerateImageSource ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( gaborImage, GaborImageSource, GenerateImageSource ); int testStatus = EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx b/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx index 4996aca9635..be0db310ab0 100644 --- a/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx @@ -25,27 +25,27 @@ int itkGaborKernelFunctionTest( int itkNotUsed( argc ), char * itkNotUsed( argv using KernelFunctionType = itk::GaborKernelFunction< double >; KernelFunctionType::Pointer gabor = KernelFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( gabor, GaborKernelFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( gabor, GaborKernelFunction, KernelFunctionBase ); double sigma = 1.5; gabor->SetSigma(sigma); - TEST_SET_GET_VALUE( sigma, gabor->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigma, gabor->GetSigma() ); double frequency = 2.; gabor->SetFrequency(frequency); - TEST_SET_GET_VALUE( frequency, gabor->GetFrequency() ); + ITK_TEST_SET_GET_VALUE( frequency, gabor->GetFrequency() ); double phaseOffset = 0.8; gabor->SetPhaseOffset(phaseOffset); - TEST_SET_GET_VALUE( phaseOffset, gabor->GetPhaseOffset() ); + ITK_TEST_SET_GET_VALUE( phaseOffset, gabor->GetPhaseOffset() ); bool calculateImaginaryPart = true; gabor->SetCalculateImaginaryPart( calculateImaginaryPart ); - TEST_SET_GET_VALUE( calculateImaginaryPart, gabor->GetCalculateImaginaryPart() ); + ITK_TEST_SET_GET_VALUE( calculateImaginaryPart, gabor->GetCalculateImaginaryPart() ); gabor->CalculateImaginaryPartOn(); - TEST_SET_GET_VALUE( true, gabor->GetCalculateImaginaryPart() ); + ITK_TEST_SET_GET_VALUE( true, gabor->GetCalculateImaginaryPart() ); double tolerance = 1e-12; double point = 2.86; @@ -63,7 +63,7 @@ int itkGaborKernelFunctionTest( int itkNotUsed( argc ), char * itkNotUsed( argv } gabor->CalculateImaginaryPartOff(); - TEST_SET_GET_VALUE( false, gabor->GetCalculateImaginaryPart() ); + ITK_TEST_SET_GET_VALUE( false, gabor->GetCalculateImaginaryPart() ); expectedValue = 0.093234196962237226; result = gabor->Evaluate( point ); diff --git a/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx index 5533db579e2..6414c6485a6 100644 --- a/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx @@ -59,23 +59,23 @@ int itkGaussianImageSourceTest( int argc, char* argv[] ) gaussianImage->SetSize( size ); for( unsigned int i = 0; i < Dimension; ++i) { - TEST_SET_GET_VALUE( size[i], gaussianImage->GetSize()[i] ); + ITK_TEST_SET_GET_VALUE( size[i], gaussianImage->GetSize()[i] ); } gaussianImage->SetOrigin( origin ); for( unsigned int i = 0; i < Dimension; ++i) { - TEST_SET_GET_VALUE( origin[i], gaussianImage->GetOrigin()[i] ); + ITK_TEST_SET_GET_VALUE( origin[i], gaussianImage->GetOrigin()[i] ); } gaussianImage->SetSpacing( spacing ); for( unsigned int i = 0; i < Dimension; ++i) { - TEST_SET_GET_VALUE( spacing[i], gaussianImage->GetSpacing()[i] ); + ITK_TEST_SET_GET_VALUE( spacing[i], gaussianImage->GetSpacing()[i] ); } gaussianImage->SetDirection( direction ); - TEST_SET_GET_VALUE( direction, gaussianImage->GetDirection() ); + ITK_TEST_SET_GET_VALUE( direction, gaussianImage->GetDirection() ); // Test SetReferenceImage from GenerateImageSource base class. ImageType::Pointer referenceImage = ImageType::New(); @@ -93,20 +93,20 @@ int itkGaussianImageSourceTest( int argc, char* argv[] ) referenceImage->SetDirection( direction ); gaussianImage->SetReferenceImage( referenceImage ); bool useReferenceImage = true; - TEST_SET_GET_BOOLEAN( gaussianImage, UseReferenceImage, useReferenceImage ); + ITK_TEST_SET_GET_BOOLEAN( gaussianImage, UseReferenceImage, useReferenceImage ); gaussianImage->SetReferenceImage( referenceImage ); - TEST_SET_GET_VALUE( referenceImage, gaussianImage->GetReferenceImage() ); + ITK_TEST_SET_GET_VALUE( referenceImage, gaussianImage->GetReferenceImage() ); gaussianImage->SetOutputParametersFromImage( referenceImage ); bool normalized = std::stoi( argv[2] ) != 0; - TEST_SET_GET_BOOLEAN( gaussianImage, Normalized, normalized ); + ITK_TEST_SET_GET_BOOLEAN( gaussianImage, Normalized, normalized ); gaussianImage->SetMean( mean ); - TEST_SET_GET_VALUE( mean, gaussianImage->GetMean() ); + ITK_TEST_SET_GET_VALUE( mean, gaussianImage->GetMean() ); gaussianImage->SetSigma( sigma ); - TEST_SET_GET_VALUE( sigma, gaussianImage->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigma, gaussianImage->GetSigma() ); // Check the parameters @@ -183,7 +183,7 @@ int itkGaussianImageSourceTest( int argc, char* argv[] ) itk::SimpleFilterWatcher watcher( gaussianImage, "GaussianImageSource" ); // Run the pipeline - TRY_EXPECT_NO_EXCEPTION( gaussianImage->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( gaussianImage->Update() ); // Get the output of the image source @@ -198,7 +198,7 @@ int itkGaussianImageSourceTest( int argc, char* argv[] ) writer->SetInput( outputImage ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished" << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageSources/test/itkGridImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkGridImageSourceTest.cxx index c5ea0e341a4..e3c0fb2b039 100644 --- a/Modules/Filtering/ImageSources/test/itkGridImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGridImageSourceTest.cxx @@ -51,7 +51,7 @@ int itkGridImageSourceTest( int argc, char *argv[] ) using GridSourceType = itk::GridImageSource< ImageType >; GridSourceType::Pointer gridImage = GridSourceType::New(); - EXERCISE_BASIC_OBJECT_METHODS( gridImage, GridImageSource, GenerateImageSource ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( gridImage, GridImageSource, GenerateImageSource ); // Specify image parameters @@ -77,7 +77,7 @@ int itkGridImageSourceTest( int argc, char *argv[] ) // Specify grid parameters double scale = 255.0; gridImage->SetScale( scale ); - TEST_SET_GET_VALUE( scale, gridImage->GetScale() ); + ITK_TEST_SET_GET_VALUE( scale, gridImage->GetScale() ); auto sigmaValue = static_cast< GridSourceType::ArrayType::ValueType >( std::stod( argv[3] ) ); @@ -94,7 +94,7 @@ int itkGridImageSourceTest( int argc, char *argv[] ) } } gridImage->SetSigma( sigma ); - TEST_SET_GET_VALUE( sigma, gridImage->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigma, gridImage->GetSigma() ); auto spacing = static_cast< GridSourceType::ArrayType::ValueType >( std::stod( argv[5] ) ); @@ -111,14 +111,14 @@ int itkGridImageSourceTest( int argc, char *argv[] ) } } gridImage->SetGridSpacing( gridSpacing ); - TEST_SET_GET_VALUE( gridSpacing, gridImage->GetGridSpacing() ); + ITK_TEST_SET_GET_VALUE( gridSpacing, gridImage->GetGridSpacing() ); auto offset = static_cast< GridSourceType::ArrayType::ValueType >( std::stod( argv[7] ) ); GridSourceType::ArrayType gridOffset; gridOffset.Fill( offset ); gridImage->SetGridOffset( gridOffset ); - TEST_SET_GET_VALUE( gridOffset, gridImage->GetGridOffset() ); + ITK_TEST_SET_GET_VALUE( gridOffset, gridImage->GetGridOffset() ); auto gridAllDimensions = static_cast< bool >( std::stoi( argv[8] ) ); @@ -131,7 +131,7 @@ int itkGridImageSourceTest( int argc, char *argv[] ) whichDimension[ImageDimension - 1] = !gridAllDimensions; } gridImage->SetWhichDimensions( whichDimension ); - TEST_SET_GET_VALUE( whichDimension, gridImage->GetWhichDimensions() ); + ITK_TEST_SET_GET_VALUE( whichDimension, gridImage->GetWhichDimensions() ); auto useBSplineKernel = static_cast< bool >( std::stoi( argv[10] ) ); @@ -156,14 +156,14 @@ int itkGridImageSourceTest( int argc, char *argv[] ) itk::SimpleFilterWatcher watcher( gridImage, "GridImageSource" ); - TRY_EXPECT_NO_EXCEPTION( gridImage->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( gridImage->Update() ); using WriterType = itk::ImageFileWriter; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( argv[1] ); writer->SetInput( gridImage->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished" << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx index 89e9628a213..9240a3e74aa 100644 --- a/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx @@ -41,14 +41,14 @@ int itkPhysicalPointImageSourceTest( const std::string &fname, typename PhysicalPointImageSourceType::Pointer physicalPointImageSource = PhysicalPointImageSourceType::New(); - TRY_EXPECT_NO_EXCEPTION( physicalPointImageSource->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( physicalPointImageSource->UpdateLargestPossibleRegion() ); physicalPointImageSource->SetSize(size); physicalPointImageSource->SetSpacing(spacing); physicalPointImageSource->SetOrigin(origin); physicalPointImageSource->SetDirection( direction ); - TRY_EXPECT_NO_EXCEPTION( physicalPointImageSource->UpdateLargestPossibleRegion() ); + ITK_TRY_EXPECT_NO_EXCEPTION( physicalPointImageSource->UpdateLargestPossibleRegion() ); using ValueImageType = itk::Image< typename itk::NumericTraits< typename ImageType::PixelType >::ValueType, ImageType::ImageDimension >; @@ -63,7 +63,7 @@ int itkPhysicalPointImageSourceTest( const std::string &fname, writer->SetFileName( fname ); writer->SetInput( vif->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } @@ -100,7 +100,7 @@ int itkPhysicalPointImageSourceTest( int argc, char *argv[] ) PhysicalPointImageSourceType::Pointer physicalPointImageSource = PhysicalPointImageSourceType::New(); - EXERCISE_BASIC_OBJECT_METHODS( physicalPointImageSource, + ITK_EXERCISE_BASIC_OBJECT_METHODS( physicalPointImageSource, PhysicalPointImageSource, GenerateImageSource ); diff --git a/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx index 59dcda33148..a199c8acf4c 100644 --- a/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx @@ -49,7 +49,7 @@ int itkAdaptiveHistogramEqualizationImageFilterTest( int argc, char * argv[] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, AdaptiveHistogramEqualizationImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, AdaptiveHistogramEqualizationImageFilter, MovingHistogramImageFilter ); itk::SimpleFilterWatcher watcher(filter); @@ -59,11 +59,11 @@ int itkAdaptiveHistogramEqualizationImageFilterTest( int argc, char * argv[] ) float alpha = std::stod(argv[4]); filter->SetAlpha( alpha ); - TEST_SET_GET_VALUE( alpha, filter->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alpha, filter->GetAlpha() ); float beta = std::stod(argv[5]); filter->SetBeta( beta ); - TEST_SET_GET_VALUE( beta, filter->GetBeta() ); + ITK_TEST_SET_GET_VALUE( beta, filter->GetBeta() ); // // The output of the filter is connected here to a intensity rescaler filter @@ -91,7 +91,7 @@ int itkAdaptiveHistogramEqualizationImageFilterTest( int argc, char * argv[] ) writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx index 1212ff05a35..253a1449255 100644 --- a/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx @@ -176,7 +176,7 @@ int itkLabelOverlapMeasuresImageFilterTest( int argc, char *argv[] ) // Exercise basic object methods // Done outside the helper function in the test because GCC is limited // when calling overloaded base class functions. - EXERCISE_BASIC_OBJECT_METHODS( labelOverlapMeasuresImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( labelOverlapMeasuresImageFilter, LabelOverlapMeasuresImageFilter, ImageToImageFilter ); diff --git a/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx index b25af325027..28ff77b38fe 100644 --- a/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx @@ -70,7 +70,7 @@ int itkStatisticsImageFilterTest(int argc, char *argv[]) filter->SetInput (image); filter->SetNumberOfStreamDivisions( numberOfStreamDivisions ); - TRY_EXPECT_NO_EXCEPTION(filter->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(filter->Update()); if ( itk::Math::NotAlmostEquals( filter->GetMinimum(), fillValue) ) { @@ -121,7 +121,7 @@ int itkStatisticsImageFilterTest(int argc, char *argv[]) filter->SetInput(source->GetOutput()); filter->SetNumberOfStreamDivisions( numberOfStreamDivisions); - TRY_EXPECT_NO_EXCEPTION(filter->UpdateLargestPossibleRegion()); + ITK_TRY_EXPECT_NO_EXCEPTION(filter->UpdateLargestPossibleRegion()); double expectedSigma = std::sqrt((maxValue-minValue)*(maxValue-minValue)/12.0); double epsilon = (maxValue - minValue) * .001; @@ -158,7 +158,7 @@ int itkStatisticsImageFilterTest(int argc, char *argv[]) DFilterType::Pointer dfilter = DFilterType::New(); dfilter->SetInput(dImage); dfilter->SetNumberOfStreamDivisions( numberOfStreamDivisions ); - TRY_EXPECT_NO_EXCEPTION(dfilter->UpdateLargestPossibleRegion()); + ITK_TRY_EXPECT_NO_EXCEPTION(dfilter->UpdateLargestPossibleRegion()); double testMean = dfilter->GetMean(); double testVariance = dfilter->GetVariance(); double diff = itk::Math::abs(testMean - knownMean); diff --git a/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx index 9eafa54db0f..8c20c45e29f 100644 --- a/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx @@ -65,7 +65,7 @@ int itkAggregateLabelMapFilterTest(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx index 910d45feb29..0807c8dde56 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx @@ -76,19 +76,19 @@ int itkAttributeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for NumberOfObjects unsigned long nbOfObjects = std::stoi( argv[3] ); opening->SetNumberOfObjects( nbOfObjects ); - TEST_SET_GET_VALUE( nbOfObjects , opening->GetNumberOfObjects() ); + ITK_TEST_SET_GET_VALUE( nbOfObjects , opening->GetNumberOfObjects() ); //testing get and set macros for ReverseOrdering //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); bool reverseOrdering = std::stoi( argv[4] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); opening->SetInput( labelMap ); @@ -105,7 +105,7 @@ int itkAttributeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx index ce64aebfd86..882651d2245 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx @@ -95,10 +95,10 @@ int itkAttributeLabelObjectAccessorsTest1(int argc, char * argv[]) labelObject->SetAttribute( mean ); // make sure that we get the same value - TEST_SET_GET_VALUE( mean, labelObject->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( mean, labelObject->GetAttribute() ); // make sure that the accessor provide the same values than the GetAttribute() method itk::Functor::AttributeLabelObjectAccessor accessor; - TEST_SET_GET_VALUE( accessor(labelObject), labelObject->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( accessor(labelObject), labelObject->GetAttribute() ); // exercise the print self method labelObject->Print( std::cout ); diff --git a/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx index a7806a6e486..44247024053 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx @@ -76,19 +76,19 @@ int itkAttributeOpeningLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for Lambda auto lambda = static_cast(std::stod( argv[3] )); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); //testing get and set macros for ReverseOrdering //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); bool reverseOrdering = std::stoi( argv[4] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); opening->SetInput( labelMap ); @@ -105,7 +105,7 @@ int itkAttributeOpeningLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx index 6c0dc76f7b4..a9b7fb018f9 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx @@ -76,14 +76,14 @@ int itkAttributeRelabelLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for ReverseOrdering //testing boolean macro for ReverseOrdering relabel->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, relabel->GetReverseOrdering() ); relabel->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, relabel->GetReverseOrdering() ); bool reverseOrdering = std::stoi( argv[3] ); relabel->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , relabel->GetReverseOrdering() ); relabel->SetInput( labelMap ); @@ -100,7 +100,7 @@ int itkAttributeRelabelLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx index 4aeea6feaaa..2451ece2c44 100644 --- a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx @@ -69,7 +69,7 @@ int itkAutoCropLabelMapFilterTest1( int argc, char * argv [] ) using AutoCropLabelMapFilterType = itk::AutoCropLabelMapFilter< LabelMapType >; AutoCropLabelMapFilterType::Pointer autoCropFilter = AutoCropLabelMapFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( autoCropFilter, AutoCropLabelMapFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( autoCropFilter, AutoCropLabelMapFilter, ChangeRegionLabelMapFilter ); autoCropFilter->SetInput( imageToLabelMapFilter->GetOutput() ); @@ -78,7 +78,7 @@ int itkAutoCropLabelMapFilterTest1( int argc, char * argv [] ) size[0] = std::stoi( argv[4] ); size[1] = std::stoi( argv[5] ); autoCropFilter->SetCropBorder( size ); - TEST_SET_GET_VALUE( size, autoCropFilter->GetCropBorder() ); + ITK_TEST_SET_GET_VALUE( size, autoCropFilter->GetCropBorder() ); itk::SimpleFilterWatcher watcher(autoCropFilter, "AutoCropLabelMapFilter"); @@ -94,7 +94,7 @@ int itkAutoCropLabelMapFilterTest1( int argc, char * argv [] ) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx index 531474eec37..cbca484962c 100644 --- a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx +++ b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx @@ -72,7 +72,7 @@ int itkAutoCropLabelMapFilterTest2( int argc, char * argv [] ) using AutoCropLabelMapFilterType = itk::AutoCropLabelMapFilter< LabelMapType >; AutoCropLabelMapFilterType::Pointer autoCropFilter = AutoCropLabelMapFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( autoCropFilter, AutoCropLabelMapFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( autoCropFilter, AutoCropLabelMapFilter, ChangeRegionLabelMapFilter ); autoCropFilter->SetInput( select->GetOutput() ); @@ -92,13 +92,13 @@ int itkAutoCropLabelMapFilterTest2( int argc, char * argv [] ) select->SetLabel( std::stoi(argv[4]) ); labelMapToLabelImageFilter->UpdateLargestPossibleRegion(); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Second label select->SetLabel( std::stoi(argv[5]) ); labelMapToLabelImageFilter->UpdateLargestPossibleRegion(); writer->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx index bc161865d15..6bb38a4cba4 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx @@ -42,39 +42,39 @@ int itkBinaryGrindPeakImageFilterTest1( int argc, char * argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); using BinaryGrindPeakImageFilterType = itk::BinaryGrindPeakImageFilter; BinaryGrindPeakImageFilterType::Pointer binaryGrindPeakImageFilter = BinaryGrindPeakImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( binaryGrindPeakImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( binaryGrindPeakImageFilter, BinaryGrindPeakImageFilter, ImageToImageFilter ); binaryGrindPeakImageFilter->SetInput( reader->GetOutput() ); bool fullyConnected = std::stoi( argv[3] ) != 0; binaryGrindPeakImageFilter->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected, binaryGrindPeakImageFilter->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected, binaryGrindPeakImageFilter->GetFullyConnected() ); if( fullyConnected ) { binaryGrindPeakImageFilter->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, binaryGrindPeakImageFilter->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, binaryGrindPeakImageFilter->GetFullyConnected() ); } else { binaryGrindPeakImageFilter->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, binaryGrindPeakImageFilter->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, binaryGrindPeakImageFilter->GetFullyConnected() ); } auto foregroundValue = static_cast< BinaryGrindPeakImageFilterType::InputImagePixelType >( std::stod( argv[4] ) ); binaryGrindPeakImageFilter->SetForegroundValue( foregroundValue ); - TEST_SET_GET_VALUE( foregroundValue, binaryGrindPeakImageFilter->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( foregroundValue, binaryGrindPeakImageFilter->GetForegroundValue() ); auto backgroundValue = static_cast< BinaryGrindPeakImageFilterType::InputImagePixelType >( std::stoi( argv[5] ) ); binaryGrindPeakImageFilter->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, binaryGrindPeakImageFilter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, binaryGrindPeakImageFilter->GetBackgroundValue() ); itk::SimpleFilterWatcher watcher( binaryGrindPeakImageFilter, "BinaryGrindPeakImageFilter" ); @@ -84,7 +84,7 @@ int itkBinaryGrindPeakImageFilterTest1( int argc, char * argv[] ) writer->SetInput( binaryGrindPeakImageFilter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx index 8a49c27dae3..1879c45f054 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx @@ -54,7 +54,7 @@ int itkBinaryImageToLabelMapFilterTest( int argc, char * argv [] ) using ImageToLabelType = itk::BinaryImageToLabelMapFilter< ImageType, LabelMapType >; ImageToLabelType::Pointer imageToLabel = ImageToLabelType::New(); // test the behavior without input - TRY_EXPECT_EXCEPTION( imageToLabel->Update() ); + ITK_TRY_EXPECT_EXCEPTION( imageToLabel->Update() ); imageToLabel->ResetPipeline(); imageToLabel->SetFullyConnected( std::stoi(argv[3]) ); @@ -81,11 +81,11 @@ int itkBinaryImageToLabelMapFilterTest( int argc, char * argv [] ) if( expectfailure ) { - TRY_EXPECT_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_EXCEPTION( writer->Update() ); } else { - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); } imageToLabel->GetOutput()->PrintLabelObjects(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest2.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest2.cxx index cb9af03b183..6ad944b607f 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest2.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest2.cxx @@ -60,7 +60,7 @@ int itkBinaryImageToLabelMapFilterTest2( int argc, char * argv [] ) std::cout << "There are " << imageToLabel->GetOutput()->GetNumberOfLabelObjects() << " objects." << std::endl; - TEST_EXPECT_EQUAL( imageToLabel->GetOutput()->GetNumberOfLabelObjects(), imageToLabel->GetNumberOfObjects() ); + ITK_TEST_EXPECT_EQUAL( imageToLabel->GetOutput()->GetNumberOfLabelObjects(), imageToLabel->GetNumberOfObjects() ); using LabelToImageType = itk::LabelMapToLabelImageFilter< LabelMapType, ImageType>; LabelToImageType::Pointer labelToImage = LabelToImageType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx index a21baba18be..dd89ce36eb0 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx @@ -58,51 +58,51 @@ int itkBinaryImageToShapeLabelMapFilterTest1(int argc, char * argv[]) //testing get/set FullyConnected macro bool fullyConnected = std::stoi(argv[3]); i2l->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected, i2l->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected, i2l->GetFullyConnected() ); //testing boolean FullyConnected macro i2l->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, i2l->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetFullyConnected() ); i2l->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, i2l->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetFullyConnected() ); //testing get/set InputForegroundValue macro int inputForegroundValue = ( std::stoi(argv[4]) ); i2l->SetInputForegroundValue( inputForegroundValue ); - TEST_SET_GET_VALUE( inputForegroundValue, i2l->GetInputForegroundValue() ); + ITK_TEST_SET_GET_VALUE( inputForegroundValue, i2l->GetInputForegroundValue() ); //testing get/set OutputBackgroundValue macro int outputBackgroundValue = ( std::stoi(argv[5]) ); i2l->SetOutputBackgroundValue( outputBackgroundValue ); - TEST_SET_GET_VALUE( outputBackgroundValue, i2l->GetOutputBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( outputBackgroundValue, i2l->GetOutputBackgroundValue() ); //testing get/set ComputeFeretDiameter macro bool computeFeretDiameter = ( std::stoi(argv[6]) ); i2l->SetComputeFeretDiameter( computeFeretDiameter ); - TEST_SET_GET_VALUE( computeFeretDiameter, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( computeFeretDiameter, i2l->GetComputeFeretDiameter() ); //testing boolean ComputeFeretDiameter macro i2l->ComputeFeretDiameterOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputeFeretDiameter() ); i2l->ComputeFeretDiameterOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputeFeretDiameter() ); //testing get/set ComputePerimeter macro bool computePerimeter = std::stoi(argv[7]); i2l->SetComputePerimeter( computePerimeter ); - TEST_SET_GET_VALUE( computePerimeter, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( computePerimeter, i2l->GetComputePerimeter() ); //testing boolean ComputePerimeter macro i2l->ComputePerimeterOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputePerimeter() ); i2l->ComputePerimeterOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputePerimeter() ); i2l->SetComputeOrientedBoundingBox(true); - TEST_SET_GET_VALUE(true, i2l->GetComputeOrientedBoundingBox() ); + ITK_TEST_SET_GET_VALUE(true, i2l->GetComputeOrientedBoundingBox() ); using L2IType = itk::LabelMapToLabelImageFilter< LabelMapType, ImageType>; @@ -117,7 +117,7 @@ int itkBinaryImageToShapeLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx index 987036a9f86..b0f007d1044 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx @@ -65,65 +65,65 @@ int itkBinaryImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) //testing get/set FullyConnected macro bool fullyConnected = std::stoi(argv[4]); i2l->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected, i2l->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected, i2l->GetFullyConnected() ); //testing boolean FullyConnected macro i2l->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, i2l->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetFullyConnected() ); i2l->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, i2l->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetFullyConnected() ); //testing get/set InputForegroundValue macro int inputForegroundValue = ( std::stoi(argv[5]) ); i2l->SetInputForegroundValue( inputForegroundValue ); - TEST_SET_GET_VALUE( inputForegroundValue, i2l->GetInputForegroundValue() ); + ITK_TEST_SET_GET_VALUE( inputForegroundValue, i2l->GetInputForegroundValue() ); //testing get/set OutputBackgroundValue macro unsigned int outputBackgroundValue = ( std::stoi(argv[6]) ); i2l->SetOutputBackgroundValue( outputBackgroundValue ); - TEST_SET_GET_VALUE( outputBackgroundValue, i2l->GetOutputBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( outputBackgroundValue, i2l->GetOutputBackgroundValue() ); //testing get/set ComputeFeretDiameter macro bool computeFeretDiameter = ( std::stoi(argv[7]) ); i2l->SetComputeFeretDiameter( computeFeretDiameter ); - TEST_SET_GET_VALUE( computeFeretDiameter, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( computeFeretDiameter, i2l->GetComputeFeretDiameter() ); //testing boolean ComputeFeretDiameter macro i2l->ComputeFeretDiameterOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputeFeretDiameter() ); i2l->ComputeFeretDiameterOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputeFeretDiameter() ); //testing get/set ComputePerimeter macro bool computePerimeter = std::stoi(argv[8]); i2l->SetComputePerimeter( computePerimeter ); - TEST_SET_GET_VALUE( computePerimeter, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( computePerimeter, i2l->GetComputePerimeter() ); //testing boolean ComputePerimeter macro i2l->ComputePerimeterOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputePerimeter() ); i2l->ComputePerimeterOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputePerimeter() ); //testing get/set ComputeHistogram macro bool computeHistogram = ( std::stoi(argv[9]) ); i2l->SetComputeHistogram( computeHistogram ); - TEST_SET_GET_VALUE( computeHistogram, i2l->GetComputeHistogram() ); + ITK_TEST_SET_GET_VALUE( computeHistogram, i2l->GetComputeHistogram() ); //testing boolean ComputeHistogram macro i2l->ComputeHistogramOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputeHistogram() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputeHistogram() ); i2l->ComputeHistogramOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputeHistogram() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputeHistogram() ); //testing get/set NumberOfBins macro unsigned int numberOfBins = ( std::stoi(argv[10]) ); i2l->SetNumberOfBins( numberOfBins ); - TEST_SET_GET_VALUE( numberOfBins, i2l->GetNumberOfBins() ); + ITK_TEST_SET_GET_VALUE( numberOfBins, i2l->GetNumberOfBins() ); using L2IType = itk::LabelMapToLabelImageFilter< I2LType::OutputImageType, ImageType>; L2IType::Pointer l2i = L2IType::New(); @@ -137,7 +137,7 @@ int itkBinaryImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx index e1b576f13b5..79a66fbff0d 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx @@ -52,11 +52,11 @@ int itkBinaryReconstructionByDilationImageFilterTest(int argc, char * argv[]) //testing get and set macros for Lambda int fg = std::stoi( argv[4] ); reconstruction->SetForegroundValue( fg ); - TEST_SET_GET_VALUE( fg , reconstruction->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( fg , reconstruction->GetForegroundValue() ); int bg = std::stoi( argv[5] ); reconstruction->SetBackgroundValue( bg ); - TEST_SET_GET_VALUE( bg , reconstruction->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( bg , reconstruction->GetBackgroundValue() ); reconstruction->SetMaskImage( reader->GetOutput() ); reconstruction->SetInput( "MaskImage", reader->GetOutput() ); @@ -72,7 +72,7 @@ int itkBinaryReconstructionByDilationImageFilterTest(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx index 9af27d4522d..efe41f83070 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx @@ -51,11 +51,11 @@ int itkBinaryReconstructionByErosionImageFilterTest(int argc, char * argv[]) //testing get and set macros for Lambda int fg = std::stoi( argv[4] ); reconstruction->SetForegroundValue( fg ); - TEST_SET_GET_VALUE( fg , reconstruction->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( fg , reconstruction->GetForegroundValue() ); int bg = std::stoi( argv[5] ); reconstruction->SetBackgroundValue( bg ); - TEST_SET_GET_VALUE( bg , reconstruction->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( bg , reconstruction->GetBackgroundValue() ); reconstruction->SetMaskImage( reader->GetOutput() ); reconstruction->SetInput( "MaskImage", reader->GetOutput() ); @@ -71,7 +71,7 @@ int itkBinaryReconstructionByErosionImageFilterTest(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx index 4ca3ca150b2..308a24f2bcc 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx @@ -64,7 +64,7 @@ int itkBinaryReconstructionLabelMapFilterTest(int argc, char * argv[]) //testing get and set macros for Lambda int fg = std::stoi( argv[4] ); reconstruction->SetForegroundValue( fg ); - TEST_SET_GET_VALUE( fg , reconstruction->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( fg , reconstruction->GetForegroundValue() ); reconstruction->SetInput( i2l->GetOutput() ); reconstruction->SetMarkerImage( reader2->GetOutput() ); @@ -89,7 +89,7 @@ int itkBinaryReconstructionLabelMapFilterTest(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx index fbaafccc944..87a630b88b9 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx @@ -50,51 +50,51 @@ int itkBinaryShapeKeepNObjectsImageFilterTest1(int argc, char * argv[]) //testing get/set ForegroundValue macro int ForegroundValue = ( std::stoi(argv[3]) ); KeepNObjects->SetForegroundValue( ForegroundValue ); - TEST_SET_GET_VALUE( ForegroundValue, KeepNObjects->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( ForegroundValue, KeepNObjects->GetForegroundValue() ); //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[4]) ); KeepNObjects->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); //testing get and set macros for Lambda unsigned int numberOfObjects = std::stoi( argv[5] ); KeepNObjects->SetNumberOfObjects( numberOfObjects ); - TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); + ITK_TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); //testing boolean macro for ReverseOrdering KeepNObjects->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); KeepNObjects->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[6] ); KeepNObjects->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); //testing boolean macro for FullyConnected KeepNObjects->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, KeepNObjects->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, KeepNObjects->GetFullyConnected() ); KeepNObjects->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, KeepNObjects->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, KeepNObjects->GetFullyConnected() ); //testing get and set macros or FullyConnected bool fullyConnected = std::stoi( argv[7] ); KeepNObjects->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected , KeepNObjects->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected , KeepNObjects->GetFullyConnected() ); //testing get and set macros for Attribute KeepNObjects->SetAttribute(BinaryKeepNObjectsType::LabelObjectType::PERIMETER_ON_BORDER); - TEST_SET_GET_VALUE( BinaryKeepNObjectsType::LabelObjectType::PERIMETER_ON_BORDER, KeepNObjects->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( BinaryKeepNObjectsType::LabelObjectType::PERIMETER_ON_BORDER, KeepNObjects->GetAttribute() ); const std::string attributeByName{ argv[8] }; KeepNObjects->SetAttribute( attributeByName ); // SetAttribute accepts a string for conversion to internal label code const BinaryKeepNObjectsType::AttributeType attributeByCode = BinaryKeepNObjectsType::LabelObjectType::LABEL; - TEST_SET_GET_VALUE( attributeByCode, KeepNObjects->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attributeByCode, KeepNObjects->GetAttribute() ); itk::SimpleFilterWatcher watcher(KeepNObjects, "filter"); @@ -104,7 +104,7 @@ int itkBinaryShapeKeepNObjectsImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx index c272ec807d1..bc5139e51b3 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx @@ -50,46 +50,46 @@ int itkBinaryShapeOpeningImageFilterTest1(int argc, char * argv[]) //testing get/set ForegroundValue macro int ForegroundValue = ( std::stoi(argv[3]) ); opening->SetForegroundValue( ForegroundValue ); - TEST_SET_GET_VALUE( ForegroundValue, opening->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( ForegroundValue, opening->GetForegroundValue() ); //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[4]) ); opening->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); //testing get and set macros for Lambda double lambda = std::stod( argv[5] ); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[6] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing boolean macro for FullyConnected opening->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, opening->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetFullyConnected() ); opening->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, opening->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetFullyConnected() ); //testing get and set macros or FullyConnected bool fullyConnected = std::stoi( argv[7] ); opening->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected , opening->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected , opening->GetFullyConnected() ); //testing get and set macros for Attribute BinaryOpeningType::AttributeType attribute = std::stoi( argv[8] ); opening->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); itk::SimpleFilterWatcher watcher(opening, "filter"); @@ -99,7 +99,7 @@ int itkBinaryShapeOpeningImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx index e6b4292fcbf..41d23cd4459 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx @@ -54,46 +54,46 @@ int itkBinaryStatisticsKeepNObjectsImageFilterTest1(int argc, char * argv[]) //testing get/set ForegroundValue macro int ForegroundValue = ( std::stoi(argv[4]) ); KeepNObjects->SetForegroundValue( ForegroundValue ); - TEST_SET_GET_VALUE( ForegroundValue, KeepNObjects->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( ForegroundValue, KeepNObjects->GetForegroundValue() ); //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[5]) ); KeepNObjects->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); //testing get and set macros for NumberOfObjects unsigned int numberOfObjects = std::stoi( argv[6] ); KeepNObjects->SetNumberOfObjects( numberOfObjects ); - TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); + ITK_TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); //testing boolean macro for ReverseOrdering KeepNObjects->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); KeepNObjects->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[7] ); KeepNObjects->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); //testing boolean macro for FullyConnected KeepNObjects->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, KeepNObjects->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, KeepNObjects->GetFullyConnected() ); KeepNObjects->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, KeepNObjects->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, KeepNObjects->GetFullyConnected() ); //testing get and set macros or FullyConnected bool fullyConnected = std::stoi( argv[8] ); KeepNObjects->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected , KeepNObjects->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected , KeepNObjects->GetFullyConnected() ); //testing get and set macros for Attribute BinaryKeepNObjectsType::AttributeType attribute = std::stoi( argv[9] ); KeepNObjects->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, KeepNObjects->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, KeepNObjects->GetAttribute() ); itk::SimpleFilterWatcher watcher(KeepNObjects, "filter"); @@ -103,7 +103,7 @@ int itkBinaryStatisticsKeepNObjectsImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx index 4437a8ae492..748b4189bb2 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx @@ -54,46 +54,46 @@ int itkBinaryStatisticsOpeningImageFilterTest1(int argc, char * argv[]) //testing get/set ForegroundValue macro int ForegroundValue = ( std::stoi(argv[4]) ); opening->SetForegroundValue( ForegroundValue ); - TEST_SET_GET_VALUE( ForegroundValue, opening->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( ForegroundValue, opening->GetForegroundValue() ); //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[5]) ); opening->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); //testing get and set macros for Lambda double lambda = std::stod( argv[6] ); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[7] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing boolean macro for FullyConnected opening->FullyConnectedOn(); - TEST_SET_GET_VALUE( true, opening->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetFullyConnected() ); opening->FullyConnectedOff(); - TEST_SET_GET_VALUE( false, opening->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetFullyConnected() ); //testing get and set macros or FullyConnected bool fullyConnected = std::stoi( argv[8] ); opening->SetFullyConnected( fullyConnected ); - TEST_SET_GET_VALUE( fullyConnected , opening->GetFullyConnected() ); + ITK_TEST_SET_GET_VALUE( fullyConnected , opening->GetFullyConnected() ); //testing get and set macros for Attribute BinaryOpeningType::AttributeType attribute = std::stoi( argv[9] ); opening->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); itk::SimpleFilterWatcher watcher(opening, "filter"); @@ -103,7 +103,7 @@ int itkBinaryStatisticsOpeningImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx index 3aacc1fb873..abfde7aca9d 100644 --- a/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx @@ -89,7 +89,7 @@ int itkChangeLabelLabelMapFilterTest( int argc, char * argv [] ) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "GetNameOfClass() = " << changeFilter->GetNameOfClass() << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx index 081d8a1640c..c4eedb07825 100644 --- a/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx @@ -74,10 +74,10 @@ int itkChangeRegionLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); change->SetInput( nullptr ); - TRY_EXPECT_EXCEPTION( change->Update() ); + ITK_TRY_EXPECT_EXCEPTION( change->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx index bad9198a0e5..dbb5ea6f90c 100644 --- a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx @@ -66,7 +66,7 @@ int itkConvertLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // for visual validation std::cout << " ============ original label map ============" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx index cf8b4c52f77..85bd8e7e9d5 100644 --- a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx +++ b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx @@ -258,7 +258,7 @@ int itkConvertLabelMapFilterTest2(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // for visual validation std::cout << " ============ original label map ============" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx index 65614134945..104f73201b2 100644 --- a/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx @@ -62,7 +62,7 @@ int itkCropLabelMapFilterTest1(int argc, char * argv[]) using CropType = itk::CropLabelMapFilter< LabelMapType >; CropType::Pointer crop = CropType::New(); // test the behavior without input - TRY_EXPECT_EXCEPTION( crop->Update() ); + ITK_TRY_EXPECT_EXCEPTION( crop->Update() ); crop->ResetPipeline(); crop->SetInput( i2l->GetOutput() ); @@ -71,8 +71,8 @@ int itkCropLabelMapFilterTest1(int argc, char * argv[]) size[1] = std::stoi( argv[4] ); crop->SetCropSize( size ); - TEST_SET_GET_VALUE( size, crop->GetUpperBoundaryCropSize() ); - TEST_SET_GET_VALUE( size, crop->GetLowerBoundaryCropSize() ); + ITK_TEST_SET_GET_VALUE( size, crop->GetUpperBoundaryCropSize() ); + ITK_TEST_SET_GET_VALUE( size, crop->GetLowerBoundaryCropSize() ); itk::SimpleFilterWatcher watcher6(crop, "filter"); @@ -86,7 +86,7 @@ int itkCropLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx index 455dd628b3d..8b8147cf544 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx @@ -51,15 +51,15 @@ int itkLabelImageToShapeLabelMapFilterTest1(int argc, char * argv[]) const PixelType backgroundValue = std::stoi(argv[3]); l2s->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, l2s->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, l2s->GetBackgroundValue() ); const bool computeFeretDiameter = std::stoi( argv[4]); l2s->SetComputeFeretDiameter( computeFeretDiameter ); - TEST_SET_GET_VALUE( computeFeretDiameter, l2s->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( computeFeretDiameter, l2s->GetComputeFeretDiameter() ); const bool computePerimeter = std::stoi( argv[5]); l2s->SetComputePerimeter( computePerimeter ); - TEST_SET_GET_VALUE( computePerimeter, l2s->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( computePerimeter, l2s->GetComputeFeretDiameter() ); using L2IType = itk::LabelMapToLabelImageFilter< LabelMapType, ImageType>; @@ -72,7 +72,7 @@ int itkLabelImageToShapeLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx index 58abf636056..860f0f390d0 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx @@ -65,48 +65,48 @@ int itkLabelImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[4]) ); i2l->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, i2l->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, i2l->GetBackgroundValue() ); //testing get/set ComputeFeretDiameter macro bool computeFeretDiameter = ( std::stoi(argv[5]) ); i2l->SetComputeFeretDiameter( computeFeretDiameter ); - TEST_SET_GET_VALUE( computeFeretDiameter, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( computeFeretDiameter, i2l->GetComputeFeretDiameter() ); //testing boolean ComputeFeretDiameter macro i2l->ComputeFeretDiameterOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputeFeretDiameter() ); i2l->ComputeFeretDiameterOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputeFeretDiameter() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputeFeretDiameter() ); //testing get/set ComputePerimeter macro bool computePerimeter = std::stoi(argv[6]); i2l->SetComputePerimeter( computePerimeter ); - TEST_SET_GET_VALUE( computePerimeter, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( computePerimeter, i2l->GetComputePerimeter() ); //testing boolean ComputePerimeter macro i2l->ComputePerimeterOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputePerimeter() ); i2l->ComputePerimeterOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputePerimeter() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputePerimeter() ); //testing get/set ComputeHistogram macro bool computeHistogram = ( std::stoi(argv[7]) ); i2l->SetComputeHistogram( computeHistogram ); - TEST_SET_GET_VALUE( computeHistogram, i2l->GetComputeHistogram() ); + ITK_TEST_SET_GET_VALUE( computeHistogram, i2l->GetComputeHistogram() ); //testing boolean ComputeHistogram macro i2l->ComputeHistogramOff(); - TEST_SET_GET_VALUE( false, i2l->GetComputeHistogram() ); + ITK_TEST_SET_GET_VALUE( false, i2l->GetComputeHistogram() ); i2l->ComputeHistogramOn(); - TEST_SET_GET_VALUE( true, i2l->GetComputeHistogram() ); + ITK_TEST_SET_GET_VALUE( true, i2l->GetComputeHistogram() ); //testing get/set NumberOfBins macro unsigned int numberOfBins = ( std::stoi(argv[8]) ); i2l->SetNumberOfBins( numberOfBins ); - TEST_SET_GET_VALUE( numberOfBins, i2l->GetNumberOfBins() ); + ITK_TEST_SET_GET_VALUE( numberOfBins, i2l->GetNumberOfBins() ); using L2IType = itk::LabelMapToLabelImageFilter< I2LType::OutputImageType, ImageType>; L2IType::Pointer l2i = L2IType::New(); @@ -120,7 +120,7 @@ int itkLabelImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx index 01239f7cc2e..dc9c712b219 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx @@ -75,7 +75,7 @@ int itkLabelMapMaskImageFilterTest( int argc, char * argv[] ) using MaskFilterType = itk::LabelMapMaskImageFilter< LabelMapType, ImageType >; MaskFilterType::Pointer maskFilter = MaskFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( maskFilter, LabelMapMaskImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( maskFilter, LabelMapMaskImageFilter, LabelMapFilter ); maskFilter->SetInput( i2l->GetOutput() ); @@ -84,44 +84,44 @@ int itkLabelMapMaskImageFilterTest( int argc, char * argv[] ) MaskFilterType::InputImagePixelType label = std::stoi( argv[4] ); maskFilter->SetLabel( label ); - TEST_SET_GET_VALUE( label, maskFilter->GetLabel() ); + ITK_TEST_SET_GET_VALUE( label, maskFilter->GetLabel() ); MaskFilterType::OutputImagePixelType backgroundValue = std::stoi( argv[5] ); maskFilter->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, maskFilter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, maskFilter->GetBackgroundValue() ); auto negated = static_cast< bool >(std::stoi( argv[6] ) ); maskFilter->SetNegated( negated ); - TEST_SET_GET_VALUE( negated, maskFilter->GetNegated() ); + ITK_TEST_SET_GET_VALUE( negated, maskFilter->GetNegated() ); if( negated ) { maskFilter->NegatedOn(); - TEST_SET_GET_VALUE( true, maskFilter->GetNegated() ); + ITK_TEST_SET_GET_VALUE( true, maskFilter->GetNegated() ); } else { maskFilter->NegatedOff(); - TEST_SET_GET_VALUE( false, maskFilter->GetNegated() ); + ITK_TEST_SET_GET_VALUE( false, maskFilter->GetNegated() ); } auto crop = static_cast< bool >( std::stoi( argv[7] ) ); maskFilter->SetCrop( crop ); - TEST_SET_GET_VALUE( crop, maskFilter->GetCrop() ); + ITK_TEST_SET_GET_VALUE( crop, maskFilter->GetCrop() ); if( crop ) { maskFilter->CropOn(); - TEST_SET_GET_VALUE( true, maskFilter->GetCrop() ); + ITK_TEST_SET_GET_VALUE( true, maskFilter->GetCrop() ); } else { maskFilter->CropOff(); - TEST_SET_GET_VALUE( false, maskFilter->GetCrop() ); + ITK_TEST_SET_GET_VALUE( false, maskFilter->GetCrop() ); } MaskFilterType::SizeType border; border.Fill( std::stoi(argv[8]) ); maskFilter->SetCropBorder( border ); - TEST_SET_GET_VALUE( border, maskFilter->GetCropBorder() ); + ITK_TEST_SET_GET_VALUE( border, maskFilter->GetCropBorder() ); itk::SimpleFilterWatcher watcher( maskFilter, "LabelMapMaskImageFilter" ); @@ -131,7 +131,7 @@ int itkLabelMapMaskImageFilterTest( int argc, char * argv[] ) writer->SetInput( maskFilter->GetOutput() ); writer->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx index a34f3ebfd21..1f8f293231d 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx @@ -67,7 +67,7 @@ int itkLabelMapToAttributeImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx index d17442496a1..c77352b2738 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx @@ -59,10 +59,10 @@ int itkLabelMapToBinaryImageFilterTest( int argc, char * argv [] ) L2IType::Pointer l2i = L2IType::New(); l2i->SetForegroundValue( std::stoi(argv[3]) ); - TEST_SET_GET_VALUE( std::stoi(argv[3]), l2i->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( std::stoi(argv[3]), l2i->GetForegroundValue() ); l2i->SetBackgroundValue( std::stoi(argv[4]) ); - TEST_SET_GET_VALUE( std::stoi(argv[4]), l2i->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( std::stoi(argv[4]), l2i->GetBackgroundValue() ); itk::SimpleFilterWatcher watcher( l2i ); @@ -77,7 +77,7 @@ int itkLabelMapToBinaryImageFilterTest( int argc, char * argv [] ) l2i->SetInput( i2l->GetOutput() ); writer->SetInput( l2i->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ) + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ) i2l->GetOutput()->PrintLabelObjects(); diff --git a/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx index caeb40765ea..45f43a76bbf 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx @@ -50,33 +50,33 @@ int itkLabelShapeKeepNObjectsImageFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[3]) ); KeepNObjects->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); //testing get and set macros for NumberOfObjects unsigned int numberOfObjects = std::stoi( argv[4] ); KeepNObjects->SetNumberOfObjects( numberOfObjects ); - TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); + ITK_TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); //testing boolean macro for ReverseOrdering KeepNObjects->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); KeepNObjects->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[5] ); KeepNObjects->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); //testing get and set macros for Attribute KeepNObjects->SetAttribute(LabelKeepNObjectsType::LabelObjectType::PERIMETER_ON_BORDER); - TEST_SET_GET_VALUE( LabelKeepNObjectsType::LabelObjectType::PERIMETER_ON_BORDER, KeepNObjects->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( LabelKeepNObjectsType::LabelObjectType::PERIMETER_ON_BORDER, KeepNObjects->GetAttribute() ); const std::string attributeByName{ argv[6] }; KeepNObjects->SetAttribute( attributeByName ); // SetAttribute accepts a string for conversion to internal label code const LabelKeepNObjectsType::AttributeType attributeByCode = LabelKeepNObjectsType::LabelObjectType::LABEL; - TEST_SET_GET_VALUE( attributeByCode, KeepNObjects->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attributeByCode, KeepNObjects->GetAttribute() ); itk::SimpleFilterWatcher watcher(KeepNObjects, "filter"); @@ -86,7 +86,7 @@ int itkLabelShapeKeepNObjectsImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx index 7090d2d6914..c6dbe1636e1 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx @@ -50,29 +50,29 @@ int itkLabelShapeOpeningImageFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[3]) ); opening->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); //testing get and set macros for Lambda double lambda = std::stod( argv[4] ); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[5] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing get and set macros for Attribute LabelOpeningType::AttributeType attribute = std::stoi( argv[6] ); opening->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); itk::SimpleFilterWatcher watcher(opening, "filter"); @@ -82,7 +82,7 @@ int itkLabelShapeOpeningImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx index 2749c2c8871..38147e0390b 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx @@ -54,29 +54,29 @@ int itkLabelStatisticsKeepNObjectsImageFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[4]) ); KeepNObjects->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, KeepNObjects->GetBackgroundValue() ); //testing get and set macros for Lambda unsigned int numberOfObjects = std::stoi( argv[5] ); KeepNObjects->SetNumberOfObjects( numberOfObjects ); - TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); + ITK_TEST_SET_GET_VALUE( numberOfObjects, KeepNObjects->GetNumberOfObjects() ); //testing boolean macro for ReverseOrdering KeepNObjects->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, KeepNObjects->GetReverseOrdering() ); KeepNObjects->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, KeepNObjects->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[6] ); KeepNObjects->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , KeepNObjects->GetReverseOrdering() ); //testing get and set macros for Attribute LabelKeepNObjectsType::AttributeType attribute = std::stoi( argv[7] ); KeepNObjects->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, KeepNObjects->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, KeepNObjects->GetAttribute() ); itk::SimpleFilterWatcher watcher(KeepNObjects, "filter"); @@ -86,7 +86,7 @@ int itkLabelStatisticsKeepNObjectsImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx index 585c0a3e15f..4eada93c641 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx @@ -57,33 +57,33 @@ int itkLabelStatisticsOpeningImageFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[4]) ); opening->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); //testing get and set macros for Lambda double lambda = std::stod( argv[5] ); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[6] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing get and set macros for Attribute opening->SetAttribute(LabelOpeningType::LabelObjectType::PERIMETER_ON_BORDER); - TEST_SET_GET_VALUE( LabelOpeningType::LabelObjectType::PERIMETER_ON_BORDER, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( LabelOpeningType::LabelObjectType::PERIMETER_ON_BORDER, opening->GetAttribute() ); const std::string attributeByName{ argv[7] }; opening->SetAttribute( attributeByName ); // SetAttribute accepts a string for conversion to internal label code const LabelOpeningType::AttributeType attributeByCode = LabelOpeningType::LabelObjectType::LABEL; - TEST_SET_GET_VALUE( attributeByCode, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attributeByCode, opening->GetAttribute() ); itk::SimpleFilterWatcher watcher(opening, "filter"); @@ -93,7 +93,7 @@ int itkLabelStatisticsOpeningImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx index 160ba407ccd..95a14f89f79 100644 --- a/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx @@ -52,7 +52,7 @@ int itkMergeLabelMapFilterTest1( int argc, char * argv[] ) const PixelType background1 = std::stoi(argv[4]); i2l->SetBackgroundValue( background1 ); - TEST_SET_GET_VALUE( background1, i2l->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( background1, i2l->GetBackgroundValue() ); ReaderType::Pointer reader2 = ReaderType::New(); reader2->SetFileName( argv[2] ); @@ -61,7 +61,7 @@ int itkMergeLabelMapFilterTest1( int argc, char * argv[] ) const PixelType background2 = std::stoi(argv[5]); i2l2->SetBackgroundValue( background2 ); - TEST_SET_GET_VALUE( background2, i2l2->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( background2, i2l2->GetBackgroundValue() ); using ChangeType = itk::MergeLabelMapFilter< LabelMapType >; ChangeType::Pointer change = ChangeType::New(); @@ -74,10 +74,10 @@ int itkMergeLabelMapFilterTest1( int argc, char * argv[] ) auto method = static_cast( std::stoi( argv[6] ) ); change->SetMethod( ChangeType::STRICT ); - TEST_SET_GET_VALUE( ChangeType::STRICT, change->GetMethod() ); + ITK_TEST_SET_GET_VALUE( ChangeType::STRICT, change->GetMethod() ); change->SetMethod( ChangeType::KEEP ); - TEST_SET_GET_VALUE( ChangeType::KEEP, change->GetMethod() ); + ITK_TEST_SET_GET_VALUE( ChangeType::KEEP, change->GetMethod() ); change->SetMethod( method ); itk::SimpleFilterWatcher watcher6(change, "filter"); @@ -96,14 +96,14 @@ int itkMergeLabelMapFilterTest1( int argc, char * argv[] ) if( expectfailure ) { - TRY_EXPECT_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_EXCEPTION( writer->Update() ); } else { - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); } - TEST_SET_GET_VALUE( background1, change->GetOutput()->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( background1, change->GetOutput()->GetBackgroundValue() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx index a9de8fc4e08..b95ec015426 100644 --- a/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx @@ -56,7 +56,7 @@ int itkPadLabelMapFilterTest1(int argc, char * argv[]) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); using I2LType = itk::LabelImageToLabelMapFilter< ImageType, LabelMapType>; I2LType::Pointer i2l = I2LType::New(); @@ -65,15 +65,15 @@ int itkPadLabelMapFilterTest1(int argc, char * argv[]) using PadLabelMapFilterType = itk::PadLabelMapFilter< LabelMapType >; PadLabelMapFilterType::Pointer padLabelMapFilter = PadLabelMapFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( padLabelMapFilter, PadLabelMapFilter, ChangeRegionLabelMapFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( padLabelMapFilter, PadLabelMapFilter, ChangeRegionLabelMapFilter ); PadLabelMapFilterType::SizeType upperBoundaryPadSize = {{0}}; padLabelMapFilter->SetPadSize( upperBoundaryPadSize ); - TEST_SET_GET_VALUE( upperBoundaryPadSize, padLabelMapFilter->GetUpperBoundaryPadSize() ); + ITK_TEST_SET_GET_VALUE( upperBoundaryPadSize, padLabelMapFilter->GetUpperBoundaryPadSize() ); PadLabelMapFilterType::SizeType lowerBoundaryPadSize = {{0}}; padLabelMapFilter->SetPadSize( lowerBoundaryPadSize ); - TEST_SET_GET_VALUE( upperBoundaryPadSize, padLabelMapFilter->GetLowerBoundaryPadSize() ); + ITK_TEST_SET_GET_VALUE( upperBoundaryPadSize, padLabelMapFilter->GetLowerBoundaryPadSize() ); padLabelMapFilter->SetInput( i2l->GetOutput() ); PadLabelMapFilterType::SizeType size; @@ -81,12 +81,12 @@ int itkPadLabelMapFilterTest1(int argc, char * argv[]) size[1] = std::stoi( argv[4] ); padLabelMapFilter->SetPadSize( size ); - TEST_SET_GET_VALUE( size, padLabelMapFilter->GetLowerBoundaryPadSize() ); - TEST_SET_GET_VALUE( size, padLabelMapFilter->GetUpperBoundaryPadSize() ); + ITK_TEST_SET_GET_VALUE( size, padLabelMapFilter->GetLowerBoundaryPadSize() ); + ITK_TEST_SET_GET_VALUE( size, padLabelMapFilter->GetUpperBoundaryPadSize() ); itk::SimpleFilterWatcher watcher( padLabelMapFilter, "filter" ); - TRY_EXPECT_NO_EXCEPTION( padLabelMapFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( padLabelMapFilter->Update() ); using L2IType = itk::LabelMapToLabelImageFilter< LabelMapType, ImageType>; L2IType::Pointer l2i = L2IType::New(); @@ -99,10 +99,10 @@ int itkPadLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); l2i->SetInput( nullptr ); - TRY_EXPECT_EXCEPTION( l2i->Update() ); + ITK_TRY_EXPECT_EXCEPTION( l2i->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx index 66ff2b86255..f48a5996aac 100644 --- a/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx @@ -79,7 +79,7 @@ int itkRegionFromReferenceLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx index 039e1688373..26d1c684a6b 100644 --- a/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx @@ -65,7 +65,7 @@ int itkRelabelLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx index b76f8112280..238098860b2 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx @@ -58,22 +58,22 @@ int itkShapeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[3] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing get and set macros for Attribute LabelOpeningType::AttributeType attribute = std::stoi( argv[4] ); - TRY_EXPECT_NO_EXCEPTION( opening->SetAttribute( attribute ) ); + ITK_TRY_EXPECT_NO_EXCEPTION( opening->SetAttribute( attribute ) ); try { - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); } catch (itk::ExceptionObject &exc) { @@ -96,7 +96,7 @@ int itkShapeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx index 0880f57fbd9..804fd6281d0 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx @@ -59,24 +59,24 @@ int itkShapeOpeningLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for Lambda double lambda = std::stod( argv[3] ); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); //testing get and set macros for ReverseOrdering bool reverseOrdering = std::stoi( argv[4] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros for Attribute LabelOpeningType::AttributeType attribute = std::stoi( argv[5] ); opening->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); opening->SetInput( i2l->GetOutput() ); @@ -93,7 +93,7 @@ int itkShapeOpeningLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx index d6ee8d465ae..799a827335b 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx @@ -50,28 +50,28 @@ int itkShapeRelabelImageFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[3]) ); opening->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, opening->GetBackgroundValue() ); //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[4] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing get and set macros for Attribute opening->SetAttribute(RelabelType::LabelObjectType::FERET_DIAMETER); - TEST_SET_GET_VALUE( RelabelType::LabelObjectType::FERET_DIAMETER, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( RelabelType::LabelObjectType::FERET_DIAMETER, opening->GetAttribute() ); const std::string attributeByName{ argv[5] }; opening->SetAttribute( attributeByName ); // SetAttribute accepts a string for conversion to internal label code const RelabelType::AttributeType attributeByCode = RelabelType::LabelObjectType::LABEL; - TEST_SET_GET_VALUE( attributeByCode, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attributeByCode, opening->GetAttribute() ); itk::SimpleFilterWatcher watcher(opening, "filter"); @@ -81,7 +81,7 @@ int itkShapeRelabelImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx index 196001ed89d..e77e3fdd875 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx @@ -60,19 +60,19 @@ int itkShapeRelabelLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for ReverseOrdering bool reverseOrdering = std::stoi( argv[3] ); relabel->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , relabel->GetReverseOrdering() ); //testing boolean macro for ReverseOrdering relabel->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, relabel->GetReverseOrdering() ); relabel->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, relabel->GetReverseOrdering() ); //testing get and set macros for Attribute unsigned int attribute = std::stoi( argv[4] ); relabel->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, relabel->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, relabel->GetAttribute() ); std::string attributeName = ShapeLabelObjectType::GetNameFromAttribute( attribute ); relabel->SetAttribute( attributeName ); @@ -92,7 +92,7 @@ int itkShapeRelabelLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx index c3f52ef8a12..48143d1de7d 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx @@ -59,19 +59,19 @@ int itkShapeUniqueLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for ReverseOrdering bool reverseOrdering = std::stoi( argv[3] ); Unique->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , Unique->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , Unique->GetReverseOrdering() ); //testing boolean macro for ReverseOrdering Unique->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, Unique->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, Unique->GetReverseOrdering() ); Unique->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, Unique->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, Unique->GetReverseOrdering() ); //testing get and set macros for Attribute LabelUniqueType::AttributeType attribute = std::stoi( argv[4] ); Unique->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, Unique->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, Unique->GetAttribute() ); Unique->SetInput( i2l->GetOutput() ); @@ -88,7 +88,7 @@ int itkShapeUniqueLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx index 2cc337f9b2b..b90052fd360 100644 --- a/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx @@ -65,23 +65,23 @@ int itkShiftScaleLabelMapFilterTest1(int argc, char * argv[]) change->SetInput( i2l->GetOutput() ); change->SetShift( std::stod( argv[3] ) ); - TEST_SET_GET_VALUE( std::stod( argv[3] ), change->GetShift() ); + ITK_TEST_SET_GET_VALUE( std::stod( argv[3] ), change->GetShift() ); change->SetScale( std::stod( argv[4] ) ); - TEST_SET_GET_VALUE( std::stod( argv[4] ), change->GetScale() ); + ITK_TEST_SET_GET_VALUE( std::stod( argv[4] ), change->GetScale() ); const std::string shouldChangBackgroundBoolean{ argv[5] }; static const std::string trueString{ "true" }; const bool changeBackground = (shouldChangBackgroundBoolean == trueString) ? true : false; change->SetChangeBackgroundValue( changeBackground ); - TEST_SET_GET_VALUE( changeBackground, change->GetChangeBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( changeBackground, change->GetChangeBackgroundValue() ); change->ChangeBackgroundValueOff(); - TEST_SET_GET_VALUE( false, change->GetChangeBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( false, change->GetChangeBackgroundValue() ); change->ChangeBackgroundValueOn(); - TEST_SET_GET_VALUE( true, change->GetChangeBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( true, change->GetChangeBackgroundValue() ); itk::SimpleFilterWatcher watcher6(change, "filter"); @@ -96,7 +96,7 @@ int itkShiftScaleLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[2] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx index b28ba3aa3b7..8ccffd0e042 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx @@ -62,20 +62,20 @@ int itkStatisticsKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) //testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[4] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); //testing get and set macros for Attribute LabelOpeningType::AttributeType attribute = std::stoi( argv[5] ); opening->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); opening->SetNumberOfObjects( std::stoi(argv[6]) ); opening->SetInput( i2l->GetOutput() ); @@ -93,7 +93,7 @@ int itkStatisticsKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx index 797d22dad6e..d71ec0fdf2e 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx @@ -61,30 +61,30 @@ int itkStatisticsOpeningLabelMapFilterTest1(int argc, char * argv[]) using LabelOpeningType = itk::StatisticsOpeningLabelMapFilter< LabelMapType >; LabelOpeningType::Pointer opening = LabelOpeningType::New(); - EXERCISE_BASIC_OBJECT_METHODS( opening, StatisticsOpeningLabelMapFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( opening, StatisticsOpeningLabelMapFilter, ShapeOpeningLabelMapFilter); // Testing get and set macros for Lambda double lambda = std::stod( argv[4] ); opening->SetLambda( lambda ); - TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); + ITK_TEST_SET_GET_VALUE( lambda , opening->GetLambda() ); // Testing get and set macros for ReverseOrdering bool reverseOrdering = std::stoi( argv[5] ); opening->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , opening->GetReverseOrdering() ); // Testing boolean macro for ReverseOrdering opening->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, opening->GetReverseOrdering() ); opening->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, opening->GetReverseOrdering() ); // Testing get and set macros for Attribute LabelOpeningType::AttributeType attribute = std::stoi( argv[6] ); opening->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, opening->GetAttribute() ); opening->SetInput( i2l->GetOutput() ); @@ -101,7 +101,7 @@ int itkStatisticsOpeningLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx index b03707b4277..4a7020b1378 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx @@ -54,24 +54,24 @@ int itkStatisticsRelabelImageFilterTest1(int argc, char * argv[]) //testing get/set BackgroundValue macro int BackgroundValue = ( std::stoi(argv[4]) ); statisticsRelabel->SetBackgroundValue( BackgroundValue ); - TEST_SET_GET_VALUE( BackgroundValue, statisticsRelabel->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( BackgroundValue, statisticsRelabel->GetBackgroundValue() ); //testing boolean macro for ReverseOrdering statisticsRelabel->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, statisticsRelabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, statisticsRelabel->GetReverseOrdering() ); statisticsRelabel->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, statisticsRelabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, statisticsRelabel->GetReverseOrdering() ); //testing get and set macros or ReverseOrdering bool reverseOrdering = std::stoi( argv[5] ); statisticsRelabel->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , statisticsRelabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , statisticsRelabel->GetReverseOrdering() ); //testing get and set macros for Attribute RelabelType::AttributeType attribute = std::stoi( argv[6] ); statisticsRelabel->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, statisticsRelabel->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, statisticsRelabel->GetAttribute() ); itk::SimpleFilterWatcher watcher(statisticsRelabel, "filter"); @@ -81,7 +81,7 @@ int itkStatisticsRelabelImageFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test Complete!" << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx index a29096fe9f6..909250dc19d 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx @@ -64,19 +64,19 @@ int itkStatisticsRelabelLabelMapFilterTest1(int argc, char * argv[]) //testing get and set macros for ReverseOrdering bool reverseOrdering = std::stoi( argv[4] ); relabel->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , relabel->GetReverseOrdering() ); //testing boolean macro for ReverseOrdering relabel->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, relabel->GetReverseOrdering() ); relabel->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, relabel->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, relabel->GetReverseOrdering() ); //testing get and set macros for Attribute unsigned int attribute = std::stoi( argv[5] ); relabel->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, relabel->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, relabel->GetAttribute() ); std::string attributeName = StatisticsLabelObjectType::GetNameFromAttribute( attribute ); relabel->SetAttribute( attributeName ); @@ -96,7 +96,7 @@ int itkStatisticsRelabelLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( argv[3] ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx index bfcc529bec5..4730cd93afa 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx @@ -99,23 +99,23 @@ int itkStatisticsUniqueLabelMapFilterTest1(int argc, char * argv[]) //testing boolean macro for ReverseOrdering unique->ReverseOrderingOn(); - TEST_SET_GET_VALUE( true, unique->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( true, unique->GetReverseOrdering() ); unique->ReverseOrderingOff(); - TEST_SET_GET_VALUE( false, unique->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( false, unique->GetReverseOrdering() ); //testing get and set macros for ReverseOrdering // ToDo: decrease reverseOrdering argv index once the JIRA issue 3370 has been solved // Then, argv[4] unique->SetReverseOrdering( reverseOrdering ); - TEST_SET_GET_VALUE( reverseOrdering , unique->GetReverseOrdering() ); + ITK_TEST_SET_GET_VALUE( reverseOrdering , unique->GetReverseOrdering() ); //testing get and set macros for Attribute // ToDo: decrease attribute argv index once the JIRA issue 3370 has been solved // Then, argv[5] unique->SetAttribute( attribute ); - TEST_SET_GET_VALUE( attribute, unique->GetAttribute() ); + ITK_TEST_SET_GET_VALUE( attribute, unique->GetAttribute() ); unique->SetInput( statisticsFilter->GetOutput() ); @@ -131,7 +131,7 @@ int itkStatisticsUniqueLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( outputImage ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // WARNING: TEMPORARY: JIRA ISSUE 3370 @@ -140,7 +140,7 @@ int itkStatisticsUniqueLabelMapFilterTest1(int argc, char * argv[]) writer->SetFileName( dilationOutput ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx index 6353026faa3..a863f6411ec 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx @@ -35,7 +35,7 @@ int itkFlatStructuringElementTest(int, char *[]) SE2Type::Self result2 = SE2Type::Self(); result2.RadiusIsParametricOn(); - TEST_SET_GET_VALUE( true, result2.GetRadiusIsParametric() ); + ITK_TEST_SET_GET_VALUE( true, result2.GetRadiusIsParametric() ); SE2Type k2; @@ -79,7 +79,7 @@ int itkFlatStructuringElementTest(int, char *[]) SE3Type::Self result3 = SE3Type::Self(); result3.RadiusIsParametricOff(); - TEST_SET_GET_VALUE( false, result3.GetRadiusIsParametric() ); + ITK_TEST_SET_GET_VALUE( false, result3.GetRadiusIsParametric() ); r3.Fill( scalarRadius ); SE3Type k3; @@ -141,7 +141,7 @@ int itkFlatStructuringElementTest(int, char *[]) SE4Type::Self result4 = SE4Type::Self(); result4.RadiusIsParametricOn(); - TEST_SET_GET_VALUE( true, result4.GetRadiusIsParametric() ); + ITK_TEST_SET_GET_VALUE( true, result4.GetRadiusIsParametric() ); r4.Fill( scalarRadius ); SE4Type k4; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx index 734eb1123cb..4af4c561fcd 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx @@ -73,13 +73,13 @@ int itkGrayscaleFillholeImageFilterTest( int argc, char * argv[] ) // Create the filter FillholeFilterType::Pointer fillhole = FillholeFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( fillhole, GrayscaleFillholeImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( fillhole, GrayscaleFillholeImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watcher(fillhole, "fillhole"); watcher.QuietOn(); auto fullyConnected = static_cast< bool >( atoi( argv[3] ) ); - TEST_SET_GET_BOOLEAN( fillhole, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( fillhole, FullyConnected, fullyConnected ); // Setup the input and output files reader->SetFileName( argv[1] ); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx index 6fb51f05fdb..af32f626f13 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx @@ -65,7 +65,7 @@ int itkGrayscaleMorphologicalClosingImageFilterTest(int argc, char* argv [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GrayscaleMorphologicalClosingImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GrayscaleMorphologicalClosingImageFilter, KernelImageFilter ); itk::SimpleFilterWatcher watcher(filter, "filter"); @@ -86,7 +86,7 @@ int itkGrayscaleMorphologicalClosingImageFilterTest(int argc, char* argv [] ) filter->SetKernel( ball ); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx index fc6ec246139..a6853a15f16 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx @@ -65,7 +65,7 @@ int itkGrayscaleMorphologicalOpeningImageFilterTest(int argc, char* argv [] ) // Create the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GrayscaleMorphologicalOpeningImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GrayscaleMorphologicalOpeningImageFilter, KernelImageFilter ); itk::SimpleFilterWatcher watcher(filter, "filter"); @@ -86,7 +86,7 @@ int itkGrayscaleMorphologicalOpeningImageFilterTest(int argc, char* argv [] ) filter->SetKernel( ball ); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHConcaveImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHConcaveImageFilterTest.cxx index 82097b5d2ee..a30960e0fe7 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHConcaveImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHConcaveImageFilterTest.cxx @@ -53,7 +53,7 @@ int itkHConcaveImageFilterTest( int argc, char * argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Define the itk::HConcaveImageFilter filter type @@ -64,7 +64,7 @@ int itkHConcaveImageFilterTest( int argc, char * argv[] ) // Create the filter HConcaveFilterType::Pointer hConcaveFilter = HConcaveFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( hConcaveFilter, HConcaveImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( hConcaveFilter, HConcaveImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watchConcave( hConcaveFilter, "HConcaveImageFilter" ); @@ -73,16 +73,16 @@ int itkHConcaveImageFilterTest( int argc, char * argv[] ) auto height = static_cast< HConcaveFilterType::InputImagePixelType >( std::stod( argv[3] ) ); hConcaveFilter->SetHeight( height ); - TEST_SET_GET_VALUE( height, hConcaveFilter->GetHeight() ); + ITK_TEST_SET_GET_VALUE( height, hConcaveFilter->GetHeight() ); auto fullyConnected = static_cast< bool >( std::stod( argv[4] ) ); - TEST_SET_GET_BOOLEAN( hConcaveFilter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( hConcaveFilter, FullyConnected, fullyConnected ); hConcaveFilter->SetInput( reader->GetOutput() ); // Run the filter - TRY_EXPECT_NO_EXCEPTION( hConcaveFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( hConcaveFilter->Update() ); // Write the output @@ -91,7 +91,7 @@ int itkHConcaveImageFilterTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( hConcaveFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx index 5fffdba2101..075c33216fb 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx @@ -106,7 +106,7 @@ int itkHConvexConcaveImageFilterTest( int argc, char * argv[] ) writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHConvexImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHConvexImageFilterTest.cxx index d9e4c478fca..f49fbb373c6 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHConvexImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHConvexImageFilterTest.cxx @@ -53,7 +53,7 @@ int itkHConvexImageFilterTest( int argc, char * argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Define the itk::HConvexImageFilter filter type @@ -64,7 +64,7 @@ int itkHConvexImageFilterTest( int argc, char * argv[] ) // Create the filter HConvexFilterType::Pointer hConvexFilter = HConvexFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( hConvexFilter, HConvexImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( hConvexFilter, HConvexImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watchConvex( hConvexFilter, "HConvexImageFilter" ); @@ -73,16 +73,16 @@ int itkHConvexImageFilterTest( int argc, char * argv[] ) auto height = static_cast< HConvexFilterType::InputImagePixelType >( std::stod( argv[3] ) ); hConvexFilter->SetHeight( height ); - TEST_SET_GET_VALUE( height, hConvexFilter->GetHeight() ); + ITK_TEST_SET_GET_VALUE( height, hConvexFilter->GetHeight() ); auto fullyConnected = static_cast< bool >( std::stod( argv[4] ) ); - TEST_SET_GET_BOOLEAN( hConvexFilter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( hConvexFilter, FullyConnected, fullyConnected ); hConvexFilter->SetInput( reader->GetOutput() ); // Run the filter - TRY_EXPECT_NO_EXCEPTION( hConvexFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( hConvexFilter->Update() ); // Write the output @@ -91,7 +91,7 @@ int itkHConvexImageFilterTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( hConvexFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHMaximaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHMaximaImageFilterTest.cxx index 24ba6bc94a6..7deb4cbea98 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHMaximaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHMaximaImageFilterTest.cxx @@ -53,7 +53,7 @@ int itkHMaximaImageFilterTest( int argc, char * argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Define the itk::HMaximaImageFilter filter type @@ -64,7 +64,7 @@ int itkHMaximaImageFilterTest( int argc, char * argv[] ) // Create the filter HMaximaFilterType::Pointer hMaximaFilter = HMaximaFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( hMaximaFilter, HMaximaImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( hMaximaFilter, HMaximaImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watchHMaxima( hMaximaFilter, "HMaximaImageFilter" ); @@ -73,16 +73,16 @@ int itkHMaximaImageFilterTest( int argc, char * argv[] ) auto height = static_cast< HMaximaFilterType::InputImagePixelType >( std::stod( argv[3] ) ); hMaximaFilter->SetHeight( height ); - TEST_SET_GET_VALUE( height, hMaximaFilter->GetHeight() ); + ITK_TEST_SET_GET_VALUE( height, hMaximaFilter->GetHeight() ); auto fullyConnected = static_cast< bool >( std::stod( argv[4] ) ); - TEST_SET_GET_BOOLEAN( hMaximaFilter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( hMaximaFilter, FullyConnected, fullyConnected ); hMaximaFilter->SetInput( reader->GetOutput() ); // Run the filter - TRY_EXPECT_NO_EXCEPTION( hMaximaFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( hMaximaFilter->Update() ); // Write the output @@ -91,7 +91,7 @@ int itkHMaximaImageFilterTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( hMaximaFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx index 93582986cf4..0ae247b89cc 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx @@ -87,7 +87,7 @@ int itkHMaximaMinimaImageFilterTest( int argc, char * argv[] ) // Run the filter writer->SetInput( hMinimaFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHMinimaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHMinimaImageFilterTest.cxx index 6a0d7fafac7..efbd6d5b521 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHMinimaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHMinimaImageFilterTest.cxx @@ -53,7 +53,7 @@ int itkHMinimaImageFilterTest( int argc, char * argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Define the itk::HMinimaImageFilter filter type @@ -64,7 +64,7 @@ int itkHMinimaImageFilterTest( int argc, char * argv[] ) // Create the filter HMinimaFilterType::Pointer hMinimaFilter = HMinimaFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( hMinimaFilter, HMinimaImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( hMinimaFilter, HMinimaImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watchHMinima( hMinimaFilter, "HMinimaImageFilter" ); @@ -73,16 +73,16 @@ int itkHMinimaImageFilterTest( int argc, char * argv[] ) auto height = static_cast< HMinimaFilterType::InputImagePixelType >( std::stod( argv[3] ) ); hMinimaFilter->SetHeight( height ); - TEST_SET_GET_VALUE( height, hMinimaFilter->GetHeight() ); + ITK_TEST_SET_GET_VALUE( height, hMinimaFilter->GetHeight() ); auto fullyConnected = static_cast< bool >( std::stod( argv[4] ) ); - TEST_SET_GET_BOOLEAN( hMinimaFilter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( hMinimaFilter, FullyConnected, fullyConnected ); hMinimaFilter->SetInput( reader->GetOutput() ); // Run the filter - TRY_EXPECT_NO_EXCEPTION( hMinimaFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( hMinimaFilter->Update() ); // Write the output @@ -91,7 +91,7 @@ int itkHMinimaImageFilterTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( hMinimaFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx index 2a66d1f937d..d8c8495499f 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx @@ -43,19 +43,19 @@ int RegionalMaximaImageFilterTestHelper( std::string inputImageFile, filter->SetInput( reader->GetOutput() ); - TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); - TEST_SET_GET_BOOLEAN( filter, FlatIsMaxima, flatIsMaxima ); + ITK_TEST_SET_GET_BOOLEAN( filter, FlatIsMaxima, flatIsMaxima ); typename FilterType::OutputImagePixelType foregroundValue = itk::NumericTraits< typename FilterType::OutputImagePixelType >::max(); filter->SetForegroundValue( foregroundValue ); - TEST_SET_GET_VALUE( foregroundValue, filter->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( foregroundValue, filter->GetForegroundValue() ); typename FilterType::OutputImagePixelType backgroundValue = itk::NumericTraits< typename FilterType::OutputImagePixelType >::NonpositiveMin(); filter->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, filter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, filter->GetBackgroundValue() ); itk::SimpleFilterWatcher watcher( filter, "RegionalMaximaImageFilter" ); @@ -129,7 +129,7 @@ int itkRegionalMaximaImageFilterTest( int argc, char * argv[] ) using FilterType = itk::RegionalMaximaImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, RegionalMaximaImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, RegionalMaximaImageFilter, ImageToImageFilter ); if( dimension == 2 ) diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx index 0e0e8ab3414..cea7be8ca9f 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx @@ -43,19 +43,19 @@ int RegionalMinimaImageFilterTestHelper( std::string inputImageFile, filter->SetInput( reader->GetOutput() ); - TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); - TEST_SET_GET_BOOLEAN( filter, FlatIsMinima, flatIsMinima ); + ITK_TEST_SET_GET_BOOLEAN( filter, FlatIsMinima, flatIsMinima ); typename FilterType::OutputImagePixelType foregroundValue = itk::NumericTraits< typename FilterType::OutputImagePixelType >::max(); filter->SetForegroundValue( foregroundValue ); - TEST_SET_GET_VALUE( foregroundValue, filter->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( foregroundValue, filter->GetForegroundValue() ); typename FilterType::OutputImagePixelType backgroundValue = itk::NumericTraits< typename FilterType::OutputImagePixelType >::NonpositiveMin(); filter->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, filter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, filter->GetBackgroundValue() ); itk::SimpleFilterWatcher watcher( filter, "RegionalMinimaImageFilter" ); @@ -129,7 +129,7 @@ int itkRegionalMinimaImageFilterTest( int argc, char * argv[] ) using FilterType = itk::RegionalMinimaImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, RegionalMinimaImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, RegionalMinimaImageFilter, ImageToImageFilter ); if( dimension == 2 ) diff --git a/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMaximaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMaximaImageFilterTest.cxx index 5724cbae5af..01cea927333 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMaximaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMaximaImageFilterTest.cxx @@ -54,19 +54,19 @@ int itkValuedRegionalMaximaImageFilterTest( int argc, char * argv[] ) itk::ValuedRegionalMaximaImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ValuedRegionalMaximaImageFilter, ValuedRegionalExtremaImageFilter ); bool fullyConnected = std::stoi( argv[4] ); - TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); itk::SimpleFilterWatcher watcher( filter, "ValuedRegionalMaximaImageFilter" ); filter->SetInput( reader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); using WriterType = itk::ImageFileWriter< ImageType >; WriterType::Pointer writer = WriterType::New(); @@ -74,7 +74,7 @@ int itkValuedRegionalMaximaImageFilterTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Produce the same output with other filters using ConvexFilterType = itk::HConvexImageFilter< ImageType, ImageType >; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMinimaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMinimaImageFilterTest.cxx index 85c1e972a25..73af4a7d2d5 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMinimaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkValuedRegionalMinimaImageFilterTest.cxx @@ -56,19 +56,19 @@ int itkValuedRegionalMinimaImageFilterTest( int argc, char * argv[] ) itk::ValuedRegionalMinimaImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, ValuedRegionalMinimaImageFilter, ValuedRegionalExtremaImageFilter ); bool fullyConnected = std::stoi( argv[4] ); - TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); itk::SimpleFilterWatcher watcher( filter, "ValuedRegionalMinimaImageFilter" ); filter->SetInput( reader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); using WriterType = itk::ImageFileWriter< ImageType >; WriterType::Pointer writer = WriterType::New(); @@ -76,7 +76,7 @@ int itkValuedRegionalMinimaImageFilterTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Produce the same output with other filters using ConcaveFilterType = itk::HConcaveImageFilter< ImageType, ImageType >; diff --git a/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx b/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx index c13761ccee3..12e823916b8 100644 --- a/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx +++ b/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx @@ -33,7 +33,7 @@ int itkChainCodePath2DTest( int, char*[] ) PathType::Pointer path = PathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( path, ChainCodePath2D, ChainCodePath ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path, ChainCodePath2D, ChainCodePath ); index[0] = 3; index[1] = 5; diff --git a/Modules/Filtering/Path/test/itkChainCodePathTest.cxx b/Modules/Filtering/Path/test/itkChainCodePathTest.cxx index 781a93ac0e8..5c757a53aa4 100644 --- a/Modules/Filtering/Path/test/itkChainCodePathTest.cxx +++ b/Modules/Filtering/Path/test/itkChainCodePathTest.cxx @@ -35,7 +35,7 @@ int itkChainCodePathTest( int, char*[] ) PathType::Pointer path = PathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( path, ChainCodePath, Path ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path, ChainCodePath, Path ); index[0] = 3; index[1] = 5; diff --git a/Modules/Filtering/Path/test/itkChainCodeToFourierSeriesPathFilterTest.cxx b/Modules/Filtering/Path/test/itkChainCodeToFourierSeriesPathFilterTest.cxx index 3995cb1574d..f5b13d76c66 100644 --- a/Modules/Filtering/Path/test/itkChainCodeToFourierSeriesPathFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkChainCodeToFourierSeriesPathFilterTest.cxx @@ -47,7 +47,7 @@ int itkChainCodeToFourierSeriesPathFilterTest( int, char*[] ) PolyLinePathType::Pointer inputPath = PolyLinePathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( inputPath, PolyLineParametricPath, + ITK_EXERCISE_BASIC_OBJECT_METHODS( inputPath, PolyLineParametricPath, ParametricPath ); v.Fill( 30 ); @@ -71,7 +71,7 @@ int itkChainCodeToFourierSeriesPathFilterTest( int, char*[] ) ChainCodeToFSPathFilterType::Pointer chainCodeToFSPathFilter = ChainCodeToFSPathFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( chainCodeToFSPathFilter, ChainCodeToFourierSeriesPathFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( chainCodeToFSPathFilter, ChainCodeToFourierSeriesPathFilter, PathToPathFilter ); chainCodeToFSPathFilter->SetInput( pathToChainCodePathFilter->GetOutput() ); diff --git a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx index 6c4ad9639cc..8687d13cb13 100644 --- a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx @@ -125,7 +125,7 @@ int itkExtractOrthogonalSwath2DImageFilterTest( int argc, char* argv[] ) ExtractOrthogonalSwath2DImageFilterType::Pointer extractOrthogonalSwath2DImageFilter = ExtractOrthogonalSwath2DImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( extractOrthogonalSwath2DImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( extractOrthogonalSwath2DImageFilter, ExtractOrthogonalSwath2DImageFilter, ImageAndPathToImageFilter ); extractOrthogonalSwath2DImageFilter->SetImageInput( inputImage ); @@ -178,7 +178,7 @@ int itkExtractOrthogonalSwath2DImageFilterTest( int argc, char* argv[] ) // Update the pipeline - TRY_EXPECT_NO_EXCEPTION( outputImage->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( outputImage->Update() ); // Test pipeline execution // @@ -210,7 +210,7 @@ int itkExtractOrthogonalSwath2DImageFilterTest( int argc, char* argv[] ) writer->SetInput( extractOrthogonalSwath2DImageFilter->GetOutput() ); writer->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( writer->Write() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Write() ); std::cout << "Test finished" << std::endl; diff --git a/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx b/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx index cd2f140f0c4..e3a0c6dd495 100644 --- a/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx +++ b/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx @@ -36,7 +36,7 @@ int itkFourierSeriesPathTest( int, char*[] ) PathType::Pointer path = PathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( path, FourierSeriesPath, ParametricPath ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path, FourierSeriesPath, ParametricPath ); // Average value is (5,5) cosV.Fill( 5 ); diff --git a/Modules/Filtering/Path/test/itkHilbertPathTest.cxx b/Modules/Filtering/Path/test/itkHilbertPathTest.cxx index 41caab55fbb..74d2b1450e6 100644 --- a/Modules/Filtering/Path/test/itkHilbertPathTest.cxx +++ b/Modules/Filtering/Path/test/itkHilbertPathTest.cxx @@ -33,12 +33,12 @@ int HilbertPathTestHelper( unsigned int maxHilbertPathOder ) for( unsigned int order = 1; order < maxHilbertPathOder; ++order ) { path->SetHilbertOrder( order ); - TEST_SET_GET_VALUE( order, path->GetHilbertOrder() ); + ITK_TEST_SET_GET_VALUE( order, path->GetHilbertOrder() ); path->Initialize(); typename PathType::InputType input = 0; - TRY_EXPECT_EXCEPTION( path->IncrementInput( input ) ); + ITK_TRY_EXPECT_EXCEPTION( path->IncrementInput( input ) ); typename PathType::InputType endOfInput = path->EndOfInput(); std::cout << "End of input: " @@ -94,7 +94,7 @@ int itkHilbertPathTest( int, char*[] ) // Exercise basic object methods // Done outside the helper function in the test because GCC is limited // when calling overloaded base class functions. - EXERCISE_BASIC_OBJECT_METHODS( path2D, HilbertPath, Path ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path2D, HilbertPath, Path ); testStatus = HilbertPathTestHelper< HilbertPathType2D >( maxHilbertPathOder ); @@ -105,7 +105,7 @@ int itkHilbertPathTest( int, char*[] ) // Exercise basic object methods // Done outside the helper function in the test because GCC is limited // when calling overloaded base class functions. - EXERCISE_BASIC_OBJECT_METHODS( path3D, HilbertPath, Path ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path3D, HilbertPath, Path ); testStatus = HilbertPathTestHelper< HilbertPathType3D >( maxHilbertPathOder ); @@ -116,7 +116,7 @@ int itkHilbertPathTest( int, char*[] ) // Exercise basic object methods // Done outside the helper function in the test because GCC is limited // when calling overloaded base class functions. - EXERCISE_BASIC_OBJECT_METHODS( path4D, HilbertPath, Path ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path4D, HilbertPath, Path ); testStatus = HilbertPathTestHelper< HilbertPathType4D >( maxHilbertPathOder ); diff --git a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx index f67360726d2..4bcb39d513e 100644 --- a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx @@ -182,7 +182,7 @@ int itkOrthogonalSwath2DPathFilterTest( int, char*[] ) OrthogonalSwath2DPathFilterType::Pointer orthogonalSwath2DPathFilter = OrthogonalSwath2DPathFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( orthogonalSwath2DPathFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( orthogonalSwath2DPathFilter, OrthogonalSwath2DPathFilter, PathAndImageToPathFilter ); orthogonalSwath2DPathFilter->SetPathInput( @@ -224,7 +224,7 @@ int itkOrthogonalSwath2DPathFilterTest( int, char*[] ) // Update the pipeline - TRY_EXPECT_NO_EXCEPTION( outputImage->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( outputImage->Update() ); /* // Save the output images diff --git a/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx b/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx index 004242e31f8..8f023e5ccd3 100644 --- a/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx +++ b/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx @@ -65,7 +65,7 @@ int itkOrthogonallyCorrected2DParametricPathTest( int, char*[] ) // Create the corrected path PathType::Pointer path = PathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( path, OrthogonallyCorrected2DParametricPath, + ITK_EXERCISE_BASIC_OBJECT_METHODS( path, OrthogonallyCorrected2DParametricPath, ParametricPath ); path->SetOriginalPath( originalPath ); diff --git a/Modules/Filtering/Path/test/itkPathToChainCodePathFilterTest.cxx b/Modules/Filtering/Path/test/itkPathToChainCodePathFilterTest.cxx index c18cf7da50b..dd5613ee488 100644 --- a/Modules/Filtering/Path/test/itkPathToChainCodePathFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkPathToChainCodePathFilterTest.cxx @@ -50,11 +50,11 @@ int itkPathToChainCodePathFilterTest( int, char* [] ) // Set up the filter FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, PathToChainCodePathFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, PathToChainCodePathFilter, PathToPathFilter ); bool maximallyConnected = false; - TEST_SET_GET_BOOLEAN( filter, MaximallyConnected, maximallyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, MaximallyConnected, maximallyConnected ); filter->SetInput( inPath ); @@ -84,7 +84,7 @@ int itkPathToChainCodePathFilterTest( int, char* [] ) } maximallyConnected = true; - TEST_SET_GET_BOOLEAN( filter, MaximallyConnected, maximallyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, MaximallyConnected, maximallyConnected ); filter->Update(); diff --git a/Modules/Filtering/Path/test/itkPathToImageFilterTest.cxx b/Modules/Filtering/Path/test/itkPathToImageFilterTest.cxx index dbaec19a34c..7ca1ec86acc 100644 --- a/Modules/Filtering/Path/test/itkPathToImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkPathToImageFilterTest.cxx @@ -37,7 +37,7 @@ int itkPathToImageFilterTest( int, char* [] ) // Set up the path PolyLineParametricPathType::Pointer path = PolyLineParametricPathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( path, PolyLineParametricPath, ParametricPath ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path, PolyLineParametricPath, ParametricPath ); std::cout << "Making a square Path with v0 at (30,30) and v2 at (33,33)" << std::endl; VertexType v; @@ -58,24 +58,24 @@ int itkPathToImageFilterTest( int, char* [] ) PathToImageFilterType::Pointer pathToImageFilter = PathToImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( pathToImageFilter, PathToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( pathToImageFilter, PathToImageFilter, ImageSource ); pathToImageFilter->SetInput( path ); PathToImageFilterType::ValueType pathValue = 1; pathToImageFilter->SetPathValue( pathValue ); - TEST_SET_GET_VALUE( pathValue, pathToImageFilter->GetPathValue() ); + ITK_TEST_SET_GET_VALUE( pathValue, pathToImageFilter->GetPathValue() ); PathToImageFilterType::ValueType backgroundValue = 0; pathToImageFilter->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, pathToImageFilter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, pathToImageFilter->GetBackgroundValue() ); ImageType::SizeType size; size[0] = 256; size[1] = 256; pathToImageFilter->SetSize( size ); - TEST_SET_GET_VALUE( size, pathToImageFilter->GetSize() ); + ITK_TEST_SET_GET_VALUE( size, pathToImageFilter->GetSize() ); // Test spacing // @@ -116,7 +116,7 @@ int itkPathToImageFilterTest( int, char* [] ) } // Update the filter - TRY_EXPECT_NO_EXCEPTION( pathToImageFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( pathToImageFilter->Update() ); ImageType::Pointer image = pathToImageFilter->GetOutput(); diff --git a/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx b/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx index 5c6a962bfee..543ddfc6ab2 100644 --- a/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx +++ b/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx @@ -37,7 +37,7 @@ int itkPolyLineParametricPathTest( int, char* [] ) PathType::Pointer path = PathType::New(); - EXERCISE_BASIC_OBJECT_METHODS( path, PolyLineParametricPath, ParametricPath ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( path, PolyLineParametricPath, ParametricPath ); v.Fill(1); path->AddVertex( v ); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest2.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest2.cxx index a5d249fbff7..e5e7e8b2450 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest2.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBorderQuadEdgeMeshFilterTest2.cxx @@ -65,7 +65,7 @@ int itkBorderQuadEdgeMeshFilterTest2( int argc, char* argv[] ) return EXIT_FAILURE; } - TRY_EXPECT_EXCEPTION( border_transform->Update() ); + ITK_TRY_EXPECT_EXCEPTION( border_transform->Update() ); // GET OUT OF HERE AND GET (YET ANOTHER) COFFEE return EXIT_SUCCESS; diff --git a/Modules/Filtering/Smoothing/test/itkMeanImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkMeanImageFilterTest.cxx index b7463ce4685..6a248baaa5a 100644 --- a/Modules/Filtering/Smoothing/test/itkMeanImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkMeanImageFilterTest.cxx @@ -50,9 +50,9 @@ int itkMeanImageFilterTest( int, char* [] ) itk::MeanImageFilter< FloatImage2DType, FloatImage2DType >::Pointer mean = itk::MeanImageFilter< FloatImage2DType, FloatImage2DType >::New(); - EXERCISE_BASIC_OBJECT_METHODS( mean, MeanImageFilter, BoxImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( mean, MeanImageFilter, BoxImageFilter ); - TRY_EXPECT_NO_EXCEPTION( random->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( random->Update() ); mean->SetInput( random->GetOutput() ); @@ -61,9 +61,9 @@ int itkMeanImageFilterTest( int, char* [] ) neighRadius[0] = 1; neighRadius[1] = 1; mean->SetRadius( neighRadius ); - TEST_SET_GET_VALUE( neighRadius, mean->GetRadius() ); + ITK_TEST_SET_GET_VALUE( neighRadius, mean->GetRadius() ); - TRY_EXPECT_NO_EXCEPTION( mean->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( mean->Update() ); itk::ImageRegionIterator< FloatImage2DType > it; it = itk::ImageRegionIterator< FloatImage2DType >( random->GetOutput(), diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersTest.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersTest.cxx index b3e80f07fd9..e6511df9950 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFiltersTest.cxx @@ -434,7 +434,7 @@ int itkRecursiveGaussianImageFiltersTest(int, char* [] ) } filter->SetSigma( 0.0 ); - TRY_EXPECT_EXCEPTION( filter->Update() ) + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ) } { @@ -511,7 +511,7 @@ int itkRecursiveGaussianImageFiltersTest(int, char* [] ) } filter->SetSigma( 0.0 ); - TRY_EXPECT_EXCEPTION( filter->Update() ) + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ) } diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx index 4310dfd8171..030d7374912 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx @@ -52,7 +52,7 @@ int InPlaceTest( char * inputFilename, bool normalizeAcrossScale, typename TFilt } - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); typename TFilter::OutputImageType::Pointer outputImage1 = filter->GetOutput(); outputImage1->DisconnectPipeline(); @@ -60,7 +60,7 @@ int InPlaceTest( char * inputFilename, bool normalizeAcrossScale, typename TFilt // Set the InPlace flag to On filter->InPlaceOn(); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); typename TFilter::OutputImageType::Pointer outputImage2 = filter->GetOutput(); outputImage2->DisconnectPipeline(); @@ -126,14 +126,14 @@ int itkSmoothingRecursiveGaussianImageFilterTest( int argc, char* argv[] ) // Create the filter SmoothingRecursiveGaussianImageFilterType::Pointer filter = SmoothingRecursiveGaussianImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, SmoothingRecursiveGaussianImageFilter, InPlaceImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, SmoothingRecursiveGaussianImageFilter, InPlaceImageFilter ); itk::SimpleFilterWatcher watcher( filter ); // Set the scale normalization flag bool normalizeAcrossScale = std::stoi( argv[3] ); - TEST_SET_GET_BOOLEAN( filter, NormalizeAcrossScale, normalizeAcrossScale ); + ITK_TEST_SET_GET_BOOLEAN( filter, NormalizeAcrossScale, normalizeAcrossScale ); // Set the value ofthe standard deviation of the Gaussian used for smoothing SmoothingRecursiveGaussianImageFilterType::SigmaArrayType::ValueType sigmaValue = std::stod( argv[4] ); @@ -141,17 +141,17 @@ int itkSmoothingRecursiveGaussianImageFilterTest( int argc, char* argv[] ) sigma.Fill( sigmaValue ); filter->SetSigma( sigmaValue ); - TEST_SET_GET_VALUE( sigmaValue, filter->GetSigma() ); + ITK_TEST_SET_GET_VALUE( sigmaValue, filter->GetSigma() ); filter->SetSigmaArray( sigma ); - TEST_SET_GET_VALUE( sigma, filter->GetSigmaArray() ); + ITK_TEST_SET_GET_VALUE( sigma, filter->GetSigmaArray() ); // Set the input image filter->SetInput( reader->GetOutput() ); // Run the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Write the output @@ -160,7 +160,7 @@ int itkSmoothingRecursiveGaussianImageFilterTest( int argc, char* argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( filter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Test the InPlaceOn option output if( InPlaceTest< SmoothingRecursiveGaussianImageFilterType >( argv[1], normalizeAcrossScale, sigmaValue ) == EXIT_FAILURE ) diff --git a/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx index 7de1cc6c301..288fa3318fe 100644 --- a/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx @@ -57,10 +57,10 @@ int itkHuangMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx index 9aa2dd990b9..c6226548405 100644 --- a/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkHuangThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx index ca559540a65..dd3e285bda6 100644 --- a/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx @@ -56,10 +56,10 @@ int itkIntermodesMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx index 6e80d8692bd..6be9143e0a1 100644 --- a/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkIntermodesThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx index 7b86fcbd82f..ad1b935bd8f 100644 --- a/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx @@ -56,10 +56,10 @@ int itkIsoDataMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx index 94081674faf..83d2d6ff4d0 100644 --- a/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkIsoDataThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx index 3904a260688..65ae5362c00 100644 --- a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx @@ -56,10 +56,10 @@ int itkKittlerIllingworthMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx index 18f3bb7b183..483115ca5a6 100644 --- a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkKittlerIllingworthThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx index 0dd74b70983..52b080c86d1 100644 --- a/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx @@ -56,10 +56,10 @@ int itkLiMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx index e523dff7c2a..2592b455ba5 100644 --- a/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkLiThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx index 3ed5173d1b6..e3ea14a8e1e 100644 --- a/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx @@ -57,10 +57,10 @@ int itkMaximumEntropyMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx index d245172b972..1b09c6d3011 100644 --- a/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkMaximumEntropyThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx index f3708833166..ea24f2ccdea 100644 --- a/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx @@ -58,10 +58,10 @@ int itkMomentsMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx index 3447fc507bb..64d8e3235dc 100644 --- a/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkMomentsThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx index e59f7a2bcb2..59e26220903 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx @@ -56,10 +56,10 @@ int itkOtsuMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx index c06cd07b3cb..de12ac5db16 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx @@ -71,9 +71,9 @@ int itkOtsuMultipleThresholdsCalculatorTest(int, char*[]) OtsuMultipleThresholdCalculatorType::Pointer otsuThresholdCalculator = OtsuMultipleThresholdCalculatorType::New(); #if defined(ITKV4_COMPATIBILITY) - TEST_EXPECT_TRUE( otsuThresholdCalculator->GetReturnBinMidpoint()); + ITK_TEST_EXPECT_TRUE( otsuThresholdCalculator->GetReturnBinMidpoint()); #else - TEST_EXPECT_TRUE( !otsuThresholdCalculator->GetReturnBinMidpoint()); + ITK_TEST_EXPECT_TRUE( !otsuThresholdCalculator->GetReturnBinMidpoint()); #endif otsuThresholdCalculator->SetInputHistogram(histogram); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx index b995b74a5c6..fec90471b3d 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx @@ -53,7 +53,7 @@ int itkOtsuMultipleThresholdsImageFilterTest(int argc, char* argv[] ) ReaderType::Pointer reader = ReaderType::New(); FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, OtsuMultipleThresholdsImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, OtsuMultipleThresholdsImageFilter, ImageToImageFilter ); RescaleType::Pointer rescaler = RescaleType::New(); @@ -66,9 +66,9 @@ int itkOtsuMultipleThresholdsImageFilterTest(int argc, char* argv[] ) #if defined(ITKV4_COMPATIBILITY) - TEST_EXPECT_TRUE( filter->GetReturnBinMidpoint() ); + ITK_TEST_EXPECT_TRUE( filter->GetReturnBinMidpoint() ); #else - TEST_EXPECT_TRUE( !filter->GetReturnBinMidpoint() ); + ITK_TEST_EXPECT_TRUE( !filter->GetReturnBinMidpoint() ); #endif filter->ReturnBinMidpointOff(); @@ -77,29 +77,29 @@ int itkOtsuMultipleThresholdsImageFilterTest(int argc, char* argv[] ) auto numberOfHistogramBins = static_cast< itk::SizeValueType >(std::stoi( argv[3] ) ); filter->SetNumberOfHistogramBins( numberOfHistogramBins ); - TEST_SET_GET_VALUE( numberOfHistogramBins, filter->GetNumberOfHistogramBins() ); + ITK_TEST_SET_GET_VALUE( numberOfHistogramBins, filter->GetNumberOfHistogramBins() ); auto numberOfThresholds = static_cast< itk::SizeValueType >(std::stoi( argv[4] ) ); filter->SetNumberOfThresholds( numberOfThresholds ); - TEST_SET_GET_VALUE( numberOfThresholds, filter->GetNumberOfThresholds() ); + ITK_TEST_SET_GET_VALUE( numberOfThresholds, filter->GetNumberOfThresholds() ); auto labelOffset = static_cast< FilterType::OutputPixelType >(std::stoi( argv[5] ) ); filter->SetLabelOffset( labelOffset ); - TEST_SET_GET_VALUE( labelOffset, filter->GetLabelOffset() ); + ITK_TEST_SET_GET_VALUE( labelOffset, filter->GetLabelOffset() ); if( argc > 6 ) { bool valleyEmphasis = static_cast< bool >( std::stoi( argv[6] ) ); - TEST_SET_GET_BOOLEAN( filter, ValleyEmphasis, valleyEmphasis ); + ITK_TEST_SET_GET_BOOLEAN( filter, ValleyEmphasis, valleyEmphasis ); } if( argc > 7 ) { bool returnBinMidpoint = static_cast< bool >( std::stoi( argv[7] ) ); - TEST_SET_GET_BOOLEAN( filter, ReturnBinMidpoint, returnBinMidpoint ); + ITK_TEST_SET_GET_BOOLEAN( filter, ReturnBinMidpoint, returnBinMidpoint ); } - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Rescale the image so that it can be seen. The output of the @@ -113,7 +113,7 @@ int itkOtsuMultipleThresholdsImageFilterTest(int argc, char* argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx index e8c3b2a59f2..47222d0d816 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx @@ -53,9 +53,9 @@ int itkOtsuThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); #if defined(ITKV4_COMPATIBILITY) - TEST_EXPECT_TRUE( filter->GetReturnBinMidpoint() ); + ITK_TEST_EXPECT_TRUE( filter->GetReturnBinMidpoint() ); #else - TEST_EXPECT_TRUE( !filter->GetReturnBinMidpoint() ); + ITK_TEST_EXPECT_TRUE( !filter->GetReturnBinMidpoint() ); #endif reader->SetFileName( argv[1] ); @@ -79,7 +79,7 @@ int itkOtsuThresholdImageFilterTest(int argc, char* argv[] ) if( argc > 5 ) { bool returnBinMidpoint = static_cast< bool >( std::stoi( argv[5] ) ); - TEST_SET_GET_BOOLEAN( filter, ReturnBinMidpoint, returnBinMidpoint ); + ITK_TEST_SET_GET_BOOLEAN( filter, ReturnBinMidpoint, returnBinMidpoint ); } filter->Update(); diff --git a/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx index d6d319219e5..091cdc28841 100644 --- a/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx @@ -58,10 +58,10 @@ int itkRenyiEntropyMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx index 0b296c41396..810a236ce23 100644 --- a/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkRenyiEntropyThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx index 28318669377..8861c516656 100644 --- a/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx @@ -57,10 +57,10 @@ int itkShanbhagMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx index 17735e46f63..e4afca310ca 100644 --- a/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkShanbhagThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx index af61710ff01..5659fcaddb8 100644 --- a/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx @@ -96,7 +96,7 @@ int ThresholdLabelerImageFilterTestHelper( bool useRealTypeThresholds ) using LabelerFilterType = itk::ThresholdLabelerImageFilter< InputImageType, LabeledImageType >; LabelerFilterType::Pointer labelerFilter = LabelerFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( labelerFilter, ThresholdLabelerImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( labelerFilter, ThresholdLabelerImageFilter, UnaryFunctorImageFilter ); labelerFilter->SetInput(inputImage); @@ -110,7 +110,7 @@ int ThresholdLabelerImageFilterTestHelper( bool useRealTypeThresholds ) thresholds.push_back(3.0); labelerFilter->SetThresholds(thresholds); - //TEST_SET_GET_VALUE( thresholds, labelerFilter->GetThresholds() ); + //ITK_TEST_SET_GET_VALUE( thresholds, labelerFilter->GetThresholds() ); } else { @@ -121,11 +121,11 @@ int ThresholdLabelerImageFilterTestHelper( bool useRealTypeThresholds ) thresholds.push_back(3.0); labelerFilter->SetRealThresholds(thresholds); - //TEST_SET_GET_VALUE( thresholds, labelerFilter->GetRealThresholds() ); + //ITK_TEST_SET_GET_VALUE( thresholds, labelerFilter->GetRealThresholds() ); } labelerFilter->SetLabelOffset(offset); - TEST_SET_GET_VALUE( offset, labelerFilter->GetLabelOffset() ); + ITK_TEST_SET_GET_VALUE( offset, labelerFilter->GetLabelOffset() ); try { diff --git a/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx index bb12caf72fe..55ec9072682 100644 --- a/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx @@ -56,10 +56,10 @@ int itkTriangleMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx index 4a4281982fa..d20da323295 100644 --- a/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkTriangleThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx index 6dd313a3718..93be2807213 100644 --- a/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx @@ -57,10 +57,10 @@ int itkYenMaskedThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); maskreader->SetFileName(argv[2]); diff --git a/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx index 6f47b9951b6..4b747879835 100644 --- a/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx @@ -53,10 +53,10 @@ int itkYenThresholdImageFilterTest(int argc, char* argv[] ) itk::SimpleFilterWatcher watcher(filter); filter->SetInsideValue( 255 ); - TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( 255, filter->GetInsideValue() ); filter->SetOutsideValue( 0 ); - TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( 0, filter->GetOutsideValue() ); reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest.cxx index 1170e396fbd..760365df828 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest.cxx @@ -54,7 +54,7 @@ int itkBMPImageIOTest( int argc, char* argv[] ) std::cout << "NumberOfComponents: " << reader->GetImageIO()->GetNumberOfComponents() << std::endl; - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); ImageType::Pointer image = reader->GetOutput(); @@ -72,7 +72,7 @@ int itkBMPImageIOTest( int argc, char* argv[] ) writer->SetInput( reader->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Print the IO writer->GetImageIO()->Print( std::cout ); diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx index c4e22626764..b1c792c12e8 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx @@ -52,7 +52,7 @@ int itkBMPImageIOTest2( int argc, char* argv[] ) std::cout << "NumberOfComponents: " << reader->GetImageIO()->GetNumberOfComponents() << std::endl; - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); ImageType::Pointer image = reader->GetOutput(); @@ -71,7 +71,7 @@ int itkBMPImageIOTest2( int argc, char* argv[] ) writer->SetInput( reader->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Print the IO writer->GetImageIO()->Print( std::cout ); diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest3.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest3.cxx index 3e7386c1c84..58794ddab16 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest3.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest3.cxx @@ -47,7 +47,7 @@ int itkBMPImageIOTest3( int argc, char* argv[] ) itk::BMPImageIO::Pointer lowerLeftImageIO = itk::BMPImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); lowerLeftImageReader->SetImageIO( lowerLeftImageIO ); lowerLeftImageReader->SetFileName( argv[1] ); @@ -56,14 +56,14 @@ int itkBMPImageIOTest3( int argc, char* argv[] ) itk::BMPImageIO::Pointer upperLeftImageIO = itk::BMPImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); upperLeftImageReader->SetImageIO( upperLeftImageIO ); upperLeftImageReader->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( lowerLeftImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( lowerLeftImageReader->Update() ); - TRY_EXPECT_NO_EXCEPTION( upperLeftImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( upperLeftImageReader->Update() ); if( !lowerLeftImageIO->GetFileLowerLeft() ) diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest4.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest4.cxx index 5060466066b..c7251584540 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest4.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest4.cxx @@ -49,7 +49,7 @@ int itkBMPImageIOTest4( int argc, char* argv[] ) itk::BMPImageIO::Pointer lowerLeftImageIO = itk::BMPImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); lowerLeftImageReader->SetImageIO( lowerLeftImageIO ); lowerLeftImageReader->SetFileName( argv[1] ); @@ -58,14 +58,14 @@ int itkBMPImageIOTest4( int argc, char* argv[] ) itk::BMPImageIO::Pointer upperLeftImageIO = itk::BMPImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( lowerLeftImageIO, BMPImageIO, ImageIOBase ); upperLeftImageReader->SetImageIO( upperLeftImageIO ); upperLeftImageReader->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( lowerLeftImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( lowerLeftImageReader->Update() ); - TRY_EXPECT_NO_EXCEPTION( upperLeftImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( upperLeftImageReader->Update() ); if( !lowerLeftImageIO->GetFileLowerLeft() ) diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest5.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest5.cxx index 05a1f1e091e..b61efca8646 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest5.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest5.cxx @@ -52,7 +52,7 @@ int itkBMPImageIOTest5( int argc, char* argv[] ) itk::BMPImageIO::Pointer compressedImageIO = itk::BMPImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( compressedImageIO, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( compressedImageIO, BMPImageIO, ImageIOBase ); compressedImageReader->SetImageIO( compressedImageIO ); compressedImageReader->SetFileName( argv[1] ); @@ -62,7 +62,7 @@ int itkBMPImageIOTest5( int argc, char* argv[] ) itk::BMPImageIO::Pointer uncompressedImageIO = itk::BMPImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( uncompressedImageIO, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( uncompressedImageIO, BMPImageIO, ImageIOBase ); uncompressedImageReader->SetImageIO( uncompressedImageIO ); uncompressedImageReader->SetFileName( argv[2] ); @@ -102,9 +102,9 @@ int itkBMPImageIOTest5( int argc, char* argv[] ) return EXIT_FAILURE; } - TRY_EXPECT_NO_EXCEPTION( compressedImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( compressedImageReader->Update() ); - TRY_EXPECT_NO_EXCEPTION( uncompressedImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( uncompressedImageReader->Update() ); if( compressedImageIO->GetBMPCompression() != 1 ) diff --git a/Modules/IO/BMP/test/itkBMPImageIOTestPalette.cxx b/Modules/IO/BMP/test/itkBMPImageIOTestPalette.cxx index 1c11d2690d1..3c11ff08362 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTestPalette.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTestPalette.cxx @@ -51,18 +51,18 @@ int itkBMPImageIOTestPalette( int argc, char* argv[] ) ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( io, BMPImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( io, BMPImageIO, ImageIOBase ); const auto expandRGBPalette = static_cast< bool >( std::stoi(argv[3]) ); const auto isPaletteImage = static_cast< bool >( std::stoi(argv[4]) ); - TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); + ITK_TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); // Exercise exception cases size_t sizeOfActualIORegion = io->GetIORegion().GetNumberOfPixels() * ( io->GetComponentSize() * io->GetNumberOfComponents() ); auto * loadBuffer = new char[sizeOfActualIORegion]; - TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); + ITK_TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); io->SetFileName( argv[1] ); @@ -104,7 +104,7 @@ int itkBMPImageIOTestPalette( int argc, char* argv[] ) // Try reading - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Try Palette reading and scalar image reading @@ -160,7 +160,7 @@ int itkBMPImageIOTestPalette( int argc, char* argv[] ) writer->SetImageIO( io ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Exercise other methods itk::ImageIOBase::SizeType pixelStride = io->GetPixelStride(); diff --git a/Modules/IO/Bruker/test/itkBrukerImageTest.cxx b/Modules/IO/Bruker/test/itkBrukerImageTest.cxx index 1ab9c40d8c3..19addea2645 100644 --- a/Modules/IO/Bruker/test/itkBrukerImageTest.cxx +++ b/Modules/IO/Bruker/test/itkBrukerImageTest.cxx @@ -45,7 +45,7 @@ int itkBrukerImageTest( int argc, char *argv[] ) itk::Bruker2dseqImageIO::Pointer brukerImageIO = itk::Bruker2dseqImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( brukerImageIO, Bruker2dseqImageIO, + ITK_EXERCISE_BASIC_OBJECT_METHODS( brukerImageIO, Bruker2dseqImageIO, ImageIOBase ); const char* inputFilename = argv[1]; @@ -57,12 +57,12 @@ int itkBrukerImageTest( int argc, char *argv[] ) ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Bruker has a lot of extraneous meta-data, get rid of it reader->GetOutput()->GetMetaDataDictionary().Clear(); writer->SetFileName( argv[2] ); writer->SetInput( reader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); } else { diff --git a/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx b/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx index 32c2317d3ac..ff8b7c497f2 100644 --- a/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx +++ b/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx @@ -57,7 +57,7 @@ int itkCSVNumericObjectFileWriterTest( int argc, char *argv[] ) ; Array2DWriterType::Pointer array_writer = Array2DWriterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( array_writer, CSVNumericObjectFileWriter, LightProcessObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( array_writer, CSVNumericObjectFileWriter, LightProcessObject ); // should throw an exception as there is no input file nor any object // to write out diff --git a/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx index 9cd0e1ff172..6a56c892585 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx @@ -48,7 +48,7 @@ int itkGDCMImageReadSeriesWriteTest( int argc, char* argv[] ) reader->SetFileName( inputImage ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); using ImageIOType = itk::GDCMImageIO; using NamesGeneratorType = itk::NumericSeriesFileNames; @@ -97,7 +97,7 @@ int itkGDCMImageReadSeriesWriteTest( int argc, char* argv[] ) seriesWriter->SetFileNames( namesGenerator->GetFileNames() ); - TRY_EXPECT_NO_EXCEPTION( seriesWriter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( seriesWriter->Update() ); // Now read back in and write out as 3D image for comparison with the input. @@ -110,7 +110,7 @@ int itkGDCMImageReadSeriesWriteTest( int argc, char* argv[] ) singleWriter->SetInput( seriesReader->GetOutput() ); singleWriter->SetFileName( singleOutputImage ); - TRY_EXPECT_NO_EXCEPTION( singleWriter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( singleWriter->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx index 81922958e24..bc0a6ee563c 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx @@ -386,7 +386,7 @@ itkHDF5ImageIOTest(int ac, char * av [] ) itk::ObjectFactoryBase::RegisterFactory(itk::HDF5ImageIOFactory::New() ); itk::HDF5ImageIO::Pointer imageio = itk::HDF5ImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( imageio, HDF5ImageIO, StreamingImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( imageio, HDF5ImageIO, StreamingImageIOBase ); int result(0); diff --git a/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx b/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx index 7a05cc7bfa1..8a9e99802b4 100644 --- a/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx +++ b/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx @@ -44,7 +44,7 @@ int itkConvertBufferTest(int, char* []) std::cerr << p[j] << ", "; for(unsigned long k=0; k < sizeof(p) / sizeof(itk::RGBPixel); ++k) { - TEST_EXPECT_EQUAL(p[j][k], ipa[j]); + ITK_TEST_EXPECT_EQUAL(p[j][k], ipa[j]); } } std::cerr << "\n"; @@ -60,7 +60,7 @@ int itkConvertBufferTest(int, char* []) std::cerr << pf[j] << " "; for(unsigned int k = 0; k < sizeof(pf) / sizeof(itk::RGBPixel); ++k) { - TEST_EXPECT_EQUAL(pf[k][j], ipa3com[j+k*3]); + ITK_TEST_EXPECT_EQUAL(pf[k][j], ipa3com[j+k*3]); } } std::cerr << "\n"; @@ -77,10 +77,10 @@ int itkConvertBufferTest(int, char* []) ++k ) { - TEST_EXPECT_EQUAL(pa[k][j], ipa3com[j+k*3]); + ITK_TEST_EXPECT_EQUAL(pa[k][j], ipa3com[j+k*3]); } } - TEST_EXPECT_EQUAL(pa[0][3], 1.f); // Alpha must be 1.0f for float input pixel. + ITK_TEST_EXPECT_EQUAL(pa[0][3], 1.f); // Alpha must be 1.0f for float input pixel. std::cerr << "\n"; unsigned char ucipa3com[] = {1,1,1, 2,2,2, 3,3,3}; // convert from unsigned char[3] to RGBA @@ -96,10 +96,10 @@ int itkConvertBufferTest(int, char* []) ++k ) { - TEST_EXPECT_EQUAL(ucpa[k][j], ucipa3com[j+k*3]); + ITK_TEST_EXPECT_EQUAL(ucpa[k][j], ucipa3com[j+k*3]); } } - TEST_EXPECT_EQUAL(ucpa[0][3], 255); // Alpha must be 255 for unsigned char input pixel type + ITK_TEST_EXPECT_EQUAL(ucpa[0][3], 255); // Alpha must be 255 for unsigned char input pixel type std::cerr << "\n"; // create an initial array of floats float farray[] = {1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.4f, 7.4f, 8.8f, 9.9f }; @@ -115,7 +115,7 @@ int itkConvertBufferTest(int, char* []) for(int i =0; i < arraySize; ++i) { std::cerr << farray[i] << " "; - TEST_EXPECT_EQUAL(darray[i], static_cast(farray[i])) + ITK_TEST_EXPECT_EQUAL(darray[i], static_cast(farray[i])) } // convert a float array to an int array itk::ConvertPixelBuffer(farray[i])); + ITK_TEST_EXPECT_EQUAL(iarray[i], static_cast(farray[i])); } // convert the int array to the float array itk::ConvertPixelBuffer(iarray[i])); + ITK_TEST_EXPECT_EQUAL(farray[i], static_cast(iarray[i])); } std::cerr << "\n"; return EXIT_SUCCESS; diff --git a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx index 35b270cf27c..c5909d27f7d 100644 --- a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx +++ b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx @@ -472,7 +472,7 @@ int itkMRCImageIOTest(int argc, char* argv[]) using IOType = itk::MRCImageIO; IOType::Pointer mrcIO = IOType::New(); - EXERCISE_BASIC_OBJECT_METHODS( mrcIO, MRCImageIO, StreamingImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( mrcIO, MRCImageIO, StreamingImageIOBase ); // // All tests succeeded diff --git a/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx b/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx index ffbd76a7f05..2cb15e6dc6c 100644 --- a/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx +++ b/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx @@ -91,7 +91,7 @@ bool Test( const std::string &inFileName, const std::string &outFileName, const hasher->SetInput( image ); hasher->Update(); - TEST_EXPECT_EQUAL( md5, hasher->GetHash() ); + ITK_TEST_EXPECT_EQUAL( md5, hasher->GetHash() ); using WriterType = itk::ImageFileWriter; typename WriterType::Pointer writer = WriterType::New(); diff --git a/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx b/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx index ec312fb0297..f01ed9a67af 100644 --- a/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx +++ b/Modules/IO/MeshVTK/test/itkMeshFileWriteReadTensorTest.cxx @@ -59,7 +59,7 @@ int itkMeshFileWriteReadTensorTest( int argc, char* argv[] ) MeshWriter2dType::Pointer mesh2dWriter = MeshWriter2dType::New(); - EXERCISE_BASIC_OBJECT_METHODS( mesh2dWriter, MeshFileWriter, ProcessObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( mesh2dWriter, MeshFileWriter, ProcessObject ); mesh2dWriter->SetMeshIO( itk::VTKPolyDataMeshIO::New() ); mesh2dWriter->SetInput( mesh2d ); @@ -91,7 +91,7 @@ int itkMeshFileWriteReadTensorTest( int argc, char* argv[] ) MeshWriter3dType::Pointer mesh3dWriter = MeshWriter3dType::New(); - EXERCISE_BASIC_OBJECT_METHODS( mesh3dWriter, MeshFileWriter, ProcessObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( mesh3dWriter, MeshFileWriter, ProcessObject ); mesh3dWriter->SetMeshIO( itk::VTKPolyDataMeshIO::New() ); mesh3dWriter->SetInput( mesh3d ); diff --git a/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshCanReadImageTest.cxx b/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshCanReadImageTest.cxx index 68f76c91209..4da465e92fb 100644 --- a/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshCanReadImageTest.cxx +++ b/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshCanReadImageTest.cxx @@ -32,7 +32,7 @@ int itkVTKPolyDataMeshCanReadImageTest(int argc, char * argv[]) itk::VTKPolyDataMeshIO::Pointer vtkMeshIO = itk::VTKPolyDataMeshIO::New(); // Ensure that the MeshIO does not claim to read a .vtk file with image // (Structured Grid) data - TEST_EXPECT_EQUAL( vtkMeshIO->CanReadFile( argv[1] ), false ); + ITK_TEST_EXPECT_EQUAL( vtkMeshIO->CanReadFile( argv[1] ), false ); std::cout << "Test finished." << std::endl; return EXIT_SUCCESS; diff --git a/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx b/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx index ba9c72f0533..ac5a5671c69 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx @@ -79,7 +79,7 @@ int TestUnknowMetaDataBug( const std::string &fname ) std::string readHash = hasher->GetHash(); std::cout << "\tRead hash: " << readHash << std::endl; - TEST_EXPECT_EQUAL( originalHash, readHash ); + ITK_TEST_EXPECT_EQUAL( originalHash, readHash ); } catch ( std::exception &e ) { diff --git a/Modules/IO/Meta/test/testMetaArray.cxx b/Modules/IO/Meta/test/testMetaArray.cxx index a0c851644a7..39dc8f161e9 100644 --- a/Modules/IO/Meta/test/testMetaArray.cxx +++ b/Modules/IO/Meta/test/testMetaArray.cxx @@ -41,19 +41,19 @@ int testMetaArray(int argc, char * argv[]) // Write them itk::MetaArrayWriter::Pointer arrayWriter = itk::MetaArrayWriter::New(); - EXERCISE_BASIC_OBJECT_METHODS( arrayWriter, MetaArrayWriter, LightProcessObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( arrayWriter, MetaArrayWriter, LightProcessObject ); std::string filename = "test.mva"; arrayWriter->SetFileName( filename ); - TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); + ITK_TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); unsigned int precision = 6; arrayWriter->SetPrecision( precision ); - TEST_SET_GET_VALUE( precision, arrayWriter->GetPrecision() ); + ITK_TEST_SET_GET_VALUE( precision, arrayWriter->GetPrecision() ); bool binary = false; arrayWriter->SetBinary( binary ); - TEST_SET_GET_VALUE( binary, arrayWriter->GetBinary() ); + ITK_TEST_SET_GET_VALUE( binary, arrayWriter->GetBinary() ); arrayWriter->SetInput(MET_SHORT, &arr); arrayWriter->Update(); @@ -68,7 +68,7 @@ int testMetaArray(int argc, char * argv[]) filename = "test_far.mva"; arrayWriter->SetFileName( filename ); - TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); + ITK_TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); arrayWriter->SetInput(MET_SHORT, &farr); arrayWriter->Update(); @@ -83,15 +83,15 @@ int testMetaArray(int argc, char * argv[]) filename = "test_vec.mva"; arrayWriter->SetFileName( filename ); - TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); + ITK_TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); precision = 4; arrayWriter->SetPrecision( precision ); - TEST_SET_GET_VALUE( precision, arrayWriter->GetPrecision() ); + ITK_TEST_SET_GET_VALUE( precision, arrayWriter->GetPrecision() ); binary = true; arrayWriter->SetBinary( binary ); - TEST_SET_GET_VALUE( binary, arrayWriter->GetBinary() ); + ITK_TEST_SET_GET_VALUE( binary, arrayWriter->GetBinary() ); arrayWriter->SetInput(MET_FLOAT, &vec); arrayWriter->Update(); @@ -106,7 +106,7 @@ int testMetaArray(int argc, char * argv[]) filename = "test_cvec.mvh"; arrayWriter->SetFileName( filename ); - TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); + ITK_TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); arrayWriter->SetInput(MET_FLOAT, &cvec); arrayWriter->Update(); @@ -122,7 +122,7 @@ int testMetaArray(int argc, char * argv[]) filename = "test_vvec.mvh"; arrayWriter->SetFileName( filename ); - TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); + ITK_TEST_SET_GET_VALUE( filename, arrayWriter->GetFileName() ); arrayWriter->SetInput(MET_FLOAT, &vvec); arrayWriter->Update(); @@ -132,11 +132,11 @@ int testMetaArray(int argc, char * argv[]) itk::VariableLengthVector rvecs; itk::MetaArrayReader::Pointer arrayReader = itk::MetaArrayReader::New(); - EXERCISE_BASIC_OBJECT_METHODS( arrayReader, MetaArrayReader, LightProcessObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( arrayReader, MetaArrayReader, LightProcessObject ); filename = "test.mva"; arrayReader->SetFileName( filename ); - TEST_SET_GET_VALUE( filename, arrayReader->GetFileName() ); + ITK_TEST_SET_GET_VALUE( filename, arrayReader->GetFileName() ); arrayReader->Update(); arrayReader->GetOutput(MET_SHORT, & rvecs); diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx index 1d5df43bf79..b1636b53c1c 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx @@ -88,7 +88,7 @@ int itkNiftiImageIOTest12(int ac, char* av[]) std::string readHash = hasher->GetHash(); std::cout << "Read hash: " << readHash << std::endl; - TEST_EXPECT_EQUAL( originalHash, readHash ); + ITK_TEST_EXPECT_EQUAL( originalHash, readHash ); } catch (itk::ExceptionObject &) diff --git a/Modules/IO/PNG/test/itkPNGImageIOTest.cxx b/Modules/IO/PNG/test/itkPNGImageIOTest.cxx index 93ff1df811e..edab9dd8986 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTest.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTest.cxx @@ -50,7 +50,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) // Read in the image itk::PNGImageIO::Pointer io = itk::PNGImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( io, PNGImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( io, PNGImageIO, ImageIOBase ); // Exercise exception cases @@ -58,18 +58,18 @@ int itkPNGImageIOTest( int argc, char * argv[] ) ( io->GetComponentSize() * io->GetNumberOfComponents() ); auto * loadBuffer = new char[sizeOfActualIORegion]; - TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); + ITK_TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); auto useCompression = static_cast< bool >( std::stoi( argv[3] ) ); - TEST_SET_GET_BOOLEAN( io, UseCompression, useCompression ); + ITK_TEST_SET_GET_BOOLEAN( io, UseCompression, useCompression ); int compressionLevel = std::stoi( argv[4] ); io->SetCompressionLevel( compressionLevel ); - TEST_SET_GET_VALUE( compressionLevel, io->GetCompressionLevel() ); + ITK_TEST_SET_GET_VALUE( compressionLevel, io->GetCompressionLevel() ); auto expandRGBPalette = static_cast< bool >( argv[5] ); - TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); + ITK_TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); if( io->CanReadFile( "" ) ) { @@ -108,7 +108,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) itk::ImageFileReader< RGBImageType >::New(); reader->SetFileName( argv[1] ); reader->SetImageIO( io ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); if( io->GetExpandRGBPalette() ) { @@ -141,7 +141,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) writer->SetFileName( argv[2] ); writer->SetImageIO( io ); - TRY_EXPECT_NO_EXCEPTION( writer->Write() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Write() ); // Release memory @@ -194,7 +194,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) writer3D->SetInput( volume ); - TRY_EXPECT_NO_EXCEPTION( writer3D->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer3D->Update() ); // @@ -213,7 +213,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) writer3D->SetImageIO( io ); writer3D->SetInput( degenerateVolume ); - TRY_EXPECT_NO_EXCEPTION( writer3D->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer3D->Update() ); // @@ -240,7 +240,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) writer2D->SetImageIO(io); writer2D->SetInput( image ); - TRY_EXPECT_NO_EXCEPTION( writer2D->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer2D->Update() ); // @@ -259,7 +259,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) writer2D->SetImageIO( io ); writer2D->SetInput( degenerateImage ); - TRY_EXPECT_NO_EXCEPTION( writer2D->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer2D->Update() ); // // 1D image @@ -284,7 +284,7 @@ int itkPNGImageIOTest( int argc, char * argv[] ) writer1D->SetImageIO( io ); writer1D->SetInput( line ); - TRY_EXPECT_NO_EXCEPTION( writer1D->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer1D->Update() ); std::cout << "Test finished" << std::endl; diff --git a/Modules/IO/PNG/test/itkPNGImageIOTest2.cxx b/Modules/IO/PNG/test/itkPNGImageIOTest2.cxx index e73b37b477f..9c49b5989b0 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTest2.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTest2.cxx @@ -69,25 +69,25 @@ int itkPNGImageIOTest2( int argc, char * argv[] ) // Read the input image itk::PNGImageIO::Pointer io = itk::PNGImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( io, PNGImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( io, PNGImageIO, ImageIOBase ); // Exercise exception cases size_t sizeOfActualIORegion = io->GetIORegion().GetNumberOfPixels() * ( io->GetComponentSize() * io->GetNumberOfComponents() ); auto * loadBuffer = new char[sizeOfActualIORegion]; - TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); + ITK_TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); auto useCompression = static_cast< bool >( argv[3] ); - TEST_SET_GET_BOOLEAN( io, UseCompression, useCompression ); + ITK_TEST_SET_GET_BOOLEAN( io, UseCompression, useCompression ); int compressionLevel = std::stoi( argv[4] ); io->SetCompressionLevel( compressionLevel ); - TEST_SET_GET_VALUE( compressionLevel, io->GetCompressionLevel() ); + ITK_TEST_SET_GET_VALUE( compressionLevel, io->GetCompressionLevel() ); auto expandRGBPalette = static_cast< bool >( std::stoi( argv[5] ) ); - TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); + ITK_TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); if( io->CanReadFile( "" ) ) { @@ -149,7 +149,7 @@ int itkPNGImageIOTest2( int argc, char * argv[] ) reader->SetFileName( argv[1] ); reader->SetImageIO( io ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); if( io->GetExpandRGBPalette() ) { @@ -191,7 +191,7 @@ int itkPNGImageIOTest2( int argc, char * argv[] ) writer->SetImageIO( io ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Release memory diff --git a/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx b/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx index 7740541359a..0d977f03ee8 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx @@ -43,7 +43,7 @@ int itkPNGImageIOTest3( int argc, char * argv[] ) reader->SetFileName( argv[1] ); reader->SetImageIO( io ); - TRY_EXPECT_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_EXCEPTION( reader->Update() ); std::cout << "Test finished" << std::endl; return EXIT_SUCCESS; } diff --git a/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx b/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx index 53c9f9e2c58..578eb5bee21 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx @@ -53,18 +53,18 @@ int itkPNGImageIOTestPalette( int argc, char * argv[] ) WriterType::Pointer writer = WriterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( io, PNGImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( io, PNGImageIO, ImageIOBase ); const auto expandRGBPalette = static_cast< bool >( std::stoi(argv[3]) ); const auto isPaletteImage = static_cast< bool >( std::stoi(argv[4]) ); - TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); + ITK_TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); // Exercise exception cases size_t sizeOfActualIORegion = io->GetIORegion().GetNumberOfPixels() * ( io->GetComponentSize() * io->GetNumberOfComponents() ); auto * loadBuffer = new char[sizeOfActualIORegion]; - TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); + ITK_TRY_EXPECT_EXCEPTION( io->Read( loadBuffer ) ); io->SetFileName( argv[1] ); @@ -106,7 +106,7 @@ int itkPNGImageIOTestPalette( int argc, char * argv[] ) } // Try reading - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Try Palette reading and scalar image reading if( io->GetExpandRGBPalette() ) @@ -159,7 +159,7 @@ int itkPNGImageIOTestPalette( int argc, char * argv[] ) writer->SetFileName( argv[2] ); writer->SetImageIO( io ); - TRY_EXPECT_NO_EXCEPTION( writer->Write() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Write() ); // Exercise other methods itk::ImageIOBase::SizeType pixelStride = io->GetPixelStride(); diff --git a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx index ea9ff646b72..cbfe38174cf 100644 --- a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx +++ b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx @@ -102,7 +102,7 @@ int itkLargeTIFFImageWriteReadTestHelper( std::string filename, typename TImage: chronometer.Start( "Write" ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); chronometer.Stop( "Write" ); @@ -118,7 +118,7 @@ int itkLargeTIFFImageWriteReadTestHelper( std::string filename, typename TImage: chronometer.Start( "Read" ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); chronometer.Stop( "Read" ); diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOCompressionTest.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOCompressionTest.cxx index a1a29138fa6..e1e093f93fd 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOCompressionTest.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOCompressionTest.cxx @@ -41,35 +41,35 @@ int itkTIFFImageIOCompressionTestHelper( int, char * argv[], int JPEGQuality ) itk::TIFFImageIO::Pointer imageIO = itk::TIFFImageIO::New(); - TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("") ); - TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "" ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("") ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "" ); - TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("JPEG") ); - TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "JPEG" ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("JPEG") ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "JPEG" ); - TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("PackBits") ); - TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "PackBits" ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("PackBits") ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "PackBits" ); - TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("LZW") ); - TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "LZW" ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("LZW") ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "LZW" ); - TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("SomethingThatDoesNotExist") ); - TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "" ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("SomethingThatDoesNotExist") ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "" ); - TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("Deflate") ); - TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "Deflate" ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageIO->SetCompressor("Deflate") ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressor(), "Deflate" ); imageIO->SetCompressionLevel(2); - TEST_EXPECT_EQUAL( imageIO->GetCompressionLevel(), 2 ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressionLevel(), 2 ); imageIO->SetCompressionLevel(110); - TEST_EXPECT_EQUAL( imageIO->GetCompressionLevel(), 100 ); + ITK_TEST_EXPECT_EQUAL( imageIO->GetCompressionLevel(), 100 ); itk::TIFFImageIO::Pointer io = itk::TIFFImageIO::New(); reader->SetFileName( argv[1] ); reader->SetImageIO( io ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); std::string compression = argv[3]; @@ -82,15 +82,15 @@ int itkTIFFImageIOCompressionTestHelper( int, char * argv[], int JPEGQuality ) io->SetCompressionToDeflate(); - TEST_EXPECT_EQUAL(compression, io->GetCompressor()); - TEST_EXPECT_TRUE(io->GetUseCompression()); + ITK_TEST_EXPECT_EQUAL(compression, io->GetCompressor()); + ITK_TEST_EXPECT_TRUE(io->GetUseCompression()); } else if( compression == "LZW" ) { io->SetCompressionToLZW(); - TEST_EXPECT_EQUAL(compression, io->GetCompressor()); - TEST_EXPECT_TRUE(io->GetUseCompression()); + ITK_TEST_EXPECT_EQUAL(compression, io->GetCompressor()); + ITK_TEST_EXPECT_TRUE(io->GetUseCompression()); } else if( compression == "JPEG" ) { @@ -98,24 +98,24 @@ int itkTIFFImageIOCompressionTestHelper( int, char * argv[], int JPEGQuality ) io->SetCompressionToJPEG(); io->SetJPEGQuality( JPEGQuality ); - TEST_EXPECT_EQUAL(compression, io->GetCompressor()); - TEST_EXPECT_EQUAL(io->GetCompressionLevel(), JPEGQuality); - TEST_EXPECT_TRUE(io->GetUseCompression()); + ITK_TEST_EXPECT_EQUAL(compression, io->GetCompressor()); + ITK_TEST_EXPECT_EQUAL(io->GetCompressionLevel(), JPEGQuality); + ITK_TEST_EXPECT_TRUE(io->GetUseCompression()); } else if( compression == "PackBits" ) { io->SetCompressionToPackBits(); - TEST_EXPECT_EQUAL(compression, io->GetCompressor()); - TEST_EXPECT_TRUE(io->GetUseCompression()); + ITK_TEST_EXPECT_EQUAL(compression, io->GetCompressor()); + ITK_TEST_EXPECT_TRUE(io->GetUseCompression()); } else if( compression == "NoCompression" ) { io->SetCompressionToNoCompression(); - TEST_EXPECT_TRUE(!io->GetUseCompression()); + ITK_TEST_EXPECT_TRUE(!io->GetUseCompression()); } else { @@ -127,7 +127,7 @@ int itkTIFFImageIOCompressionTestHelper( int, char * argv[], int JPEGQuality ) writer->SetImageIO( io ); writer->UseCompressionOn(); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } @@ -158,7 +158,7 @@ int itkTIFFImageIOCompressionTest( int argc, char* argv[] ) itk::TIFFImageIO::Pointer imageIO = itk::TIFFImageIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( imageIO, TIFFImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( imageIO, TIFFImageIO, ImageIOBase ); imageIO->SetFileName( inputFilename ); imageIO->ReadImageInformation(); diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx index a54575d631f..7d1c717445e 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx @@ -71,7 +71,7 @@ int itkTIFFImageIOTestHelper( int, char * argv[] ) reader->SetFileName( argv[1] ); reader->SetImageIO( io ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Test 2 reads with only one ReadImageInformation TestMultipleReads< ImageType >( argv[1], nullptr ); @@ -89,7 +89,7 @@ int itkTIFFImageIOTestHelper( int, char * argv[] ) writer->SetFileName(argv[2]); writer->SetImageIO(io); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx index bb87c50682a..f653c1266d9 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx @@ -64,13 +64,13 @@ int itkTIFFImageIOTest2( int argc, char* argv[] ) writer->SetInput( image ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); using ReaderType = itk::ImageFileReader< ImageType >; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); const ImageType * readImage = reader->GetOutput(); diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx index 1fc30c48fb4..73c79611de0 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx @@ -52,11 +52,11 @@ int itkTIFFImageIOTestPalette(int argc, char * argv[]) WriterType::Pointer writer = WriterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( io, TIFFImageIO, ImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( io, TIFFImageIO, ImageIOBase ); const auto expandRGBPalette = static_cast< bool >( std::stoi(argv[3]) ); const auto isPaletteImage = static_cast< bool >( std::stoi(argv[4]) ); - TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); + ITK_TEST_SET_GET_BOOLEAN( io, ExpandRGBPalette, expandRGBPalette ); io->SetFileName( argv[1] ); reader->SetFileName( argv[1] ); @@ -96,7 +96,7 @@ int itkTIFFImageIOTestPalette(int argc, char * argv[]) } - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Try Palette reading and scalar image reading if( io->GetExpandRGBPalette() ) @@ -150,7 +150,7 @@ int itkTIFFImageIOTestPalette(int argc, char * argv[]) writer->SetImageIO( io ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Exercise other methods itk::ImageIOBase::SizeType pixelStride = io->GetPixelStride(); diff --git a/Modules/IO/TransformBase/test/itkTransformFileReaderTemplateTest.cxx b/Modules/IO/TransformBase/test/itkTransformFileReaderTemplateTest.cxx index 5e946aac85c..318d1ed601a 100644 --- a/Modules/IO/TransformBase/test/itkTransformFileReaderTemplateTest.cxx +++ b/Modules/IO/TransformBase/test/itkTransformFileReaderTemplateTest.cxx @@ -39,11 +39,11 @@ int itkTransformFileReaderTemplateTest( int argc, char *argv[] ) << std::endl; //trigger empty read exception - TRY_EXPECT_EXCEPTION( transformReader->Update() ); + ITK_TRY_EXPECT_EXCEPTION( transformReader->Update() ); transformReader->SetFileName("transform.garbage"); // trigger exception for transformio not found - TRY_EXPECT_EXCEPTION( transformReader->Update() ); + ITK_TRY_EXPECT_EXCEPTION( transformReader->Update() ); std::cout << "Test PASSED!" << std::endl; return EXIT_SUCCESS; diff --git a/Modules/IO/TransformBase/test/itkTransformFileWriterTemplateTest.cxx b/Modules/IO/TransformBase/test/itkTransformFileWriterTemplateTest.cxx index 4f5cb68c9d3..0c62936c95d 100644 --- a/Modules/IO/TransformBase/test/itkTransformFileWriterTemplateTest.cxx +++ b/Modules/IO/TransformBase/test/itkTransformFileWriterTemplateTest.cxx @@ -40,11 +40,11 @@ int itkTransformFileWriterTemplateTest( int argc, char *argv[] ) << std::endl; // trigger empty write exception - TRY_EXPECT_EXCEPTION( transformWriter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( transformWriter->Update() ); transformWriter->SetFileName("transform.garbage"); // trigger exception for transformio not found - TRY_EXPECT_EXCEPTION( transformWriter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( transformWriter->Update() ); std::cout << "Test PASSED!" << std::endl; return EXIT_SUCCESS; diff --git a/Modules/IO/TransformHDF5/test/itkThinPlateTransformWriteReadTest.cxx b/Modules/IO/TransformHDF5/test/itkThinPlateTransformWriteReadTest.cxx index 2d4b2c23864..d20c6a39774 100644 --- a/Modules/IO/TransformHDF5/test/itkThinPlateTransformWriteReadTest.cxx +++ b/Modules/IO/TransformHDF5/test/itkThinPlateTransformWriteReadTest.cxx @@ -107,13 +107,13 @@ static int ReadWriteTest(const char * const fileName) typename TransformWriterType::Pointer transformWriter = TransformWriterType::New(); transformWriter->SetFileName( fileName ); transformWriter->AddTransform( transform ); - TRY_EXPECT_NO_EXCEPTION( transformWriter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( transformWriter->Update() ); // Read transform file using TransformReaderType = typename itk::TransformFileReaderTemplate; typename TransformReaderType::Pointer transformReader = TransformReaderType::New(); transformReader->SetFileName(fileName); - TRY_EXPECT_NO_EXCEPTION( transformReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( transformReader->Update() ); // Compare read transform results with expected results const typename TransformReaderType::TransformListType * list = transformReader->GetTransformList(); diff --git a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx index 7e773fec086..3b988cc8b79 100644 --- a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx +++ b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx @@ -245,7 +245,7 @@ templatelessTest( const std::string & outputDirectory ) itk::TransformFileWriter::Pointer writer = itk::TransformFileWriter::New(); writer->SetInput( transform ); writer->SetFileName( outputFile ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx index 487b49b0773..6b56e85c2e4 100644 --- a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx @@ -445,7 +445,7 @@ int itkVTKImageIO2Test(int argc, char* argv[]) using IOType = itk::VTKImageIO; IOType::Pointer vtkIO = IOType::New(); - EXERCISE_BASIC_OBJECT_METHODS( vtkIO, VTKImageIO, StreamingImageIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( vtkIO, VTKImageIO, StreamingImageIOBase ); std::cout << "All tests finished!" << std::endl; return status; diff --git a/Modules/IO/VTK/test/itkVTKImageIOTest3.cxx b/Modules/IO/VTK/test/itkVTKImageIOTest3.cxx index 82f4c28c094..3f4b7aa06f4 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOTest3.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOTest3.cxx @@ -36,7 +36,7 @@ int itkVTKImageIOTest3(int argc, char* argv[] ) itk::VTKImageIO::Pointer vtkImageIO = itk::VTKImageIO::New(); // Ensure that the ImageIO does not claim to read a .vtk file with PolyData - TEST_EXPECT_EQUAL( vtkImageIO->CanReadFile( argv[1] ), false ); + ITK_TEST_EXPECT_EQUAL( vtkImageIO->CanReadFile( argv[1] ), false ); std::cout << "Test finished." << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx index d19b42b6b59..3c481f289eb 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx @@ -36,7 +36,7 @@ int itkDiscreteGaussianDerivativeImageFunctionTestND( int argc, char* argv[] ) typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); ImageType *inputImage = reader->GetOutput(); @@ -83,28 +83,28 @@ int itkDiscreteGaussianDerivativeImageFunctionTestND( int argc, char* argv[] ) function->SetOrder( order ); - TEST_SET_GET_VALUE( order, function->GetOrder() ); + ITK_TEST_SET_GET_VALUE( order, function->GetOrder() ); typename GaussianDerivativeImageFunctionType::VarianceArrayType variance; variance.Fill( sigma * sigma ); function->SetSigma( sigma ); - TEST_SET_GET_VALUE( variance, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( variance, function->GetVariance() ); function->SetMaximumError( maxError ); - TEST_SET_GET_VALUE( maxError, function->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maxError, function->GetMaximumError() ); function->SetMaximumKernelWidth( maxKernelWidth ); - TEST_SET_GET_VALUE( maxKernelWidth, function->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maxKernelWidth, function->GetMaximumKernelWidth() ); bool normalizeAcrossScale = true; - TEST_SET_GET_BOOLEAN( function, NormalizeAcrossScale, normalizeAcrossScale ); + ITK_TEST_SET_GET_BOOLEAN( function, NormalizeAcrossScale, normalizeAcrossScale ); bool useImageSpacing = true; - TEST_SET_GET_BOOLEAN( function, UseImageSpacing, useImageSpacing ); + ITK_TEST_SET_GET_BOOLEAN( function, UseImageSpacing, useImageSpacing ); function->SetInterpolationMode( interpolationMode ); - TEST_SET_GET_VALUE( interpolationMode, function->GetInterpolationMode() ); + ITK_TEST_SET_GET_VALUE( interpolationMode, function->GetInterpolationMode() ); function->Initialize(); @@ -176,7 +176,7 @@ int itkDiscreteGaussianDerivativeImageFunctionTestND( int argc, char* argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; @@ -212,7 +212,7 @@ int itkDiscreteGaussianDerivativeImageFunctionTest( int argc, char* argv[] ) GaussianDerivativeImageFunctionType::Pointer function = GaussianDerivativeImageFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( function, + ITK_EXERCISE_BASIC_OBJECT_METHODS( function, DiscreteGaussianDerivativeImageFunction, ImageFunction ); diff --git a/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx index 57888f2537a..f2b6ed918ab 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx @@ -36,7 +36,7 @@ int itkDiscreteGradientMagnitudeGaussianImageFunctionTestND( int argc, char* arg typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); ImageType *inputImage = reader->GetOutput(); @@ -83,11 +83,11 @@ int itkDiscreteGradientMagnitudeGaussianImageFunctionTestND( int argc, char* arg varianceArray.Fill( varianceValue ); function->SetVariance( varianceArray ); - TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); // Increase code coverage calling other variations of the SetVariance method function->SetVariance( varianceValue ); - TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); // Test itkSetVectorMacro double varianceVector[DiscreteGradientMagnitudeGaussianFunctionType::VarianceArrayType::Length]; @@ -98,22 +98,22 @@ int itkDiscreteGradientMagnitudeGaussianImageFunctionTestND( int argc, char* arg varianceVector[i] = varianceValue; } function->SetVariance( varianceVector ); - TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); function->SetMaximumError( maxError ); - TEST_SET_GET_VALUE( maxError, function->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maxError, function->GetMaximumError() ); function->SetMaximumKernelWidth( maxKernelWidth ); - TEST_SET_GET_VALUE( maxKernelWidth, function->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maxKernelWidth, function->GetMaximumKernelWidth() ); bool normalizeAcrossScale = true; - TEST_SET_GET_BOOLEAN( function, NormalizeAcrossScale, normalizeAcrossScale ); + ITK_TEST_SET_GET_BOOLEAN( function, NormalizeAcrossScale, normalizeAcrossScale ); - TEST_SET_GET_BOOLEAN( function, UseImageSpacing, useImageSpacing ); + ITK_TEST_SET_GET_BOOLEAN( function, UseImageSpacing, useImageSpacing ); function->SetInterpolationMode( interpolationMode ); - TEST_SET_GET_VALUE( interpolationMode, function->GetInterpolationMode() ); + ITK_TEST_SET_GET_VALUE( interpolationMode, function->GetInterpolationMode() ); function->Initialize(); @@ -185,7 +185,7 @@ int itkDiscreteGradientMagnitudeGaussianImageFunctionTestND( int argc, char* arg writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; @@ -223,7 +223,7 @@ int itkDiscreteGradientMagnitudeGaussianImageFunctionTest( int argc, char* argv[ DiscreteGradientMagnitudeGaussianFunctionType::Pointer function = DiscreteGradientMagnitudeGaussianFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( function, + ITK_EXERCISE_BASIC_OBJECT_METHODS( function, DiscreteGradientMagnitudeGaussianImageFunction, ImageFunction ); diff --git a/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx index 2c8cb758756..c5483f5adf1 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx @@ -37,7 +37,7 @@ int itkDiscreteHessianGaussianImageFunctionTestND( int argc, char* argv[] ) typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Create the itk::DiscreteHessianGaussianImageFunction @@ -72,11 +72,11 @@ int itkDiscreteHessianGaussianImageFunctionTestND( int argc, char* argv[] ) varianceArray.Fill( varianceValue ); function->SetVariance( varianceArray ); - TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); // Increase code coverage calling other variations of the SetVariance method function->SetVariance( varianceValue ); - TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); // Test itkSetVectorMacro double varianceVector[HessianGaussianImageFunctionType::VarianceArrayType::Length]; @@ -87,26 +87,26 @@ int itkDiscreteHessianGaussianImageFunctionTestND( int argc, char* argv[] ) varianceVector[i] = varianceValue; } function->SetVariance( varianceVector ); - TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); + ITK_TEST_SET_GET_VALUE( varianceArray, function->GetVariance() ); function->SetMaximumError( maxError ); - TEST_SET_GET_VALUE( maxError, function->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maxError, function->GetMaximumError() ); function->SetMaximumKernelWidth( maxKernelWidth ); - TEST_SET_GET_VALUE( maxKernelWidth, function->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maxKernelWidth, function->GetMaximumKernelWidth() ); bool normalizeAcrossScale = true; - TEST_SET_GET_BOOLEAN( function, NormalizeAcrossScale, normalizeAcrossScale ); + ITK_TEST_SET_GET_BOOLEAN( function, NormalizeAcrossScale, normalizeAcrossScale ); bool useImageSpacing = true; - TEST_SET_GET_BOOLEAN( function, UseImageSpacing, useImageSpacing ); + ITK_TEST_SET_GET_BOOLEAN( function, UseImageSpacing, useImageSpacing ); typename HessianGaussianImageFunctionType::InterpolationModeType interpolationMode = HessianGaussianImageFunctionType::NearestNeighbourInterpolation; function->SetInterpolationMode( interpolationMode ); - TEST_SET_GET_VALUE( interpolationMode, function->GetInterpolationMode() ); + ITK_TEST_SET_GET_VALUE( interpolationMode, function->GetInterpolationMode() ); function->Initialize(); @@ -179,7 +179,7 @@ int itkDiscreteHessianGaussianImageFunctionTestND( int argc, char* argv[] ) writer->SetFileName( argv[2] ); writer->SetInput( output ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); // Check that VarianceArrayType can be changed @@ -286,7 +286,7 @@ int itkDiscreteHessianGaussianImageFunctionTest( int argc, char* argv[] ) HessianGaussianImageFunctionType::Pointer function = HessianGaussianImageFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( function, + ITK_EXERCISE_BASIC_OBJECT_METHODS( function, DiscreteHessianGaussianImageFunction, ImageFunction ); diff --git a/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx index abd4fe5dcbc..852d1f0e420 100644 --- a/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx @@ -102,25 +102,25 @@ int itkGridForwardWarpImageFilterTest( int argc, char* argv[] ) // Create the filter instance FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GridForwardWarpImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GridForwardWarpImageFilter, ImageToImageFilter ); FilterType::PixelType backgroundValue = itk::NumericTraits< FilterType::PixelType >::ZeroValue(); filter->SetBackgroundValue( backgroundValue ); - TEST_SET_GET_VALUE( backgroundValue, filter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( backgroundValue, filter->GetBackgroundValue() ); FilterType::PixelType foregroundValue = itk::NumericTraits< FilterType::PixelType >::OneValue(); filter->SetForegroundValue( foregroundValue ); - TEST_SET_GET_VALUE( foregroundValue, filter->GetForegroundValue()); + ITK_TEST_SET_GET_VALUE( foregroundValue, filter->GetForegroundValue()); // Set the input image filter->SetInput( inputDisplacementField ); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Write the result image @@ -130,7 +130,7 @@ int itkGridForwardWarpImageFilterTest( int argc, char* argv[] ) writer->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx index bd387e7f59e..99034686c6e 100644 --- a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx +++ b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx @@ -56,7 +56,7 @@ int itkRobustAutomaticThresholdCalculatorTest( int argc, char *argv[] ) itk::RobustAutomaticThresholdCalculator< ImageType, RealImageType >; CalculatorType::Pointer calculator = CalculatorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( calculator, + ITK_EXERCISE_BASIC_OBJECT_METHODS( calculator, RobustAutomaticThresholdCalculator, Object ); @@ -64,18 +64,18 @@ int itkRobustAutomaticThresholdCalculatorTest( int argc, char *argv[] ) double pow = std::stod( argv[2] ); calculator->SetPow( pow ); - TEST_SET_GET_VALUE( pow, calculator->GetPow() ); + ITK_TEST_SET_GET_VALUE( pow, calculator->GetPow() ); // Test input or gradient unset exceptions - TRY_EXPECT_EXCEPTION( calculator->Compute() ); + ITK_TRY_EXPECT_EXCEPTION( calculator->Compute() ); - TRY_EXPECT_EXCEPTION( calculator->GetOutput() ); + ITK_TRY_EXPECT_EXCEPTION( calculator->GetOutput() ); calculator->SetInput( reader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( calculator->Compute() ); + ITK_TRY_EXPECT_NO_EXCEPTION( calculator->Compute() ); // Regression test diff --git a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx index 8ce96f185f1..0982dd35150 100644 --- a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx @@ -60,7 +60,7 @@ int itkRobustAutomaticThresholdImageFilterTest( int argc, char *argv[] ) itk::RobustAutomaticThresholdImageFilter< ImageType, RealImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, RobustAutomaticThresholdImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watcher( filter, "RobustAutomaticThresholdImageFilter" ); @@ -70,20 +70,20 @@ int itkRobustAutomaticThresholdImageFilterTest( int argc, char *argv[] ) double pow = std::stod( argv[3] ); filter->SetPow( pow ); - TEST_SET_GET_VALUE( pow, filter->GetPow() ); + ITK_TEST_SET_GET_VALUE( pow, filter->GetPow() ); auto insideValue = static_cast< FilterType::InputPixelType >( std::stod( argv[4] ) ); filter->SetInsideValue( insideValue ); - TEST_SET_GET_VALUE( insideValue, filter->GetInsideValue() ); + ITK_TEST_SET_GET_VALUE( insideValue, filter->GetInsideValue() ); auto outsideValue = static_cast< FilterType::InputPixelType >( std::stod( argv[5] ) ); filter->SetOutsideValue( outsideValue ); - TEST_SET_GET_VALUE( outsideValue, filter->GetOutsideValue() ); + ITK_TEST_SET_GET_VALUE( outsideValue, filter->GetOutsideValue() ); filter->SetInput( reader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Regression test @@ -110,7 +110,7 @@ int itkRobustAutomaticThresholdImageFilterTest( int argc, char *argv[] ) writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx b/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx index 59ffca2bce5..48cffdbfa67 100644 --- a/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx +++ b/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx @@ -88,23 +88,23 @@ int itkWarpHarmonicEnergyCalculatorTest( int argc, char* argv[] ) // Create the calculator CalculatorType::Pointer calculator = CalculatorType::New(); - EXERCISE_BASIC_OBJECT_METHODS( calculator, WarpHarmonicEnergyCalculator, + ITK_EXERCISE_BASIC_OBJECT_METHODS( calculator, WarpHarmonicEnergyCalculator, Object ); auto useImageSpacing = static_cast< bool >( std::stoi( argv[1] ) ); - TEST_SET_GET_BOOLEAN( calculator, UseImageSpacing, useImageSpacing ); + ITK_TEST_SET_GET_BOOLEAN( calculator, UseImageSpacing, useImageSpacing ); CalculatorType::WeightsType derivativeWeights; derivativeWeights.Fill( std::stod( argv[2] ) ); calculator->SetDerivativeWeights(derivativeWeights ); - TEST_SET_GET_VALUE( derivativeWeights, calculator->GetDerivativeWeights() ); + ITK_TEST_SET_GET_VALUE( derivativeWeights, calculator->GetDerivativeWeights() ); // Set the input image calculator->SetImage( inputDisplacementField ); // Execute the calculator - TRY_EXPECT_NO_EXCEPTION( calculator->Compute() ); + ITK_TRY_EXPECT_NO_EXCEPTION( calculator->Compute() ); // Regression test: check the computed harmonic energy double expectedEnergy = std::stod( argv[3] ); diff --git a/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx b/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx index 6ca2430afc3..f531a095496 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx @@ -117,7 +117,7 @@ int itkFEMLoadPointTestUser(int, char *[]) itk::fem::LoadPoint::Pointer lm0 = itk::fem::LoadPoint::New(); - EXERCISE_BASIC_OBJECT_METHODS( lm0, LoadPoint, LoadElement ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( lm0, LoadPoint, LoadElement ); lm0->SetGlobalNumber(1); vnl_vector pt1(2); @@ -125,12 +125,12 @@ int itkFEMLoadPointTestUser(int, char *[]) pt1[1] = 0.5; // it is assumed that source is same as the point. lm0->SetPoint( pt1 ); - TEST_SET_GET_VALUE( pt1, lm0->GetPoint() ); + ITK_TEST_SET_GET_VALUE( pt1, lm0->GetPoint() ); pt1[0] = 0.0; pt1[1] = 1.0; lm0->SetForce( pt1 ); - TEST_SET_GET_VALUE( pt1, lm0->GetForce() ); + ITK_TEST_SET_GET_VALUE( pt1, lm0->GetForce() ); femObject->AddNextLoad(lm0); diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx index d71a7b6fe59..ce6437ba474 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx @@ -163,7 +163,7 @@ int itkGradientDescentOptimizerBasev4Test(int , char* []) optimizer->SetNumberOfWorkUnits( 2 ); - TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); std::cout << "Printing self.." << std::endl; std::cout << optimizer << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx index 27586562293..64bb2fb87b3 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx @@ -284,7 +284,7 @@ int itkLBFGS2Optimizerv4Test(int, char* [] ) // Test with local-support transform. Should FAIL. // Such transforms are not yet supported. metric->SetHasLocalSupport( true ); - TRY_EXPECT_EXCEPTION( itkOptimizer->StartOptimization() ); + ITK_TRY_EXPECT_EXCEPTION( itkOptimizer->StartOptimization() ); std::cout << "Test passed." << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx index 2fd74fd5f5a..cb8b53a4a98 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx @@ -398,7 +398,7 @@ int itkLBFGSBOptimizerv4Test(int, char *[]) // std::cout << "-------------------------------" << std::endl; metric->SetHasLocalSupport( true ); - TRY_EXPECT_EXCEPTION( itkOptimizer->StartOptimization() ); + ITK_TRY_EXPECT_EXCEPTION( itkOptimizer->StartOptimization() ); // // Test in unbounded mode diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx index 5683646fbe6..3ecdf1aa1ea 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx @@ -341,7 +341,7 @@ int itkLBFGSOptimizerv4Test(int, char* [] ) // Test with local-support transform. Should FAIL. // Such transforms are not yet supported. metric->SetHasLocalSupport( true ); - TRY_EXPECT_EXCEPTION( itkOptimizer->StartOptimization() ); + ITK_TRY_EXPECT_EXCEPTION( itkOptimizer->StartOptimization() ); std::cout << "Test passed." << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx index 50171104996..a5fa2732574 100644 --- a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx @@ -108,9 +108,9 @@ int itkObjectToObjectMetricBaseTest(int ,char * []) ParametersType parameters(13); parameters.Fill( 19.5); - TEST_EXPECT_EQUAL( objectMetric->GetValue( ), 1.0 ); + ITK_TEST_EXPECT_EQUAL( objectMetric->GetValue( ), 1.0 ); - TEST_EXPECT_EQUAL( objectMetric->GetCurrentValue( ), 1.0 ); + ITK_TEST_EXPECT_EQUAL( objectMetric->GetCurrentValue( ), 1.0 ); return EXIT_SUCCESS; } diff --git a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx index 452b1471919..220846d5b90 100644 --- a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx @@ -161,19 +161,19 @@ int itkObjectToObjectOptimizerBaseTest(int , char* []) optimizer->SetNumberOfWorkUnits( 1 ); /* Test StartOptimization */ - TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); /* Test with incorrectly-sized scales. Expect exception */ scales.SetSize(scalesSize+1); optimizer->SetScales( scales ); - TRY_EXPECT_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_EXCEPTION( optimizer->StartOptimization() ); /* Test with scales close to identity, within tolerance. * The flag indicating identity scales should be set. */ scales.SetSize(scalesSize); scales.Fill( 0.999 ); optimizer->SetScales( scales ); - TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); if( ! optimizer->GetScalesAreIdentity() ) { std::cerr << "Expected GetScalesAreIdentity to return true." << std::endl; @@ -182,7 +182,7 @@ int itkObjectToObjectOptimizerBaseTest(int , char* []) /* Test that weights are init'ed by default to identity */ ObjectToObjectOptimizerBaseTestOptimizer::NumberOfParametersType weightsSize = metric->GetNumberOfLocalParameters(); - TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); ScalesType weightsReturn = optimizer->GetWeights(); if( weightsReturn.Size() != 0 || ! optimizer->GetWeightsAreIdentity() ) { @@ -205,14 +205,14 @@ int itkObjectToObjectOptimizerBaseTest(int , char* []) /* Test with incorrectly-sized weights. Expect exception */ weights.SetSize(weightsSize+1); optimizer->SetWeights( weights ); - TRY_EXPECT_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_EXCEPTION( optimizer->StartOptimization() ); /* Test with weights close to identity, within tolerance. * The flag indicating identity weights should be set. */ weights.SetSize(weightsSize); weights.Fill( 0.99999 ); optimizer->SetWeights( weights ); - TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); + ITK_TRY_EXPECT_NO_EXCEPTION( optimizer->StartOptimization() ); if( ! optimizer->GetWeightsAreIdentity() ) { std::cerr << "Expected GetWeightsAreIdentity to return true." << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx index a09202f331e..01fdaa7335c 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx @@ -357,7 +357,7 @@ int itkRegistrationParameterScalesFromPhysicalShiftPointSetTest(int , char* []) std::cout << "Test without setting virtual domain point set." << std::endl; RegistrationParameterScalesFromPhysicalShiftType::Pointer shiftScaleEstimator2 = RegistrationParameterScalesFromPhysicalShiftType::New(); shiftScaleEstimator2->SetMetric(metric); - TRY_EXPECT_EXCEPTION( shiftScaleEstimator2->EstimateStepScale(displacementStep) ); + ITK_TRY_EXPECT_EXCEPTION( shiftScaleEstimator2->EstimateStepScale(displacementStep) ); // // Check the correctness of all cases above diff --git a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx index 091c43416f7..94efdcb4e61 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx @@ -185,25 +185,25 @@ int RegularStepGradientDescentOptimizerv4TestHelper( optimizer->SetDoEstimateLearningRateAtEachIteration( doEstimateLearningRateAtEachIteration ); optimizer->SetDoEstimateLearningRateOnce( doEstimateLearningRateOnce ); - TEST_SET_GET_VALUE( doEstimateLearningRateAtEachIteration, optimizer->GetDoEstimateLearningRateAtEachIteration() ); - TEST_SET_GET_VALUE( doEstimateLearningRateOnce, optimizer->GetDoEstimateLearningRateOnce() ); + ITK_TEST_SET_GET_VALUE( doEstimateLearningRateAtEachIteration, optimizer->GetDoEstimateLearningRateAtEachIteration() ); + ITK_TEST_SET_GET_VALUE( doEstimateLearningRateOnce, optimizer->GetDoEstimateLearningRateOnce() ); optimizer->SetRelaxationFactor( relaxationFactor ); - TEST_SET_GET_VALUE( relaxationFactor, optimizer->GetRelaxationFactor() ); + ITK_TEST_SET_GET_VALUE( relaxationFactor, optimizer->GetRelaxationFactor() ); optimizer->SetMinimumStepLength( minimumStepLength ); - TEST_SET_GET_VALUE( minimumStepLength, optimizer->GetMinimumStepLength() ); + ITK_TEST_SET_GET_VALUE( minimumStepLength, optimizer->GetMinimumStepLength() ); optimizer->SetGradientMagnitudeTolerance( gradientMagnitudeTolerance ); - TEST_SET_GET_VALUE( gradientMagnitudeTolerance, + ITK_TEST_SET_GET_VALUE( gradientMagnitudeTolerance, optimizer->GetGradientMagnitudeTolerance() ); optimizer->SetCurrentLearningRateRelaxation( currentLearningRateRelaxation ); - TEST_SET_GET_VALUE( currentLearningRateRelaxation, + ITK_TEST_SET_GET_VALUE( currentLearningRateRelaxation, optimizer->GetCurrentLearningRateRelaxation() ); try @@ -266,7 +266,7 @@ int itkRegularStepGradientDescentOptimizerv4Test( int, char* [] ) OptimizerType::Pointer itkOptimizer = OptimizerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( itkOptimizer, RegularStepGradientDescentOptimizerv4, + ITK_EXERCISE_BASIC_OBJECT_METHODS( itkOptimizer, RegularStepGradientDescentOptimizerv4, GradientDescentOptimizerv4Template ); bool testStatus = EXIT_SUCCESS; diff --git a/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx index 649899ece6d..3b6d09d4928 100644 --- a/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx @@ -533,23 +533,23 @@ int itkChiSquareDistributionTest(int, char* [] ) distributionFunction->SetParameters( wrongParameters ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetMean() ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetVariance() ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetDegreesOfFreedom() ); - TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetMean() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetVariance() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetDegreesOfFreedom() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x, wrongParameters ) ); distributionFunction->SetParameters( wrongParameters ); unsigned long newdof = 17; distributionFunction->SetDegreesOfFreedom( newdof ); - TEST_SET_GET_VALUE( newdof, distributionFunction->GetDegreesOfFreedom() ); + ITK_TEST_SET_GET_VALUE( newdof, distributionFunction->GetDegreesOfFreedom() ); // Exercise a negative parameter distributionFunction->CDF( -1.0, dof ); @@ -562,7 +562,7 @@ int itkChiSquareDistributionTest(int, char* [] ) DistributionType::ParametersType parameters1( 1 ); parameters1[0] = 1.18; distributionFunction->SetParameters( parameters1 ); - TEST_SET_GET_VALUE( parameters1[0], distributionFunction->GetMean() ); + ITK_TEST_SET_GET_VALUE( parameters1[0], distributionFunction->GetMean() ); return status; } diff --git a/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx index 0a96ad81275..2626d7ed000 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx @@ -359,27 +359,27 @@ int itkGaussianDistributionTest(int, char* [] ) wrongParameters.Fill(1.0); distributionFunction->SetParameters( wrongParameters ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetVariance() ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetMean() ); - TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetVariance() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetMean() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); distributionFunction->SetParameters( wrongParameters ); double newMean = 17.0; distributionFunction->SetMean( newMean ); - TEST_SET_GET_VALUE( newMean, distributionFunction->GetMean() ); + ITK_TEST_SET_GET_VALUE( newMean, distributionFunction->GetMean() ); distributionFunction->SetParameters( wrongParameters ); double newVariance = 42.0; distributionFunction->SetVariance( newVariance ); - TEST_SET_GET_VALUE( newVariance, distributionFunction->GetVariance() ); + ITK_TEST_SET_GET_VALUE( newVariance, distributionFunction->GetVariance() ); constexpr double mean2 = 0.0; constexpr double variance2 = 1.0; diff --git a/Modules/Numerics/Statistics/test/itkHistogramTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramTest.cxx index 5ce1abb9a63..c9f2437362f 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramTest.cxx @@ -35,7 +35,7 @@ int itkHistogramTest( int, char* [] ) itk::Statistics::DenseFrequencyContainer2 >; HistogramType::Pointer histogram = HistogramType::New(); - EXERCISE_BASIC_OBJECT_METHODS( histogram, Histogram, Sample ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( histogram, Histogram, Sample ); using MeasurementVectorType = HistogramType::MeasurementVectorType; using InstanceIdentifier = HistogramType::InstanceIdentifier; diff --git a/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx b/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx index bb2c83506c4..68270ea7428 100644 --- a/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx @@ -69,7 +69,7 @@ int itkMixtureModelComponentBaseTest( int , char* [] ) std::cout << "component->GetWeights(): " << component->GetWeights() << std::endl; component->RunTests(); - TRY_EXPECT_EXCEPTION( component->GetWeight(5) ); + ITK_TRY_EXPECT_EXCEPTION( component->GetWeight(5) ); std::cerr << "[PASSED]" << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest.cxx b/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest.cxx index ff092d981a9..1fe13fab0c3 100644 --- a/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest.cxx +++ b/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest.cxx @@ -44,7 +44,7 @@ int itkStatisticsAlgorithmTest( int, char * [] ) // Testing the exception throwing for samples of measurement size = 0 sample->SetMeasurementVectorSize( 0 ); - TRY_EXPECT_EXCEPTION( + ITK_TRY_EXPECT_EXCEPTION( itk::Statistics::Algorithm::FindSampleBound( constSample, constSample->Begin(), constSample->End(), @@ -57,7 +57,7 @@ int itkStatisticsAlgorithmTest( int, char * [] ) // Testing the equivalent of an empty sample by passing // the Begin() iterator inlieu of the End() iterator. - TRY_EXPECT_EXCEPTION( + ITK_TRY_EXPECT_EXCEPTION( itk::Statistics::Algorithm::FindSampleBound( constSample, constSample->Begin(), constSample->Begin(), @@ -99,7 +99,7 @@ int itkStatisticsAlgorithmTest( int, char * [] ) } // Now testing the real algorithm - TRY_EXPECT_NO_EXCEPTION( + ITK_TRY_EXPECT_NO_EXCEPTION( itk::Statistics::Algorithm::FindSampleBound( constSample, constSample->Begin(), constSample->End(), diff --git a/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx index f8ebcc49cfc..539621180fa 100644 --- a/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx @@ -449,50 +449,50 @@ int itkTDistributionTest(int, char* [] ) distributionFunction->SetParameters( wrongParameters ); std::cout << "new set number of parameters = " << distributionFunction->GetParameters().Size() << std::endl; - TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasMean() ); - TRY_EXPECT_EXCEPTION( distributionFunction->HasVariance() ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetVariance() ); - TRY_EXPECT_EXCEPTION( distributionFunction->GetDegreesOfFreedom() ); - TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); - TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasMean() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->HasVariance() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetVariance() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->GetDegreesOfFreedom() ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->PDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluatePDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->EvaluateInverseCDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->CDF( x, wrongParameters ) ); + ITK_TRY_EXPECT_EXCEPTION( distributionFunction->InverseCDF( x, wrongParameters ) ); DistributionType::ParametersType parameters1( 1 ); parameters1[0] = 3.0; distributionFunction->SetParameters( parameters1 ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasMean() ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasVariance() ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetMean() ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetVariance() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasMean() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasVariance() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetMean() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetVariance() ); parameters1[0] = 1.5; distributionFunction->SetParameters( parameters1 ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasMean() ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasVariance() ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetMean() ); - TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetVariance() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasMean() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->HasVariance() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetMean() ); + ITK_TRY_EXPECT_NO_EXCEPTION( distributionFunction->GetVariance() ); std::cout << "Exercise negative argument " << std::endl; std::cout << "InverseCDF(x,p) = " << distributionFunction->InverseCDF( -1.0, dof ) << std::endl; unsigned long newdof = 17; distributionFunction->SetDegreesOfFreedom( newdof ); - TEST_SET_GET_VALUE( newdof, distributionFunction->GetDegreesOfFreedom() ); + ITK_TEST_SET_GET_VALUE( newdof, distributionFunction->GetDegreesOfFreedom() ); DistributionType::ParametersType parameters2( 2 ); diff --git a/Modules/Registration/Common/test/itkEuclideanDistancePointMetricTest.cxx b/Modules/Registration/Common/test/itkEuclideanDistancePointMetricTest.cxx index 21b4d0ca20d..96a6f294d63 100644 --- a/Modules/Registration/Common/test/itkEuclideanDistancePointMetricTest.cxx +++ b/Modules/Registration/Common/test/itkEuclideanDistancePointMetricTest.cxx @@ -53,17 +53,17 @@ CompareMeshSources( bool computeSquaredDistance ) typename MetricType::Pointer metric = MetricType::New(); metric->SetComputeSquaredDistance( computeSquaredDistance ); - TEST_SET_GET_VALUE( computeSquaredDistance, metric->GetComputeSquaredDistance() ); + ITK_TEST_SET_GET_VALUE( computeSquaredDistance, metric->GetComputeSquaredDistance() ); if( computeSquaredDistance ) { metric->ComputeSquaredDistanceOn(); - TEST_EXPECT_TRUE( metric->GetComputeSquaredDistance() ); + ITK_TEST_EXPECT_TRUE( metric->GetComputeSquaredDistance() ); } else { metric->ComputeSquaredDistanceOff(); - TEST_EXPECT_TRUE( !metric->GetComputeSquaredDistance() ); + ITK_TEST_EXPECT_TRUE( !metric->GetComputeSquaredDistance() ); } metric->SetFixedPointSet( fixed->GetOutput() ); @@ -106,7 +106,7 @@ int itkEuclideanDistancePointMetricTest( int argc, char* argv [] ) MetricType::Pointer metric = MetricType::New(); - EXERCISE_BASIC_OBJECT_METHODS( metric, EuclideanDistancePointMetric, + ITK_EXERCISE_BASIC_OBJECT_METHODS( metric, EuclideanDistancePointMetric, PointSetToPointSetMetric ); bool computeSquaredDistance = static_cast< bool >( std::stoi( argv[1] ) ); diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx index d7c69d98643..94dd2b8a61f 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx @@ -82,12 +82,12 @@ int itkImageRegistrationMethodTest_11(int, char* [] ) // // Now verify that all the sets are consistent with the Gets // - TEST_SET_GET_VALUE( metric, registration->GetMetric() ); - TEST_SET_GET_VALUE( optimizer, registration->GetOptimizer() ); - TEST_SET_GET_VALUE( transform, registration->GetTransform() ); - TEST_SET_GET_VALUE( fixedImage, registration->GetFixedImage() ); - TEST_SET_GET_VALUE( movingImage, registration->GetMovingImage() ); - TEST_SET_GET_VALUE( interpolator, registration->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( metric, registration->GetMetric() ); + ITK_TEST_SET_GET_VALUE( optimizer, registration->GetOptimizer() ); + ITK_TEST_SET_GET_VALUE( transform, registration->GetTransform() ); + ITK_TEST_SET_GET_VALUE( fixedImage, registration->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, registration->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( interpolator, registration->GetInterpolator() ); // // Now verify that they can be changed @@ -111,12 +111,12 @@ int itkImageRegistrationMethodTest_11(int, char* [] ) // // Now verify that all the sets are consistent with the Gets // - TEST_SET_GET_VALUE( metric2, registration->GetMetric() ); - TEST_SET_GET_VALUE( optimizer2, registration->GetOptimizer() ); - TEST_SET_GET_VALUE( transform2, registration->GetTransform() ); - TEST_SET_GET_VALUE( fixedImage2, registration->GetFixedImage() ); - TEST_SET_GET_VALUE( movingImage2, registration->GetMovingImage() ); - TEST_SET_GET_VALUE( interpolator2, registration->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( metric2, registration->GetMetric() ); + ITK_TEST_SET_GET_VALUE( optimizer2, registration->GetOptimizer() ); + ITK_TEST_SET_GET_VALUE( transform2, registration->GetTransform() ); + ITK_TEST_SET_GET_VALUE( fixedImage2, registration->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( movingImage2, registration->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( interpolator2, registration->GetInterpolator() ); // @@ -141,12 +141,12 @@ int itkImageRegistrationMethodTest_11(int, char* [] ) // // Now verify that all the sets are consistent with the Gets // - TEST_SET_GET_VALUE( metric3, registration->GetMetric() ); - TEST_SET_GET_VALUE( optimizer3, registration->GetOptimizer() ); - TEST_SET_GET_VALUE( transform3, registration->GetTransform() ); - TEST_SET_GET_VALUE( fixedImage3, registration->GetFixedImage() ); - TEST_SET_GET_VALUE( movingImage3, registration->GetMovingImage() ); - TEST_SET_GET_VALUE( interpolator3, registration->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( metric3, registration->GetMetric() ); + ITK_TEST_SET_GET_VALUE( optimizer3, registration->GetOptimizer() ); + ITK_TEST_SET_GET_VALUE( transform3, registration->GetTransform() ); + ITK_TEST_SET_GET_VALUE( fixedImage3, registration->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( movingImage3, registration->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( interpolator3, registration->GetInterpolator() ); std::cout << "Test passed." << std::endl; diff --git a/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx b/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx index bbc6a94f87e..4c8831ff658 100644 --- a/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx @@ -274,7 +274,7 @@ int itkImageToSpatialObjectRegistrationTest(int, char* [] ) = itk::ImageToSpatialObjectRegistrationMethod; RegistrationType::Pointer registration = RegistrationType::New(); - EXERCISE_BASIC_OBJECT_METHODS( registration, + ITK_EXERCISE_BASIC_OBJECT_METHODS( registration, ImageToSpatialObjectRegistrationMethod, ProcessObject ); @@ -294,7 +294,7 @@ int itkImageToSpatialObjectRegistrationTest(int, char* [] ) metric->SetTransform(transform); std::cout << "Number of Parameters : "<< metric->GetNumberOfParameters() << std::endl; - TEST_EXPECT_EQUAL( metric->GetNumberOfParameters(), 3 ); + ITK_TEST_EXPECT_EQUAL( metric->GetNumberOfParameters(), 3 ); bool catching; try diff --git a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx index fcfb98aa7a0..2db85f1c571 100644 --- a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx @@ -101,19 +101,19 @@ int itkKappaStatisticImageToImageMetricTest(int, char* [] ) MetricType::Pointer metric = MetricType::New(); - EXERCISE_BASIC_OBJECT_METHODS( metric, KappaStatisticImageToImageMetric, + ITK_EXERCISE_BASIC_OBJECT_METHODS( metric, KappaStatisticImageToImageMetric, ImageToImageMetric ); MetricType::RealType foregroundValue = 255; metric->SetForegroundValue( foregroundValue ); - TEST_SET_GET_VALUE( foregroundValue, metric->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( foregroundValue, metric->GetForegroundValue() ); bool useComplement = false; metric->SetComplement( useComplement ); - TEST_SET_GET_VALUE( useComplement, metric->GetComplement() ); + ITK_TEST_SET_GET_VALUE( useComplement, metric->GetComplement() ); metric->ComplementOff(); - TEST_SET_GET_VALUE( false, metric->GetComplement() ); + ITK_TEST_SET_GET_VALUE( false, metric->GetComplement() ); transform->SetIdentity(); metric->SetTransform( transform ); @@ -122,23 +122,23 @@ int itkKappaStatisticImageToImageMetricTest(int, char* [] ) // Test error conditions // - TRY_EXPECT_EXCEPTION( metric->GetValue( parameters ) ); + ITK_TRY_EXPECT_EXCEPTION( metric->GetValue( parameters ) ); metric->SetFixedImage( fixedImage ); - TRY_EXPECT_EXCEPTION( metric->GetValue( parameters ) ); + ITK_TRY_EXPECT_EXCEPTION( metric->GetValue( parameters ) ); metric->SetMovingImage( movingImage ); metric->SetInterpolator( interpolator ); metric->SetFixedImageRegion( fixedImage->GetBufferedRegion() ); MetricType::DerivativeType derivative; - TRY_EXPECT_EXCEPTION( metric->GetDerivative( parameters, derivative ) ); + ITK_TRY_EXPECT_EXCEPTION( metric->GetDerivative( parameters, derivative ) ); - TRY_EXPECT_NO_EXCEPTION( metric->Initialize() ); + ITK_TRY_EXPECT_NO_EXCEPTION( metric->Initialize() ); metric->SetFixedImage( nullptr ); - TRY_EXPECT_EXCEPTION( metric->GetDerivative( parameters, derivative ) ); + ITK_TRY_EXPECT_EXCEPTION( metric->GetDerivative( parameters, derivative ) ); metric->SetFixedImage( fixedImage ); @@ -281,10 +281,10 @@ int itkKappaStatisticImageToImageMetricTest(int, char* [] ) // useComplement = true; metric->SetComplement( useComplement ); - TEST_SET_GET_VALUE( useComplement, metric->GetComplement() ); + ITK_TEST_SET_GET_VALUE( useComplement, metric->GetComplement() ); metric->ComplementOn(); - TEST_SET_GET_VALUE( true, metric->GetComplement() ); + ITK_TEST_SET_GET_VALUE( true, metric->GetComplement() ); // The value 0.379247 was computed by hand expectedMatchMeasure = 0.379247; diff --git a/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx b/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx index 4befd7c882e..d98be5bb748 100644 --- a/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx +++ b/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx @@ -203,9 +203,9 @@ bool test1() Init3DPoints(fixedLandmarks, movingLandmarks); // No landmarks are set, it should throw - TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); + ITK_TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); initializer->SetMovingLandmarks(movingLandmarks); - TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); // Fixed landmarks missing + ITK_TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); // Fixed landmarks missing initializer->SetFixedLandmarks(fixedLandmarks); return ExecuteAndExamine(initializer, fixedLandmarks, movingLandmarks); @@ -239,7 +239,7 @@ int itkLandmarkBasedTransformInitializerTest( int, char * [] ) FixedImageType, MovingImageType >; TransformInitializerType::Pointer initializer = TransformInitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); initializer->DebugOn(); @@ -303,9 +303,9 @@ int itkLandmarkBasedTransformInitializerTest( int, char * [] ) movingLandmarks.push_back(point); // No landmarks are set, it should throw - TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); + ITK_TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); initializer->SetFixedLandmarks(fixedLandmarks); - TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); // Moving landmarks missing + ITK_TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); // Moving landmarks missing initializer->SetMovingLandmarks(movingLandmarks); success &= ExecuteAndExamine(initializer, fixedLandmarks, movingLandmarks); @@ -323,12 +323,12 @@ int itkLandmarkBasedTransformInitializerTest( int, char * [] ) ImageType, ImageType >; TransformInitializerType::Pointer initializer = TransformInitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); initializer->SetTransform(transform); // Test that an exception is thrown if there aren't enough points - TRY_EXPECT_EXCEPTION( initializer->InitializeTransform() ); + ITK_TRY_EXPECT_EXCEPTION( initializer->InitializeTransform() ); const unsigned int numLandmarks(8); double fixedLandMarkInit[numLandmarks][3] = @@ -442,7 +442,7 @@ int itkLandmarkBasedTransformInitializerTest( int, char * [] ) itk::LandmarkBasedTransformInitializer< TransformType, FixedImageType, MovingImageType >; TransformInitializerType::Pointer initializer = TransformInitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); TransformInitializerType::LandmarkPointContainer fixedLandmarks; TransformInitializerType::LandmarkPointContainer movingLandmarks; @@ -464,7 +464,7 @@ int itkLandmarkBasedTransformInitializerTest( int, char * [] ) initializer->SetBSplineNumberOfControlPoints(8); // Test that an exception is thrown if the reference image isn't set - TRY_EXPECT_EXCEPTION( initializer->InitializeTransform() ); + ITK_TRY_EXPECT_EXCEPTION( initializer->InitializeTransform() ); // Now set the reference image and initialization should work initializer->SetReferenceImage(fixedImage); @@ -479,7 +479,7 @@ int itkLandmarkBasedTransformInitializerTest( int, char * [] ) TransformInitializerType::Pointer initializer = TransformInitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( initializer, LandmarkBasedTransformInitializer, Object ); } if (!success) diff --git a/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx index 93ff8b7bc06..b11a1a49f80 100644 --- a/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx @@ -137,7 +137,7 @@ int itkPointSetToImageRegistrationTest( int, char* [] ) RegistrationType::Pointer registration = RegistrationType::New(); - EXERCISE_BASIC_OBJECT_METHODS( registration, PointSetToImageRegistrationMethod, + ITK_EXERCISE_BASIC_OBJECT_METHODS( registration, PointSetToImageRegistrationMethod, ProcessObject ); using CommandIterationType = itk::CommandIterationUpdate< OptimizerType >; @@ -164,22 +164,22 @@ int itkPointSetToImageRegistrationTest( int, char* [] ) // Connect all the components required for the registration registration->SetMetric( metric ); - TEST_SET_GET_VALUE( metric, registration->GetMetric() ); + ITK_TEST_SET_GET_VALUE( metric, registration->GetMetric() ); registration->SetOptimizer( optimizer ); - TEST_SET_GET_VALUE( optimizer, registration->GetOptimizer() ); + ITK_TEST_SET_GET_VALUE( optimizer, registration->GetOptimizer() ); registration->SetTransform( transform ); - TEST_SET_GET_VALUE( transform, registration->GetTransform() ); + ITK_TEST_SET_GET_VALUE( transform, registration->GetTransform() ); registration->SetFixedPointSet( fixedPointSet ); - TEST_SET_GET_VALUE( fixedPointSet, registration->GetFixedPointSet() ); + ITK_TEST_SET_GET_VALUE( fixedPointSet, registration->GetFixedPointSet() ); registration->SetMovingImage( movingImage ); - TEST_SET_GET_VALUE( movingImage, registration->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, registration->GetMovingImage() ); registration->SetInterpolator( interpolator ); - TEST_SET_GET_VALUE( interpolator, registration->GetInterpolator() ); + ITK_TEST_SET_GET_VALUE( interpolator, registration->GetInterpolator() ); // Set up transform parameters ParametersType parameters( transform->GetNumberOfParameters() ); @@ -191,11 +191,11 @@ int itkPointSetToImageRegistrationTest( int, char* [] ) } transform->SetParameters( parameters ); registration->SetInitialTransformParameters( transform->GetParameters() ); - TEST_SET_GET_VALUE( transform->GetParameters(), + ITK_TEST_SET_GET_VALUE( transform->GetParameters(), registration->GetInitialTransformParameters() ); - TRY_EXPECT_NO_EXCEPTION( registration->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( registration->Update() ); // Print the last transform parameters to improve coverage diff --git a/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx index 53c5c64af4f..c62d5a819d0 100644 --- a/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx @@ -112,7 +112,7 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) MovingPointSetType >; RegistrationType::Pointer registration = RegistrationType::New(); - EXERCISE_BASIC_OBJECT_METHODS( registration, PointSetToPointSetRegistrationMethod, + ITK_EXERCISE_BASIC_OBJECT_METHODS( registration, PointSetToPointSetRegistrationMethod, ProcessObject ); // Scale the translation components of the Transform in the Optimizer @@ -132,19 +132,19 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) // Connect all the components required for the registration registration->SetMetric( metric ); - TEST_SET_GET_VALUE( metric, registration->GetMetric() ); + ITK_TEST_SET_GET_VALUE( metric, registration->GetMetric() ); registration->SetOptimizer( optimizer ); - TEST_SET_GET_VALUE( optimizer, registration->GetOptimizer() ); + ITK_TEST_SET_GET_VALUE( optimizer, registration->GetOptimizer() ); registration->SetTransform( transform ); - TEST_SET_GET_VALUE( transform, registration->GetTransform() ); + ITK_TEST_SET_GET_VALUE( transform, registration->GetTransform() ); registration->SetFixedPointSet( fixedPointSet ); - TEST_SET_GET_VALUE( fixedPointSet, registration->GetFixedPointSet() ); + ITK_TEST_SET_GET_VALUE( fixedPointSet, registration->GetFixedPointSet() ); registration->SetMovingPointSet( movingPointSet ); - TEST_SET_GET_VALUE( movingPointSet, registration->GetMovingPointSet() ); + ITK_TEST_SET_GET_VALUE( movingPointSet, registration->GetMovingPointSet() ); // Set up transform parameters ParametersType parameters( transform->GetNumberOfParameters() ); @@ -156,11 +156,11 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) } transform->SetParameters( parameters ); registration->SetInitialTransformParameters( transform->GetParameters() ); - TEST_SET_GET_VALUE( transform->GetParameters(), + ITK_TEST_SET_GET_VALUE( transform->GetParameters(), registration->GetInitialTransformParameters() ); - TRY_EXPECT_NO_EXCEPTION( registration->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( registration->Update() ); // Print the last transform parameters to improve coverage @@ -195,7 +195,7 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) using PSToImageFilterType = itk::PointSetToImageFilter< FixedPointSetType, BinaryImageType >; PSToImageFilterType::Pointer psToImageFilter = PSToImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( psToImageFilter, PointSetToImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( psToImageFilter, PointSetToImageFilter, ImageSource ); psToImageFilter->SetInput( fixedPointSet ); @@ -211,7 +211,7 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) << psToImageFilter->GetOrigin() << "]" << std::endl; - TRY_EXPECT_NO_EXCEPTION( psToImageFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( psToImageFilter->Update() ); BinaryImageType::Pointer binaryImage = psToImageFilter->GetOutput(); @@ -221,7 +221,7 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) ddFilter->SetInput( binaryImage ); - TRY_EXPECT_NO_EXCEPTION( ddFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( ddFilter->Update() ); metric->SetDistanceMap( ddFilter->GetOutput() ); metric->ComputeSquaredDistanceOn(); @@ -235,7 +235,7 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) transform->SetParameters(parameters); registration->SetInitialTransformParameters( transform->GetParameters() ); - TRY_EXPECT_NO_EXCEPTION( registration->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( registration->Update() ); std::cout << "Solution = " << transform->GetParameters() << std::endl; diff --git a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx index bfc456f5d34..1936ccce480 100644 --- a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx @@ -148,7 +148,7 @@ int RunTest( InputImageType* fixedImage, InputImageType* movingImage, ImageMetricLoadType::Pointer load = ImageMetricLoadType::New(); - EXERCISE_BASIC_OBJECT_METHODS( load, FiniteDifferenceFunctionLoad, + ITK_EXERCISE_BASIC_OBJECT_METHODS( load, FiniteDifferenceFunctionLoad, LoadElement ); itk::PDEDeformableRegistrationFunction< @@ -199,24 +199,24 @@ int RunTest( InputImageType* fixedImage, InputImageType* movingImage, } // SetMetric() must to be called after SetDisplacementField()!! - TRY_EXPECT_EXCEPTION( load->SetMetric( metric ) ); + ITK_TRY_EXPECT_EXCEPTION( load->SetMetric( metric ) ); - TRY_EXPECT_EXCEPTION( load->InitializeMetric() ); + ITK_TRY_EXPECT_EXCEPTION( load->InitializeMetric() ); load->SetMovingImage( movingImage ); - TEST_SET_GET_VALUE( movingImage, load->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, load->GetMovingImage() ); load->SetFixedImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, load->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, load->GetFixedImage() ); load->SetDisplacementField( initField ); - TEST_SET_GET_VALUE( initField, load->GetDisplacementField() ); + ITK_TEST_SET_GET_VALUE( initField, load->GetDisplacementField() ); - TRY_EXPECT_NO_EXCEPTION( load->SetMetric( metric ) ); + ITK_TRY_EXPECT_NO_EXCEPTION( load->SetMetric( metric ) ); - TRY_EXPECT_NO_EXCEPTION( load->InitializeMetric() ); + ITK_TRY_EXPECT_NO_EXCEPTION( load->InitializeMetric() ); ImageMetricLoadType::RadiusType radius; @@ -225,15 +225,15 @@ int RunTest( InputImageType* fixedImage, InputImageType* movingImage, radius[i] = 2; } load->SetMetricRadius( radius ); - TEST_SET_GET_VALUE( radius, load->GetMetricRadius() ); + ITK_TEST_SET_GET_VALUE( radius, load->GetMetricRadius() ); ImageMetricLoadType::Float gamma = 1.; load->SetGamma( gamma ); - //TEST_SET_GET_VALUE( gamma, load->GetGamma() ); + //ITK_TEST_SET_GET_VALUE( gamma, load->GetGamma() ); unsigned int numberOfIntegrationPoints = 1; load->SetNumberOfIntegrationPoints( numberOfIntegrationPoints ); - TEST_SET_GET_VALUE( numberOfIntegrationPoints, + ITK_TEST_SET_GET_VALUE( numberOfIntegrationPoints, load->GetNumberOfIntegrationPoints() ); load->PrintCurrentEnergy(); @@ -292,7 +292,7 @@ int RunTest( InputImageType* fixedImage, InputImageType* movingImage, itk::fem::LinearSystemWrapper::Pointer femSolution = solver->GetLinearSystemWrapper(); load->SetSolution( femSolution ); - TEST_SET_GET_VALUE( femSolution, load->GetSolution() ); + ITK_TEST_SET_GET_VALUE( femSolution, load->GetSolution() ); Element2DType::VectorType force; diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx index 491f285aa55..6e3938f0f39 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx @@ -155,21 +155,21 @@ int itkFEMRegistrationFilter2DTest( int argc, char *argv[] ) { RegistrationType::Pointer registrator = RegistrationType::New(); - EXERCISE_BASIC_OBJECT_METHODS( registrator, FEMRegistrationFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( registrator, FEMRegistrationFilter, ImageToImageFilter ); registrator->SetFixedImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, registrator->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, registrator->GetFixedImage() ); registrator->SetMovingImage( movingImage ); - TEST_SET_GET_VALUE( movingImage, registrator->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, registrator->GetMovingImage() ); unsigned int maxLevel = 1; registrator->SetMaxLevel( maxLevel ); - TEST_SET_GET_VALUE( maxLevel, registrator->GetMaxLevel() ); + ITK_TEST_SET_GET_VALUE( maxLevel, registrator->GetMaxLevel() ); bool useNormalizedGradient = true; - TEST_SET_GET_BOOLEAN( registrator, UseNormalizedGradient, useNormalizedGradient ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseNormalizedGradient, useNormalizedGradient ); registrator->ChooseMetric( met ); @@ -178,19 +178,19 @@ int itkFEMRegistrationFilter2DTest( int argc, char *argv[] ) RegistrationType::Float elasticity = 10; registrator->SetElasticity( elasticity, 0 ); - TEST_SET_GET_VALUE( elasticity, registrator->GetElasticity() ); + ITK_TEST_SET_GET_VALUE( elasticity, registrator->GetElasticity() ); RegistrationType::Float rho = 1; registrator->SetRho( rho, 0 ); - //TEST_SET_GET_VALUE( rho, registrator->GetRho() ); + //ITK_TEST_SET_GET_VALUE( rho, registrator->GetRho() ); RegistrationType::Float gamma = 1.; registrator->SetGamma( gamma, 0 ); - //TEST_SET_GET_VALUE( gamma, registrator->GetGamma() ); + //ITK_TEST_SET_GET_VALUE( gamma, registrator->GetGamma() ); RegistrationType::Float alpha = 1.; registrator->SetAlpha( alpha ); - TEST_SET_GET_VALUE( alpha, registrator->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alpha, registrator->GetAlpha() ); registrator->SetMeshPixelsPerElementAtEachResolution( 4, 0 ); @@ -204,14 +204,14 @@ int itkFEMRegistrationFilter2DTest( int argc, char *argv[] ) widthOfMetricRegion = 1; } registrator->SetWidthOfMetricRegion( widthOfMetricRegion, 0 ); - TEST_SET_GET_VALUE( widthOfMetricRegion, + ITK_TEST_SET_GET_VALUE( widthOfMetricRegion, registrator->GetWidthOfMetricRegion() ); registrator->SetNumberOfIntegrationPoints( 2, 0 ); RegistrationType::Float timeStep = 1.; registrator->SetTimeStep( timeStep ); - TEST_SET_GET_VALUE( timeStep, registrator->GetTimeStep() ); + ITK_TEST_SET_GET_VALUE( timeStep, registrator->GetTimeStep() ); unsigned int doLineSearchOnImageEnergy; unsigned int employRegridding; @@ -227,48 +227,48 @@ int itkFEMRegistrationFilter2DTest( int argc, char *argv[] ) } registrator->SetDoLineSearchOnImageEnergy( doLineSearchOnImageEnergy ); - TEST_SET_GET_VALUE( doLineSearchOnImageEnergy, + ITK_TEST_SET_GET_VALUE( doLineSearchOnImageEnergy, registrator->GetDoLineSearchOnImageEnergy() ); registrator->SetEmployRegridding( employRegridding ); - TEST_SET_GET_VALUE( employRegridding, registrator->GetEmployRegridding() ); + ITK_TEST_SET_GET_VALUE( employRegridding, registrator->GetEmployRegridding() ); bool useLandmarks = false; - TEST_SET_GET_BOOLEAN( registrator, UseLandmarks, useLandmarks ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseLandmarks, useLandmarks ); bool useMassMatrix = true; - TEST_SET_GET_BOOLEAN( registrator, UseMassMatrix, useMassMatrix ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseMassMatrix, useMassMatrix ); RegistrationType::Float energyReductionFactor = 0.0; registrator->SetEnergyReductionFactor( energyReductionFactor ); - TEST_SET_GET_VALUE( energyReductionFactor, + ITK_TEST_SET_GET_VALUE( energyReductionFactor, registrator->GetEnergyReductionFactor() ); unsigned int lineSearchMaximumIterations = 100; registrator->SetLineSearchMaximumIterations( lineSearchMaximumIterations ); - TEST_SET_GET_VALUE( lineSearchMaximumIterations, + ITK_TEST_SET_GET_VALUE( lineSearchMaximumIterations, registrator->GetLineSearchMaximumIterations() ); bool createMeshFromImage = true; - TEST_SET_GET_BOOLEAN( registrator, CreateMeshFromImage, createMeshFromImage ); + ITK_TEST_SET_GET_BOOLEAN( registrator, CreateMeshFromImage, createMeshFromImage ); double standardDeviation = 0.5; registrator->SetStandardDeviations( standardDeviation ); - //TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); + //ITK_TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); standardDeviation = 1.0; RegistrationType::StandardDeviationsType standardDeviations; standardDeviations.Fill( standardDeviation ); registrator->SetStandardDeviations( standardDeviations ); - //TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); + //ITK_TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); unsigned int maximumKernelWidth = 30; registrator->SetMaximumKernelWidth( maximumKernelWidth ); - TEST_SET_GET_VALUE( maximumKernelWidth, registrator->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maximumKernelWidth, registrator->GetMaximumKernelWidth() ); double maximumError = 0.1; registrator->SetMaximumError( maximumError ); - TEST_SET_GET_VALUE( maximumError, registrator->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maximumError, registrator->GetMaximumError() ); itk::fem::MaterialLinearElasticity::Pointer material = diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx index 8f1cb1c3c6d..8a3c6c0dd21 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx @@ -157,21 +157,21 @@ int itkFEMRegistrationFilterTest( int argc, char *argv[] ) { RegistrationType::Pointer registrator = RegistrationType::New(); - EXERCISE_BASIC_OBJECT_METHODS( registrator, FEMRegistrationFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( registrator, FEMRegistrationFilter, ImageToImageFilter ); registrator->SetFixedImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, registrator->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, registrator->GetFixedImage() ); registrator->SetMovingImage( movingImage ); - TEST_SET_GET_VALUE( movingImage, registrator->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, registrator->GetMovingImage() ); unsigned int maxLevel = 1; registrator->SetMaxLevel( maxLevel ); - TEST_SET_GET_VALUE( maxLevel, registrator->GetMaxLevel() ); + ITK_TEST_SET_GET_VALUE( maxLevel, registrator->GetMaxLevel() ); bool useNormalizedGradient = true; - TEST_SET_GET_BOOLEAN( registrator, UseNormalizedGradient, useNormalizedGradient ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseNormalizedGradient, useNormalizedGradient ); registrator->ChooseMetric( met ); @@ -180,19 +180,19 @@ int itkFEMRegistrationFilterTest( int argc, char *argv[] ) RegistrationType::Float elasticity = 10; registrator->SetElasticity( elasticity, 0 ); - TEST_SET_GET_VALUE( elasticity, registrator->GetElasticity() ); + ITK_TEST_SET_GET_VALUE( elasticity, registrator->GetElasticity() ); RegistrationType::Float rho = 1; registrator->SetRho( rho, 0 ); - //TEST_SET_GET_VALUE( rho, registrator->GetRho() ); + //ITK_TEST_SET_GET_VALUE( rho, registrator->GetRho() ); RegistrationType::Float gamma = 1.; registrator->SetGamma( gamma, 0 ); - //TEST_SET_GET_VALUE( gamma, registrator->GetGamma() ); + //ITK_TEST_SET_GET_VALUE( gamma, registrator->GetGamma() ); RegistrationType::Float alpha = 1.; registrator->SetAlpha( alpha ); - TEST_SET_GET_VALUE( alpha, registrator->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alpha, registrator->GetAlpha() ); registrator->SetMeshPixelsPerElementAtEachResolution( 4, 0 ); @@ -206,14 +206,14 @@ int itkFEMRegistrationFilterTest( int argc, char *argv[] ) widthOfMetricRegion = 1; } registrator->SetWidthOfMetricRegion( widthOfMetricRegion, 0 ); - TEST_SET_GET_VALUE( widthOfMetricRegion, + ITK_TEST_SET_GET_VALUE( widthOfMetricRegion, registrator->GetWidthOfMetricRegion() ); registrator->SetNumberOfIntegrationPoints(2, 0); RegistrationType::Float timeStep = 1.; registrator->SetTimeStep( timeStep ); - TEST_SET_GET_VALUE( timeStep, registrator->GetTimeStep() ); + ITK_TEST_SET_GET_VALUE( timeStep, registrator->GetTimeStep() ); unsigned int doLineSearchOnImageEnergy; unsigned int employRegridding; @@ -229,48 +229,48 @@ int itkFEMRegistrationFilterTest( int argc, char *argv[] ) } registrator->SetDoLineSearchOnImageEnergy( doLineSearchOnImageEnergy ); - TEST_SET_GET_VALUE( doLineSearchOnImageEnergy, + ITK_TEST_SET_GET_VALUE( doLineSearchOnImageEnergy, registrator->GetDoLineSearchOnImageEnergy() ); registrator->SetEmployRegridding( employRegridding ); - TEST_SET_GET_VALUE( employRegridding, registrator->GetEmployRegridding() ); + ITK_TEST_SET_GET_VALUE( employRegridding, registrator->GetEmployRegridding() ); bool useLandmarks = false; - TEST_SET_GET_BOOLEAN( registrator, UseLandmarks, useLandmarks ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseLandmarks, useLandmarks ); bool useMassMatrix = true; - TEST_SET_GET_BOOLEAN( registrator, UseMassMatrix, useMassMatrix ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseMassMatrix, useMassMatrix ); RegistrationType::Float energyReductionFactor = 0.0; registrator->SetEnergyReductionFactor( energyReductionFactor ); - TEST_SET_GET_VALUE( energyReductionFactor, + ITK_TEST_SET_GET_VALUE( energyReductionFactor, registrator->GetEnergyReductionFactor() ); unsigned int lineSearchMaximumIterations = 100; registrator->SetLineSearchMaximumIterations( lineSearchMaximumIterations ); - TEST_SET_GET_VALUE( lineSearchMaximumIterations, + ITK_TEST_SET_GET_VALUE( lineSearchMaximumIterations, registrator->GetLineSearchMaximumIterations() ); bool createMeshFromImage = true; - TEST_SET_GET_BOOLEAN( registrator, CreateMeshFromImage, createMeshFromImage ); + ITK_TEST_SET_GET_BOOLEAN( registrator, CreateMeshFromImage, createMeshFromImage ); double standardDeviation = 0.5; registrator->SetStandardDeviations( standardDeviation ); - //TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); + //ITK_TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); standardDeviation = 1.0; RegistrationType::StandardDeviationsType standardDeviations; standardDeviations.Fill( standardDeviation ); registrator->SetStandardDeviations( standardDeviations ); - //TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); + //ITK_TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); unsigned int maximumKernelWidth = 30; registrator->SetMaximumKernelWidth( maximumKernelWidth ); - TEST_SET_GET_VALUE( maximumKernelWidth, registrator->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maximumKernelWidth, registrator->GetMaximumKernelWidth() ); double maximumError = 0.1; registrator->SetMaximumError( maximumError ); - TEST_SET_GET_VALUE( maximumError, registrator->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maximumError, registrator->GetMaximumError() ); itk::fem::MaterialLinearElasticity::Pointer material = diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx index 96dd28e39db..56ca15a4195 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx @@ -175,21 +175,21 @@ int itkFEMRegistrationFilterTest2( int argc, char *argv[] ) { RegistrationType::Pointer registrator = RegistrationType::New(); - EXERCISE_BASIC_OBJECT_METHODS( registrator, FEMRegistrationFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( registrator, FEMRegistrationFilter, ImageToImageFilter ); registrator->SetFixedImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, registrator->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, registrator->GetFixedImage() ); registrator->SetMovingImage( movingImage ); - TEST_SET_GET_VALUE( movingImage, registrator->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, registrator->GetMovingImage() ); unsigned int maxLevel = 2; registrator->SetMaxLevel( maxLevel ); - TEST_SET_GET_VALUE( maxLevel, registrator->GetMaxLevel() ); + ITK_TEST_SET_GET_VALUE( maxLevel, registrator->GetMaxLevel() ); bool useNormalizedGradient = true; - TEST_SET_GET_BOOLEAN( registrator, UseNormalizedGradient, useNormalizedGradient ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseNormalizedGradient, useNormalizedGradient ); registrator->ChooseMetric( met ); @@ -200,21 +200,21 @@ int itkFEMRegistrationFilterTest2( int argc, char *argv[] ) RegistrationType::Float elasticity = 10; registrator->SetElasticity( elasticity, 0 ); registrator->SetElasticity( elasticity, 1 ); - TEST_SET_GET_VALUE( elasticity, registrator->GetElasticity() ); + ITK_TEST_SET_GET_VALUE( elasticity, registrator->GetElasticity() ); RegistrationType::Float rho = 1; registrator->SetRho( rho, 0 ); registrator->SetRho( rho, 1 ); - //TEST_SET_GET_VALUE( rho, registrator->GetRho() ); + //ITK_TEST_SET_GET_VALUE( rho, registrator->GetRho() ); RegistrationType::Float gamma = 1.; registrator->SetGamma( gamma, 0 ); registrator->SetGamma( gamma, 1 ); - //TEST_SET_GET_VALUE( gamma, registrator->GetGamma() ); + //ITK_TEST_SET_GET_VALUE( gamma, registrator->GetGamma() ); RegistrationType::Float alpha = 1.; registrator->SetAlpha( alpha ); - TEST_SET_GET_VALUE( alpha, registrator->GetAlpha() ); + ITK_TEST_SET_GET_VALUE( alpha, registrator->GetAlpha() ); registrator->SetMeshPixelsPerElementAtEachResolution( 8, 0 ); registrator->SetMeshPixelsPerElementAtEachResolution( 4, 1 ); @@ -229,7 +229,7 @@ int itkFEMRegistrationFilterTest2( int argc, char *argv[] ) widthOfMetricRegion = 1; } registrator->SetWidthOfMetricRegion( widthOfMetricRegion, 0 ); - TEST_SET_GET_VALUE( widthOfMetricRegion, + ITK_TEST_SET_GET_VALUE( widthOfMetricRegion, registrator->GetWidthOfMetricRegion() ); @@ -238,7 +238,7 @@ int itkFEMRegistrationFilterTest2( int argc, char *argv[] ) RegistrationType::Float timeStep = 1.; registrator->SetTimeStep( timeStep ); - TEST_SET_GET_VALUE( timeStep, registrator->GetTimeStep() ); + ITK_TEST_SET_GET_VALUE( timeStep, registrator->GetTimeStep() ); unsigned int doLineSearchOnImageEnergy; unsigned int employRegridding; @@ -254,48 +254,48 @@ int itkFEMRegistrationFilterTest2( int argc, char *argv[] ) } registrator->SetDoLineSearchOnImageEnergy( doLineSearchOnImageEnergy ); - TEST_SET_GET_VALUE( doLineSearchOnImageEnergy, + ITK_TEST_SET_GET_VALUE( doLineSearchOnImageEnergy, registrator->GetDoLineSearchOnImageEnergy() ); registrator->SetEmployRegridding( employRegridding ); - TEST_SET_GET_VALUE( employRegridding, registrator->GetEmployRegridding() ); + ITK_TEST_SET_GET_VALUE( employRegridding, registrator->GetEmployRegridding() ); bool useLandmarks = true; - TEST_SET_GET_BOOLEAN( registrator, UseLandmarks, useLandmarks ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseLandmarks, useLandmarks ); bool useMassMatrix = true; - TEST_SET_GET_BOOLEAN( registrator, UseMassMatrix, useMassMatrix ); + ITK_TEST_SET_GET_BOOLEAN( registrator, UseMassMatrix, useMassMatrix ); RegistrationType::Float energyReductionFactor = 0.0; registrator->SetEnergyReductionFactor( energyReductionFactor ); - TEST_SET_GET_VALUE( energyReductionFactor, + ITK_TEST_SET_GET_VALUE( energyReductionFactor, registrator->GetEnergyReductionFactor() ); unsigned int lineSearchMaximumIterations = 100; registrator->SetLineSearchMaximumIterations( lineSearchMaximumIterations ); - TEST_SET_GET_VALUE( lineSearchMaximumIterations, + ITK_TEST_SET_GET_VALUE( lineSearchMaximumIterations, registrator->GetLineSearchMaximumIterations() ); bool createMeshFromImage = true; - TEST_SET_GET_BOOLEAN( registrator, CreateMeshFromImage, createMeshFromImage ); + ITK_TEST_SET_GET_BOOLEAN( registrator, CreateMeshFromImage, createMeshFromImage ); double standardDeviation = 0.5; registrator->SetStandardDeviations( standardDeviation ); - //TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); + //ITK_TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); standardDeviation = 1.0; RegistrationType::StandardDeviationsType standardDeviations; standardDeviations.Fill( standardDeviation ); registrator->SetStandardDeviations( standardDeviations ); - //TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); + //ITK_TEST_SET_GET_VALUE( standardDeviations, registrator->GetStandardDeviations() ); unsigned int maximumKernelWidth = 30; registrator->SetMaximumKernelWidth( maximumKernelWidth ); - TEST_SET_GET_VALUE( maximumKernelWidth, registrator->GetMaximumKernelWidth() ); + ITK_TEST_SET_GET_VALUE( maximumKernelWidth, registrator->GetMaximumKernelWidth() ); double maximumError = 0.1; registrator->SetMaximumError( maximumError ); - TEST_SET_GET_VALUE( maximumError, registrator->GetMaximumError() ); + ITK_TEST_SET_GET_VALUE( maximumError, registrator->GetMaximumError() ); itk::fem::MaterialLinearElasticity::Pointer material = diff --git a/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx b/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx index d4fb6b0977e..cbf82d97ef2 100644 --- a/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx +++ b/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx @@ -85,7 +85,7 @@ int itkMIRegistrationFunctionTest( int, char* [] ) MetricFunctionType::Pointer metricFunction = MetricFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( metricFunction, MIRegistrationFunction, + ITK_EXERCISE_BASIC_OBJECT_METHODS( metricFunction, MIRegistrationFunction, PDEDeformableRegistrationFunction ); diff --git a/Modules/Registration/FEM/test/itkPhysicsBasedNonRigidRegistrationMethodTest.cxx b/Modules/Registration/FEM/test/itkPhysicsBasedNonRigidRegistrationMethodTest.cxx index 3eb8148fbde..3089d05118c 100644 --- a/Modules/Registration/FEM/test/itkPhysicsBasedNonRigidRegistrationMethodTest.cxx +++ b/Modules/Registration/FEM/test/itkPhysicsBasedNonRigidRegistrationMethodTest.cxx @@ -66,19 +66,19 @@ int itkPhysicsBasedNonRigidRegistrationMethodTest( int argc, char *argv[] ) ImageReaderType::Pointer fixedImageReader = ImageReaderType::New(); fixedImageReader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( fixedImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( fixedImageReader->Update() ); // Read moving image ImageReaderType::Pointer movingImageReader = ImageReaderType::New(); movingImageReader->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( movingImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( movingImageReader->Update() ); // Read mask image ImageReaderType::Pointer maskImageReader = ImageReaderType::New(); maskImageReader->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( maskImageReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( maskImageReader->Update() ); // Read mesh using MeshReaderType = itk::VTKTetrahedralMeshReader< MeshType >; @@ -86,7 +86,7 @@ int itkPhysicsBasedNonRigidRegistrationMethodTest( int argc, char *argv[] ) MeshReaderType::Pointer meshReader = MeshReaderType::New(); meshReader->SetFileName( argv[4] ); - TRY_EXPECT_NO_EXCEPTION( meshReader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( meshReader->Update() ); // Create PhysicsBasedNonRigidRegistrationMethod filter using DeformationFieldType = itk::Image< itk::Vector< MeshPixelType, ImageDimension >, @@ -97,57 +97,57 @@ int itkPhysicsBasedNonRigidRegistrationMethodTest( int argc, char *argv[] ) PBNRRFilterType::Pointer filter = PBNRRFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, PhysicsBasedNonRigidRegistrationMethod, ImageToImageFilter ); InputImageType::Pointer fixedImage = fixedImageReader->GetOutput(); filter->SetFixedImage( fixedImage ); - TEST_SET_GET_VALUE( fixedImage, filter->GetFixedImage() ); + ITK_TEST_SET_GET_VALUE( fixedImage, filter->GetFixedImage() ); InputImageType::Pointer movingImage = movingImageReader->GetOutput(); filter->SetMovingImage( movingImage ); - TEST_SET_GET_VALUE( movingImage, filter->GetMovingImage() ); + ITK_TEST_SET_GET_VALUE( movingImage, filter->GetMovingImage() ); InputImageType::Pointer maskImage = maskImageReader->GetOutput(); filter->SetMaskImage( maskImage ); - TEST_SET_GET_VALUE( maskImage, filter->GetMaskImage() ); + ITK_TEST_SET_GET_VALUE( maskImage, filter->GetMaskImage() ); MeshType::Pointer mesh = meshReader->GetOutput(); filter->SetMesh( mesh ); - TEST_SET_GET_VALUE( mesh, filter->GetMesh() ); + ITK_TEST_SET_GET_VALUE( mesh, filter->GetMesh() ); double selectionFraction = std::stod( argv[6] ); filter->SetSelectFraction( selectionFraction ); - TEST_SET_GET_VALUE( selectionFraction, filter->GetSelectFraction() ); + ITK_TEST_SET_GET_VALUE( selectionFraction, filter->GetSelectFraction() ); unsigned int nonConnectivity = std::stoi( argv[7] ); filter->SetNonConnectivity( nonConnectivity ); - TEST_SET_GET_VALUE( nonConnectivity, filter->GetNonConnectivity() ); + ITK_TEST_SET_GET_VALUE( nonConnectivity, filter->GetNonConnectivity() ); auto blockRadiusValue = static_cast< PBNRRFilterType::ImageSizeType::SizeValueType >( std::stod( argv[8] ) ); PBNRRFilterType::ImageSizeType blockRadius; blockRadius.Fill( blockRadiusValue ); filter->SetBlockRadius( blockRadius ); - TEST_SET_GET_VALUE( blockRadius, filter->GetBlockRadius() ); + ITK_TEST_SET_GET_VALUE( blockRadius, filter->GetBlockRadius() ); auto searchRadiusValue = static_cast< PBNRRFilterType::ImageSizeType::SizeValueType >( std::stod( argv[9] ) ); PBNRRFilterType::ImageSizeType searchRadius; searchRadius.Fill( searchRadiusValue ); filter->SetSearchRadius( searchRadius ); - TEST_SET_GET_VALUE( searchRadius, filter->GetSearchRadius() ); + ITK_TEST_SET_GET_VALUE( searchRadius, filter->GetSearchRadius() ); unsigned int approximationSteps = std::stoi( argv[10] ); filter->SetApproximationSteps( approximationSteps ); - TEST_SET_GET_VALUE( approximationSteps, filter->GetApproximationSteps() ); + ITK_TEST_SET_GET_VALUE( approximationSteps, filter->GetApproximationSteps() ); unsigned int outlierRejectionSteps = std::stoi( argv[11] ); filter->SetOutlierRejectionSteps( outlierRejectionSteps ); - TEST_SET_GET_VALUE( outlierRejectionSteps, filter->GetOutlierRejectionSteps() ); + ITK_TEST_SET_GET_VALUE( outlierRejectionSteps, filter->GetOutlierRejectionSteps() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Display the FEM filter to improve code coverage @@ -173,7 +173,7 @@ int itkPhysicsBasedNonRigidRegistrationMethodTest( int argc, char *argv[] ) warpFilter->SetDisplacementField( deformationField ); - TRY_EXPECT_NO_EXCEPTION( warpFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( warpFilter->Update() ); // Write warped image to file using WriterType = itk::ImageFileWriter< InputImageType >; @@ -181,7 +181,7 @@ int itkPhysicsBasedNonRigidRegistrationMethodTest( int argc, char *argv[] ) writer->SetFileName( argv[5] ); writer->SetInput( warpFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cerr << "Test finished." << std::endl; diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx index a3be8b5ead5..5c9e71afa79 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx @@ -258,7 +258,7 @@ int itkDemonsImageToImageMetricv4Test(int, char ** const) /* Test expected exceptions when transform is not right type */ metric->SetMovingTransform( translationTransform ); - TRY_EXPECT_EXCEPTION( metric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( metric->Initialize() ); /* Exercise accessor method */ const auto testValue = static_cast(0.5); diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx index e4825f6b128..928b4f578a1 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx @@ -236,12 +236,12 @@ int itkEuclideanDistancePointSetMetricTest2Run() badRegion.SetSize( badSize ); badRegion.SetIndex( regionIndex ); metric->SetVirtualDomain( spacing, origin, direction, badRegion ); - TRY_EXPECT_EXCEPTION( metric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( metric->Initialize() ); typename FieldType::SpacingType badSpacing; badSpacing.Fill( 0.5 ); metric->SetVirtualDomain( badSpacing, origin, direction, region ); - TRY_EXPECT_EXCEPTION( metric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( metric->Initialize() ); return EXIT_SUCCESS; } diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx index 8f72abf811c..77f13a407b7 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx @@ -626,7 +626,7 @@ int itkImageToImageMetricv4Test(int, char ** const) field->SetSpacing( fixedImage->GetSpacing() * -1.0 ); std::cout << "Testing with displacement field in different space than " << "fixed image:" << std::endl; - TRY_EXPECT_EXCEPTION( metric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( metric->Initialize() ); // // Test with sampled point-set diff --git a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx index c18b76a47f1..1aab8724a71 100644 --- a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx @@ -348,7 +348,7 @@ int itkObjectToObjectMultiMetricv4TestRun(bool useDisplacementTransform ) std::cout << "*** Test with mismatched transforms *** " << std::endl; TranslationTransformType::Pointer transform2 = TranslationTransformType::New(); m4->SetMovingTransform( transform2 ); - TRY_EXPECT_EXCEPTION( multiVariateMetric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( multiVariateMetric->Initialize() ); m4->SetMovingTransform( transform ); std::cout << "*** Test with proper CompositeTransform ***" << std::endl; @@ -366,12 +366,12 @@ int itkObjectToObjectMultiMetricv4TestRun(bool useDisplacementTransform ) std::cout << "*** Test with CompositeTransform - too many active transforms ***" << std::endl; compositeTransform->SetAllTransformsToOptimizeOn(); - TRY_EXPECT_EXCEPTION( multiVariateMetric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( multiVariateMetric->Initialize() ); std::cout << "*** Test with CompositeTransform - one active transform, but wrong one ***" << std::endl; compositeTransform->SetAllTransformsToOptimizeOff(); compositeTransform->SetNthTransformToOptimizeOn( 0 ); - TRY_EXPECT_EXCEPTION( multiVariateMetric->Initialize() ); + ITK_TRY_EXPECT_EXCEPTION( multiVariateMetric->Initialize() ); // Reset transform m4->SetMovingTransform( transform ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx index 3743b08a57d..99fcf226af1 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx @@ -110,7 +110,7 @@ int PerformBSplineSyNImageRegistration( int itkNotUsed( argc ), char *argv[] ) // Set the number of iterations using GradientDescentOptimizerv4Type = itk::GradientDescentOptimizerv4; auto * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != nullptr ); + ITK_TEST_EXPECT_TRUE( optimizer != nullptr ); #ifdef NDEBUG optimizer->SetNumberOfIterations( 100 ); #else diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx index 3bebd183fe4..4abeabd728a 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx @@ -200,7 +200,7 @@ int PerformCompositeImageRegistration( int itkNotUsed( argc ), char *argv[] ) using GradientDescentOptimizerv4Type = itk::GradientDescentOptimizerv4; auto * rigidOptimizer = dynamic_cast( rigidRegistration->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( rigidOptimizer != nullptr ); + ITK_TEST_EXPECT_TRUE( rigidOptimizer != nullptr ); rigidOptimizer->SetLearningRate( 0.1 ); #ifdef NDEBUG rigidOptimizer->SetNumberOfIterations( 100 ); @@ -254,7 +254,7 @@ int PerformCompositeImageRegistration( int itkNotUsed( argc ), char *argv[] ) using GradientDescentOptimizerv4Type = itk::GradientDescentOptimizerv4; auto * affineOptimizer = dynamic_cast( affineRegistration->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( affineOptimizer != nullptr ); + ITK_TEST_EXPECT_TRUE( affineOptimizer != nullptr ); affineOptimizer->SetLearningRate( 0.1 ); #ifdef NDEBUG affineOptimizer->SetNumberOfIterations( 100 ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx index dc7b9669b3b..de7a60579cb 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx @@ -152,7 +152,7 @@ int ImageRegistration( int itkNotUsed( argc ), char *argv[] ) std::cout << "Parameters: " << results << std::endl; std::cout << "Number Of Iterations: " << optimizer->GetCurrentIteration(); - TEST_EXPECT_TRUE( optimizer->GetCurrentIteration() > 5 ); + ITK_TEST_EXPECT_TRUE( optimizer->GetCurrentIteration() > 5 ); return EXIT_SUCCESS; } diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx index 2951651c54e..2f000b677f4 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx @@ -144,7 +144,7 @@ int PerformDisplacementFieldImageRegistration( int itkNotUsed( argc ), char *arg // Set the number of iterations using GradientDescentOptimizerv4Type = itk::GradientDescentOptimizerv4; auto * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != nullptr ); + ITK_TEST_EXPECT_TRUE( optimizer != nullptr ); #ifdef NDEBUG optimizer->SetNumberOfIterations( 100 ); #else diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx index f12ea68a0fb..db404c0920b 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx @@ -137,7 +137,7 @@ int PerformTimeVaryingBSplineVelocityFieldImageRegistration( int argc, char *arg // Set the number of iterations using GradientDescentOptimizerType = itk::GradientDescentOptimizerv4; auto * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != nullptr ); + ITK_TEST_EXPECT_TRUE( optimizer != nullptr ); optimizer->SetNumberOfIterations( numberOfAffineIterations ); std::cout << "number of affine iterations: " << numberOfAffineIterations << std::endl; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx index 7d5d813daba..ddb4f5638c8 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx @@ -137,7 +137,7 @@ int PerformTimeVaryingVelocityFieldImageRegistration( int argc, char *argv[] ) // Set the number of iterations using GradientDescentOptimizerv4Type = itk::GradientDescentOptimizerv4; auto * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != nullptr ); + ITK_TEST_EXPECT_TRUE( optimizer != nullptr ); optimizer->SetNumberOfIterations( numberOfAffineIterations ); std::cout << "number of affine iterations: " << numberOfAffineIterations << std::endl; diff --git a/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx index 0018e432a79..a7083af57be 100644 --- a/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx @@ -47,7 +47,7 @@ int TestBayesianClassifierImageFilterWithNoPriors( typename TInputImage::Pointer bayesianClassifier->SetInput( bayesianInitializer->GetOutput() ); bayesianClassifier->SetNumberOfSmoothingIterations( numberOfSmoothingIterations ); - TEST_SET_GET_VALUE( numberOfSmoothingIterations, bayesianClassifier->GetNumberOfSmoothingIterations() ); + ITK_TEST_SET_GET_VALUE( numberOfSmoothingIterations, bayesianClassifier->GetNumberOfSmoothingIterations() ); using ExtractedComponentImageType = typename BayesianClassifierFilterType::ExtractedComponentImageType; using SmoothingFilterType = itk::GradientAnisotropicDiffusionImageFilter< @@ -58,7 +58,7 @@ int TestBayesianClassifierImageFilterWithNoPriors( typename TInputImage::Pointer smoother->SetConductanceParameter( 3 ); bayesianClassifier->SetSmoothingFilter( smoother ); - TEST_SET_GET_VALUE( smoother, bayesianClassifier->GetSmoothingFilter().GetPointer() ); + ITK_TEST_SET_GET_VALUE( smoother, bayesianClassifier->GetSmoothingFilter().GetPointer() ); using MonitorFilterType = itk::PipelineMonitorImageFilter< TInputImage >; @@ -82,7 +82,7 @@ int TestBayesianClassifierImageFilterWithNoPriors( typename TInputImage::Pointer writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); if (!monitor->VerifyAllInputCanNotStream()) { @@ -115,7 +115,7 @@ int TestBayesianClassifierImageFilterWithPriors( typename TInputImage::Pointer i bayesianClassifier->SetPriors( priorsImage ); bayesianClassifier->SetNumberOfSmoothingIterations( numberOfSmoothingIterations ); - TEST_SET_GET_VALUE( numberOfSmoothingIterations, bayesianClassifier->GetNumberOfSmoothingIterations() ); + ITK_TEST_SET_GET_VALUE( numberOfSmoothingIterations, bayesianClassifier->GetNumberOfSmoothingIterations() ); using ExtractedComponentImageType = typename BayesianClassifierFilterType::ExtractedComponentImageType; using SmoothingFilterType = itk::GradientAnisotropicDiffusionImageFilter< @@ -126,7 +126,7 @@ int TestBayesianClassifierImageFilterWithPriors( typename TInputImage::Pointer i smoother->SetConductanceParameter( 3 ); bayesianClassifier->SetSmoothingFilter( smoother ); - TEST_SET_GET_VALUE( smoother, bayesianClassifier->GetSmoothingFilter().GetPointer() ); + ITK_TEST_SET_GET_VALUE( smoother, bayesianClassifier->GetSmoothingFilter().GetPointer() ); using MonitorFilterType = itk::PipelineMonitorImageFilter< TInputImage >; @@ -150,7 +150,7 @@ int TestBayesianClassifierImageFilterWithPriors( typename TInputImage::Pointer i writer->SetInput( rescaler->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); if (!monitor->VerifyAllInputCanNotStream()) { @@ -183,14 +183,14 @@ int itkBayesianClassifierImageFilterTest( int argc, char* argv[] ) BayesianInitializerType::Pointer bayesianInitializer = BayesianInitializerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( bayesianInitializer, + ITK_EXERCISE_BASIC_OBJECT_METHODS( bayesianInitializer, BayesianClassifierInitializationImageFilter, ImageToImageFilter ); ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); ReaderType::OutputImageType::Pointer inputImage = reader->GetOutput(); @@ -211,7 +211,7 @@ int itkBayesianClassifierImageFilterTest( int argc, char* argv[] ) BayesianClassifierFilterType::Pointer bayesianClassifier = BayesianClassifierFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( bayesianClassifier, + ITK_EXERCISE_BASIC_OBJECT_METHODS( bayesianClassifier, BayesianClassifierImageFilter, ImageToImageFilter ); bool testStatus = EXIT_SUCCESS; @@ -265,7 +265,7 @@ int itkBayesianClassifierImageFilterTest( int argc, char* argv[] ) return EXIT_FAILURE; } - EXERCISE_BASIC_OBJECT_METHODS( filter, BayesianClassifierImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BayesianClassifierImageFilter, ImageToImageFilter ); } { @@ -284,7 +284,7 @@ int itkBayesianClassifierImageFilterTest( int argc, char* argv[] ) return EXIT_FAILURE; } - EXERCISE_BASIC_OBJECT_METHODS( filter, BayesianClassifierImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BayesianClassifierImageFilter, ImageToImageFilter ); } { @@ -303,7 +303,7 @@ int itkBayesianClassifierImageFilterTest( int argc, char* argv[] ) return EXIT_FAILURE; } - EXERCISE_BASIC_OBJECT_METHODS( filter, BayesianClassifierImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, BayesianClassifierImageFilter, ImageToImageFilter ); } std::cout << "Test passed." << std::endl; diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx index 3c35e0f29f1..4f663fb68a6 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx @@ -76,7 +76,7 @@ int itkScalarImageKmeansImageFilterTest(int argc, char* argv [] ) } // before we add any mean check that an expection is thrown - TRY_EXPECT_EXCEPTION( kmeansFilter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( kmeansFilter->Update() ); for(unsigned k=0; kSetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); InputImageType::PixelType foreground = 97; // Prime numbers are good testers InputImageType::PixelType background = 29; @@ -70,7 +70,7 @@ int itkVotingBinaryHoleFillingImageFilterTest( int argc, char* argv[] ) VotingBinaryHoleFillingImageFilterType::Pointer voting = VotingBinaryHoleFillingImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( voting, VotingBinaryHoleFillingImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( voting, VotingBinaryHoleFillingImageFilter, VotingBinaryImageFilter ); // Define the neighborhood size used for the voting filter (3x3) @@ -83,7 +83,7 @@ int itkVotingBinaryHoleFillingImageFilterTest( int argc, char* argv[] ) // switching a pixel unsigned int majorityThreshold = 1; voting->SetMajorityThreshold( majorityThreshold ); - TEST_SET_GET_VALUE( majorityThreshold, voting->GetMajorityThreshold() ); + ITK_TEST_SET_GET_VALUE( majorityThreshold, voting->GetMajorityThreshold() ); voting->SetForegroundValue( foreground ); voting->SetBackgroundValue( background ); @@ -91,7 +91,7 @@ int itkVotingBinaryHoleFillingImageFilterTest( int argc, char* argv[] ) voting->SetInput( thresholder->GetOutput()); // Execute the filter - TRY_EXPECT_NO_EXCEPTION( voting->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( voting->Update() ); std::cout << "Number of pixels changed: " @@ -101,7 +101,7 @@ int itkVotingBinaryHoleFillingImageFilterTest( int argc, char* argv[] ) writer->SetInput( voting->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished" << std::endl; diff --git a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx index a1a02560503..8e1ba29f713 100644 --- a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx @@ -60,11 +60,11 @@ int itkVotingBinaryImageFilterTestImp( const std::string &infname, filter->SetBirthThreshold( birthThreshold ); filter->SetSurvivalThreshold( survivalThreshold ); - TEST_SET_GET_VALUE( R, filter->GetRadius() ); - TEST_SET_GET_VALUE( itk::Math::CastWithRangeCheck( foregroundValue ), filter->GetForegroundValue() ); - TEST_SET_GET_VALUE( itk::Math::CastWithRangeCheck( backgroundValue ), filter->GetBackgroundValue() ); - TEST_SET_GET_VALUE( birthThreshold, filter->GetBirthThreshold() ); - TEST_SET_GET_VALUE( survivalThreshold, filter->GetSurvivalThreshold() ); + ITK_TEST_SET_GET_VALUE( R, filter->GetRadius() ); + ITK_TEST_SET_GET_VALUE( itk::Math::CastWithRangeCheck( foregroundValue ), filter->GetForegroundValue() ); + ITK_TEST_SET_GET_VALUE( itk::Math::CastWithRangeCheck( backgroundValue ), filter->GetBackgroundValue() ); + ITK_TEST_SET_GET_VALUE( birthThreshold, filter->GetBirthThreshold() ); + ITK_TEST_SET_GET_VALUE( survivalThreshold, filter->GetSurvivalThreshold() ); typename WriterType::Pointer writer = WriterType::New(); writer->SetInput( filter->GetOutput() ); @@ -114,7 +114,7 @@ int itkVotingBinaryImageFilterTest(int argc, char* argv[] ) using FilterType = itk::VotingBinaryImageFilter; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, VotingBinaryImageFilter, ImageToImageFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, VotingBinaryImageFilter, ImageToImageFilter ); switch(componentType) { diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx index b822253585e..8054f1ba3bd 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx @@ -131,7 +131,7 @@ int itkGeodesicActiveContourLevelSetImageFilterTest( int, char* [] ) GeodesicActiveContourFilterType::Pointer geodesicActiveContour = GeodesicActiveContourFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( geodesicActiveContour, GeodesicActiveContourLevelSetImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( geodesicActiveContour, GeodesicActiveContourLevelSetImageFilter, SegmentationLevelSetImageFilter ); // set the initial level set diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx index d369da8de0b..5cc9499b929 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx @@ -133,7 +133,7 @@ int itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest( int, char* [] ) ShapeDetectionFilterType::Pointer shapeDetection = ShapeDetectionFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( shapeDetection, GeodesicActiveContourLevelSetImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( shapeDetection, GeodesicActiveContourLevelSetImageFilter, SegmentationLevelSetImageFilter ); // set the initial level set diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx index 2813b3343d7..eaa2fe214a3 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx @@ -76,7 +76,7 @@ int itkGeodesicActiveContourShapePriorLevelSetImageFilterTest( int, char *[] ) CostFunctionType::Pointer costFunction = CostFunctionType::New(); OptimizerType::Pointer optimizer = OptimizerType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GeodesicActiveContourShapePriorLevelSetImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GeodesicActiveContourShapePriorLevelSetImageFilter, ShapePriorSegmentationLevelSetImageFilter ); ImageType::SizeType imageSize; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx index 61003d1d7d8..e357e9eba37 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx @@ -82,7 +82,7 @@ int itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2( int, char *[] ) SphereFunctionType::Pointer sphere = SphereFunctionType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, GeodesicActiveContourShapePriorLevelSetImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, GeodesicActiveContourShapePriorLevelSetImageFilter, ShapePriorSegmentationLevelSetImageFilter ); ImageType::SizeType imageSize; diff --git a/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx index 34e3d02aa01..390bbc6f640 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx @@ -52,7 +52,7 @@ int itkConnectedThresholdImageFilterTest( int argc, char* argv[] ) std::string inputImageFilename = argv[1]; imageReader->SetFileName( inputImageFilename ); - TRY_EXPECT_NO_EXCEPTION( imageReader->Update(); ); + ITK_TRY_EXPECT_NO_EXCEPTION( imageReader->Update(); ); // Create the filter using ConnectedThresholdImageFilterType = @@ -63,7 +63,7 @@ int itkConnectedThresholdImageFilterTest( int argc, char* argv[] ) itk::SimpleFilterWatcher watcher( connectedThresholdFilter ); - EXERCISE_BASIC_OBJECT_METHODS( connectedThresholdFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( connectedThresholdFilter, ConnectedThresholdImageFilter, ImageToImageFilter ); @@ -90,25 +90,25 @@ int itkConnectedThresholdImageFilterTest( int argc, char* argv[] ) ConnectedThresholdImageFilterType::InputPixelObjectType * lowerInputPixelObject = connectedThresholdFilter->GetLowerInput(); connectedThresholdFilter->SetLower( lowerInputPixelObject->Get() ); - TEST_SET_GET_VALUE( lowerInputPixelObject->Get(), connectedThresholdFilter->GetLower() ); + ITK_TEST_SET_GET_VALUE( lowerInputPixelObject->Get(), connectedThresholdFilter->GetLower() ); ConnectedThresholdImageFilterType::InputPixelObjectType * upperInputPixelObject = connectedThresholdFilter->GetUpperInput(); connectedThresholdFilter->SetUpper( upperInputPixelObject->Get() ); - TEST_SET_GET_VALUE( upperInputPixelObject->Get(), connectedThresholdFilter->GetUpper() ); + ITK_TEST_SET_GET_VALUE( upperInputPixelObject->Get(), connectedThresholdFilter->GetUpper() ); ConnectedThresholdImageFilterType::InputImagePixelType lowerThreshold = std::stoi( argv[5] ); connectedThresholdFilter->SetLower( lowerThreshold ); - TEST_SET_GET_VALUE( lowerThreshold, connectedThresholdFilter->GetLower() ); + ITK_TEST_SET_GET_VALUE( lowerThreshold, connectedThresholdFilter->GetLower() ); ConnectedThresholdImageFilterType::InputImagePixelType upperThreshold = std::stoi( argv[6] ); connectedThresholdFilter->SetUpper( upperThreshold ); - TEST_SET_GET_VALUE( upperThreshold, connectedThresholdFilter->GetUpper() ); + ITK_TEST_SET_GET_VALUE( upperThreshold, connectedThresholdFilter->GetUpper() ); ConnectedThresholdImageFilterType::OutputImagePixelType replaceValue = 255; connectedThresholdFilter->SetReplaceValue( replaceValue ); - TEST_SET_GET_VALUE( replaceValue, connectedThresholdFilter->GetReplaceValue() ); + ITK_TEST_SET_GET_VALUE( replaceValue, connectedThresholdFilter->GetReplaceValue() ); // Test the use of full (8 connectivity in 2D) on this image if( argc > 7 ) @@ -116,12 +116,12 @@ int itkConnectedThresholdImageFilterTest( int argc, char* argv[] ) ConnectedThresholdImageFilterType::ConnectivityEnumType conenctivity = std::stoi( argv[7] ) ? ConnectedThresholdImageFilterType::FullConnectivity : ConnectedThresholdImageFilterType::FaceConnectivity; connectedThresholdFilter->SetConnectivity( conenctivity ); - TEST_SET_GET_VALUE( conenctivity, connectedThresholdFilter->GetConnectivity() ); + ITK_TEST_SET_GET_VALUE( conenctivity, connectedThresholdFilter->GetConnectivity() ); } connectedThresholdFilter->SetInput( imageReader->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( connectedThresholdFilter->Update(); ); + ITK_TRY_EXPECT_NO_EXCEPTION( connectedThresholdFilter->Update(); ); // Write the output image itk::ImageFileWriter< ImageType >::Pointer writer = @@ -132,7 +132,7 @@ int itkConnectedThresholdImageFilterTest( int argc, char* argv[] ) writer->SetInput( connectedThresholdFilter->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); return EXIT_SUCCESS; } diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx index 06b3b54b4cd..cebe62b3a1a 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx @@ -47,7 +47,7 @@ int itkVoronoiDiagram2DTest( int argc, char* argv[] ) VoronoiDiagramGenerator::Pointer voronoiDiagramGenerator = VoronoiDiagramGenerator::New(); - EXERCISE_BASIC_OBJECT_METHODS ( voronoiDiagramGenerator, VoronoiDiagram2DGenerator, + ITK_EXERCISE_BASIC_OBJECT_METHODS ( voronoiDiagramGenerator, VoronoiDiagram2DGenerator, MeshSource ); PointType insize; @@ -56,7 +56,7 @@ int itkVoronoiDiagram2DTest( int argc, char* argv[] ) voronoiDiagramGenerator->SetBoundary(insize); voronoiDiagramGenerator->SetRandomSeeds(numberOfSeeds); - TEST_SET_GET_VALUE( numberOfSeeds, voronoiDiagramGenerator->GetNumberOfSeeds() ); + ITK_TEST_SET_GET_VALUE( numberOfSeeds, voronoiDiagramGenerator->GetNumberOfSeeds() ); voronoiDiagramGenerator->Update(); voronoiDiagram = voronoiDiagramGenerator->GetOutput(); diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx index a84d88f19b5..65f1ef5ede4 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkVoronoiSegmentationImageFilterTest( int, char* [] ) VoronoiSegmentationImageFilterType::Pointer voronoiSegmenter = VoronoiSegmentationImageFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( voronoiSegmenter, VoronoiSegmentationImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( voronoiSegmenter, VoronoiSegmentationImageFilter, VoronoiSegmentationImageFilterBase ); UShortImage::Pointer inputImage = UShortImage::New(); @@ -102,12 +102,12 @@ int itkVoronoiSegmentationImageFilterTest( int, char* [] ) voronoiSegmenter->SetNumberOfSeeds( numberOfSeeds ); voronoiSegmenter->SetSteps( steps ); - TEST_SET_GET_VALUE( mean, voronoiSegmenter->GetMean() ); - TEST_SET_GET_VALUE( std, voronoiSegmenter->GetSTD() ); - TEST_SET_GET_VALUE( meanTolerance, voronoiSegmenter->GetMeanTolerance() ); - TEST_SET_GET_VALUE( stdTolerance, voronoiSegmenter->GetSTDTolerance() ); - TEST_SET_GET_VALUE( numberOfSeeds, voronoiSegmenter->GetNumberOfSeeds() ); - TEST_SET_GET_VALUE( steps, voronoiSegmenter->GetSteps() ); + ITK_TEST_SET_GET_VALUE( mean, voronoiSegmenter->GetMean() ); + ITK_TEST_SET_GET_VALUE( std, voronoiSegmenter->GetSTD() ); + ITK_TEST_SET_GET_VALUE( meanTolerance, voronoiSegmenter->GetMeanTolerance() ); + ITK_TEST_SET_GET_VALUE( stdTolerance, voronoiSegmenter->GetSTDTolerance() ); + ITK_TEST_SET_GET_VALUE( numberOfSeeds, voronoiSegmenter->GetNumberOfSeeds() ); + ITK_TEST_SET_GET_VALUE( steps, voronoiSegmenter->GetSteps() ); std::cout << "Running algorithm" << std::endl; voronoiSegmenter->Update(); diff --git a/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx index f069f2124a9..8f8be60fa66 100644 --- a/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx @@ -52,7 +52,7 @@ int itkIsolatedWatershedImageFilterTest( int argc, char* argv[] ) reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Create the IsolatedWatershedImageFilter object @@ -60,7 +60,7 @@ int itkIsolatedWatershedImageFilterTest( int argc, char* argv[] ) FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, IsolatedWatershedImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, IsolatedWatershedImageFilter, ImageToImageFilter ); @@ -81,7 +81,7 @@ int itkIsolatedWatershedImageFilterTest( int argc, char* argv[] ) seed1[0] = region.GetUpperIndex()[0] + offset[0]; filter->SetSeed1( seed1 ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); seed1.Fill( 0 ); filter->SetSeed1( seed1 ); @@ -89,41 +89,41 @@ int itkIsolatedWatershedImageFilterTest( int argc, char* argv[] ) seed2[1] = region.GetUpperIndex()[1] + offset[1]; filter->SetSeed2( seed2 ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); seed1[0] = std::stoi( argv[3] ); seed1[1] = std::stoi( argv[4] ); filter->SetSeed1( seed1 ); - TEST_SET_GET_VALUE( seed1, filter->GetSeed1() ); + ITK_TEST_SET_GET_VALUE( seed1, filter->GetSeed1() ); seed2[0] = std::stoi( argv[5] ); seed2[1] = std::stoi( argv[6] ); filter->SetSeed2( seed2 ); - TEST_SET_GET_VALUE( seed2, filter->GetSeed2() ); + ITK_TEST_SET_GET_VALUE( seed2, filter->GetSeed2() ); double threshold = std::stod( argv[7] ); filter->SetThreshold( threshold ); - TEST_SET_GET_VALUE( threshold, filter->GetThreshold() ); + ITK_TEST_SET_GET_VALUE( threshold, filter->GetThreshold() ); PixelType replaceValue1 = 255; filter->SetReplaceValue1( replaceValue1 ); - TEST_SET_GET_VALUE( replaceValue1, filter->GetReplaceValue1() ); + ITK_TEST_SET_GET_VALUE( replaceValue1, filter->GetReplaceValue1() ); PixelType replaceValue2 = 127; filter->SetReplaceValue2( replaceValue2 ); - TEST_SET_GET_VALUE( replaceValue2, filter->GetReplaceValue2() ); + ITK_TEST_SET_GET_VALUE( replaceValue2, filter->GetReplaceValue2() ); double upperValueLimit = 1.0; filter->SetUpperValueLimit( upperValueLimit ); - TEST_SET_GET_VALUE( upperValueLimit, filter->GetUpperValueLimit() ); + ITK_TEST_SET_GET_VALUE( upperValueLimit, filter->GetUpperValueLimit() ); double isolatedValueTolerance = std::stod( argv[8] ); filter->SetIsolatedValueTolerance( isolatedValueTolerance ); - TEST_SET_GET_VALUE( isolatedValueTolerance, + ITK_TEST_SET_GET_VALUE( isolatedValueTolerance, filter->GetIsolatedValueTolerance() ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); double isolatedValue = filter->GetIsolatedValue(); @@ -135,7 +135,7 @@ int itkIsolatedWatershedImageFilterTest( int argc, char* argv[] ) writer->SetInput( filter->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx index 149cd2fba3e..d5cf70c7310 100644 --- a/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx @@ -57,16 +57,16 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest( int argc, char * argv[] itk::MorphologicalWatershedFromMarkersImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, MorphologicalWatershedFromMarkersImageFilter, ImageToImageFilter ); bool markWatershedLine = std::stoi( argv[4] ); - TEST_SET_GET_BOOLEAN( filter, MarkWatershedLine, markWatershedLine ); + ITK_TEST_SET_GET_BOOLEAN( filter, MarkWatershedLine, markWatershedLine ); bool fullyConnected = std::stoi( argv[5] ); - TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); filter->SetInput( reader->GetOutput() ); @@ -75,7 +75,7 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest( int argc, char * argv[] // // Create a marker image larger than the input image - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); ImageType::RegionType::SizeType size = region.GetSize(); @@ -97,17 +97,17 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest( int argc, char * argv[] filter->SetInput2( largerMarkerImage ); - TRY_EXPECT_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_EXCEPTION( filter->Update() ); FilterType::LabelImageType::Pointer markerImage = reader2->GetOutput(); filter->SetInput2( markerImage ); - TEST_SET_GET_VALUE( markerImage, filter->GetMarkerImage() ); + ITK_TEST_SET_GET_VALUE( markerImage, filter->GetMarkerImage() ); itk::SimpleFilterWatcher watcher( filter, "MorphologicalWatershedFromMarkersImageFilter" ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Write output image @@ -116,7 +116,7 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest( int argc, char * argv[] writer->SetInput( filter->GetOutput() ); writer->SetFileName( argv[3] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); if( argc > 6 ) { @@ -139,7 +139,7 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest( int argc, char * argv[] overlay->SetOpacity( std::stod( argv[7] ) ); } - TRY_EXPECT_NO_EXCEPTION( rgbwriter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( rgbwriter->Update() ); } std::cerr << "Test finished" << std::endl; diff --git a/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedImageFilterTest.cxx index 89d9d37d338..6d81afbf415 100644 --- a/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedImageFilterTest.cxx @@ -55,25 +55,25 @@ int itkMorphologicalWatershedImageFilterTest( int argc, char * argv[] ) itk::MorphologicalWatershedImageFilter< ImageType, ImageType >; FilterType::Pointer filter = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, MorphologicalWatershedImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, MorphologicalWatershedImageFilter, ImageToImageFilter ); bool markWatershedLine = std::stoi( argv[3] ); - TEST_SET_GET_BOOLEAN( filter, MarkWatershedLine, markWatershedLine ); + ITK_TEST_SET_GET_BOOLEAN( filter, MarkWatershedLine, markWatershedLine ); bool fullyConnected = std::stoi( argv[4] ); - TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); + ITK_TEST_SET_GET_BOOLEAN( filter, FullyConnected, fullyConnected ); auto level = static_cast< FilterType::InputImagePixelType >( std::stod( argv[5] ) ); filter->SetLevel( level ); - TEST_SET_GET_VALUE( level, filter->GetLevel() ); + ITK_TEST_SET_GET_VALUE( level, filter->GetLevel() ); filter->SetInput( reader->GetOutput() ); itk::SimpleFilterWatcher watcher( filter, "MorphologicalWatershedImageFilter" ); - TRY_EXPECT_NO_EXCEPTION( filter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( filter->Update() ); // Rescale the output to have a better display @@ -97,7 +97,7 @@ int itkMorphologicalWatershedImageFilterTest( int argc, char * argv[] ) writer->SetInput( rescaler->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); if( argc > 6 ) { @@ -121,7 +121,7 @@ int itkMorphologicalWatershedImageFilterTest( int argc, char * argv[] ) overlay->SetOpacity( std::stod( argv[7] ) ); } - TRY_EXPECT_NO_EXCEPTION( rgbwriter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( rgbwriter->Update() ); } std::cerr << "Test finished" << std::endl; diff --git a/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx index 32f506adfda..b5d2ec84b6b 100644 --- a/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx @@ -59,12 +59,12 @@ int itkTobogganImageFilterTest( int argc, char* argv[] ) reader->SetFileName( argv[1] ); - TRY_EXPECT_NO_EXCEPTION( reader->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( reader->Update() ); FilterType::Pointer toboggan = FilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( toboggan, TobogganImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( toboggan, TobogganImageFilter, ImageToImageFilter ); InputCastFilterType::Pointer inputCaster = InputCastFilterType::New(); @@ -77,14 +77,14 @@ int itkTobogganImageFilterTest( int argc, char* argv[] ) toboggan->SetInput( gmgaussian->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( toboggan->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( toboggan->Update() ); // Cast the output of the Toboggan filter OutputCastFilterType::Pointer outputCaster = OutputCastFilterType::New(); outputCaster->SetInput( toboggan->GetOutput() ); - TRY_EXPECT_NO_EXCEPTION( outputCaster->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( outputCaster->Update() ); // Write the output using WriterType = itk::ImageFileWriter< OutputImageType >; @@ -92,7 +92,7 @@ int itkTobogganImageFilterTest( int argc, char* argv[] ) writer->SetInput( outputCaster->GetOutput() ); writer->SetFileName( argv[2] ); - TRY_EXPECT_NO_EXCEPTION( writer->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( writer->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Segmentation/Watersheds/test/itkWatershedImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkWatershedImageFilterTest.cxx index 28e8e195fa0..61aa62eac08 100644 --- a/Modules/Segmentation/Watersheds/test/itkWatershedImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkWatershedImageFilterTest.cxx @@ -78,29 +78,29 @@ int itkWatershedImageFilterTest( int, char* [] ) eq->SetInputImage( longimage2D ); eq->SetEquivalencyTable( table ); - TEST_SET_GET_VALUE( table, eq->GetEquivalencyTable() ); + ITK_TEST_SET_GET_VALUE( table, eq->GetEquivalencyTable() ); - TRY_EXPECT_NO_EXCEPTION( eq->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( eq->Update() ); // Test WatershedMiniPipelineProgressCommand // Forcing the execution of the const Execute method which is not normally called. itk::WatershedMiniPipelineProgressCommand::Pointer wmppc = itk::WatershedMiniPipelineProgressCommand::New(); - EXERCISE_BASIC_OBJECT_METHODS( wmppc, WatershedMiniPipelineProgressCommand, + ITK_EXERCISE_BASIC_OBJECT_METHODS( wmppc, WatershedMiniPipelineProgressCommand, Command ); double count = 2.0; wmppc->SetCount( count ); - TEST_SET_GET_VALUE( count, wmppc->GetCount() ); + ITK_TEST_SET_GET_VALUE( count, wmppc->GetCount() ); unsigned int numberOfFilters = 2; wmppc->SetNumberOfFilters( numberOfFilters ); - TEST_SET_GET_VALUE( numberOfFilters, wmppc->GetNumberOfFilters() ); + ITK_TEST_SET_GET_VALUE( numberOfFilters, wmppc->GetNumberOfFilters() ); wmppc->SetFilter( eq ); - TEST_SET_GET_VALUE( eq, wmppc->GetFilter() ); + ITK_TEST_SET_GET_VALUE( eq, wmppc->GetFilter() ); const itk::ProcessObject *constp = eq.GetPointer(); wmppc->Execute( constp, itk::ProgressEvent() ); @@ -136,22 +136,22 @@ int itkWatershedImageFilterTest( int, char* [] ) itk::WatershedImageFilter< ImageType2D >::Pointer watershedFilter = itk::WatershedImageFilter< ImageType2D >::New(); - EXERCISE_BASIC_OBJECT_METHODS( watershedFilter, WatershedImageFilter, + ITK_EXERCISE_BASIC_OBJECT_METHODS( watershedFilter, WatershedImageFilter, ImageToImageFilter ); itk::SimpleFilterWatcher watchIt( watershedFilter, "WatershedImageFilter" ); double threshold = .05; watershedFilter->SetThreshold( threshold ); - TEST_SET_GET_VALUE( threshold, watershedFilter->GetThreshold() ); + ITK_TEST_SET_GET_VALUE( threshold, watershedFilter->GetThreshold() ); double level = 1.0; watershedFilter->SetLevel( level ); - TEST_SET_GET_VALUE( level, watershedFilter->GetLevel() ); + ITK_TEST_SET_GET_VALUE( level, watershedFilter->GetLevel() ); watershedFilter->SetInput( image2D ); - TRY_EXPECT_NO_EXCEPTION( watershedFilter->Update() ); + ITK_TRY_EXPECT_NO_EXCEPTION( watershedFilter->Update() ); std::cout << "Test finished." << std::endl; diff --git a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx index 1cd76317ad5..159c411c9d4 100644 --- a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx @@ -184,7 +184,7 @@ int itkVideoToVideoFilterTest( int, char* [] ) DummyVideoToVideoFilter< InputVideoType, OutputVideoType >; VideoFilterType::Pointer filter = VideoFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( filter, DummyVideoToVideoFilter, VideoToVideoFilter ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( filter, DummyVideoToVideoFilter, VideoToVideoFilter ); // Set up an input video stream InputVideoType::Pointer inputVideo = InputVideoType::New(); diff --git a/Modules/Video/IO/test/itkFileListVideoIOTest.cxx b/Modules/Video/IO/test/itkFileListVideoIOTest.cxx index d41eb018916..14f12928999 100644 --- a/Modules/Video/IO/test/itkFileListVideoIOTest.cxx +++ b/Modules/Video/IO/test/itkFileListVideoIOTest.cxx @@ -49,7 +49,7 @@ int test_FileListVideoIO( const char* input, // Create the VideoIO itk::FileListVideoIO::Pointer fileListIO = itk::FileListVideoIO::New(); - EXERCISE_BASIC_OBJECT_METHODS( fileListIO, FileListVideoIO, VideoIOBase ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( fileListIO, FileListVideoIO, VideoIOBase ); fileListIO->SetFileName(input); diff --git a/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx b/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx index 22ac4c9b544..82641d679ca 100644 --- a/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx +++ b/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx @@ -50,7 +50,7 @@ int itkVideoFileReaderWriterTest( int argc, char *argv[] ) } VideoReaderType::Pointer reader = VideoReaderType::New(); - EXERCISE_BASIC_OBJECT_METHODS( reader, VideoFileReader, VideoSource ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( reader, VideoFileReader, VideoSource ); reader->SetFileName(inFile.c_str() ); @@ -61,7 +61,7 @@ int itkVideoFileReaderWriterTest( int argc, char *argv[] ) // Set up the writer VideoWriterType::Pointer writer = VideoWriterType::New(); - EXERCISE_BASIC_OBJECT_METHODS( writer, VideoFileWriter, TemporalProcessObject ); + ITK_EXERCISE_BASIC_OBJECT_METHODS( writer, VideoFileWriter, TemporalProcessObject ); writer->SetInput(reader->GetOutput() ); writer->SetFileName(argv[6]);